Editing KML files in database / table

2,510 views
Skip to first unread message

ecp98rjs

unread,
Feb 22, 2006, 5:42:46 PM2/22/06
to KML Discussions
Hi,

I've got a huge KML file with over 10,000 placemarks in it. I would like to do some editing of it but text editors are impractical for doing this. Is there any way to edit KML files using some kind of database interface (such as Access or Excel)?

I can creat KMLs using Access by creating queries that write the tags and then include the database fields I want. But this is clunky because there is a limit of 255 characters in a string. It also isn't possible to import them back again.

Grateful for any idea.

Thanks,
Rob

tekgergedan

unread,
Feb 22, 2006, 6:34:02 PM2/22/06
to KML Discussions
Hi, welcome to our Community...

Access has not a limit of 255 characters. Change the "text" fields to "note" field. If you have made a system for your own, go on that; something else may be better but you can handle your own things better in your own place (which is Access for you and for your database)...

Cheers...

barryhunter

unread,
Feb 22, 2006, 7:08:49 PM2/22/06
to KML Discussions
What you need is a KML to CSV and CSV to KML converter. Both should be fairly easy if you willing to be fairly restrictive on what kml features you use.

Let me know if you don't find anything and will see about creating such a script. If you can send a single placemark as an example (to see what fields are actully needed), then would make sure not to miss a used kml tag.

ecp98rjs

unread,
Feb 23, 2006, 5:30:00 AM2/23/06
to KML Discussions
Thanks for the suggestion about Access - that's very useful to know and not just for this project (btw, in my Access XP the field is called "Memo" not "Notes", so maybe this differs between versions).

Barry: below is an example of one placemark with the fields I will probably use.

Thanks,
Rob

<Placemark>
<name>
<!CDATA[Dr Mangal A]]>
</name>
<description>
<!CDATA[A load of HTML and stuff will go in here]]>
</description>
<LookAt>
<longitude>-3.228348</longitude>
<latitude>54.109994</latitude>
<range>1000</range>
<tilt>0</tilt>
<heading>0</heading>
</LookAt>
<Point>
<coordinates>-3.228348,54.109994,0</coordinates>
</Point>
</Placemark>

tekgergedan

unread,
Feb 23, 2006, 8:39:46 AM2/23/06
to KML Discussions
"Memo"? That's right. I may remember it wrong. I use a Turkish version for many years. Maybe it is a version difference...

ecp98rjs

unread,
Feb 23, 2006, 11:10:11 AM2/23/06
to KML Discussions
Hi. Sorry I realised after I'd posted that you were probably using a non-English version. (A small clue being that it says "Turkey" under your picture - duh )

BrianT

unread,
Feb 24, 2006, 12:12:07 AM2/24/06
to KML Discussions
Just to clarify any potential confusion, the above post refers to MS Access' "Memo" field type which can hold 64K characters.

BT

lnrproperty

unread,
Feb 27, 2006, 5:26:23 PM2/27/06
to KML Discussions
I would use TextPad:

http://www.textpad.com/

After you install it go to: Configure | Prefernces... | Document Classes | HTML and add *.kml as a type.

You can do a lot of editign using the Replace function as well to do large scale changes, in addition to using macros.

TextPad will load any size file. I have loaded multi-gig databases using TextPad.

tekgergedan

unread,
Feb 27, 2006, 5:36:41 PM2/27/06
to KML Discussions
Hi

I suggest anyone not to change their database unless they have enough time to waste. Therefore, when starting-up a database, decision on which one to use is vital.

If you have started with Access (like me) and you have many scripts, you need to go on with this application.

Also, TextPad is a text editor, not a database editor...

Terry_Pinnell

unread,
Feb 28, 2006, 5:08:05 AM2/28/06
to KML Discussions
Straying slightly OT, are the various settings I make in GE stored here?
C:\Documents and Settings\Terry Pinnell\Application Data\Google\GoogleEarth\dbCache.dat

Is that updated as soon as I make a change? Or only when I close GE Plus?

--
Terry, West Sussex, UK
Reply all
Reply to author
Forward
0 new messages