Jump to content

How to split a .kml


pppingme

Recommended Posts

I have a kml trail that is well over the 500 point limitation imposed for CAR. Is there an easy way to split to down?

You could use GPSBabel to convert it to a .gpx file and then used some other software like MapSource or EasyGPS to edit out points. What is CAR?

Link to comment

I was hoping that there was some way to do this with gpsbabel directly, but I couldn't really figure out a way.

 

I'm not sure how many points are in the file, but the trail is actually a little over 2000 miles (and probably averages a couple points per mile), so no matter what I have to break it down.

 

MapSource or EasyGPS aren't really options since I'm not running Windows.

Link to comment

I was hoping that there was some way to do this with gpsbabel directly, but I couldn't really figure out a way.

 

I'm not sure how many points are in the file, but the trail is actually a little over 2000 miles (and probably averages a couple points per mile), so no matter what I have to break it down.

 

MapSource or EasyGPS aren't really options since I'm not running Windows.

It's tedious, but once you have a GPX file you can do it with a text editor. Look at the starting and ending timestamps, divide by an increment you think will be short enough and search for times in that range. Split the GPX into that number of lines. Cut and paste the header and footer onto each line, and then save each line as a separate file.

 

I sure would like to know where the KML hides all the point data I see when I convert from GPX.

Edited by seldom_sn
Link to comment

I was hoping that there was some way to do this with gpsbabel directly, but I couldn't really figure out a way.

I'm not sure how many points are in the file, but the trail is actually a little over 2000 miles (and probably averages a couple points per mile), so no matter what I have to break it down.

MapSource or EasyGPS aren't really options since I'm not running Windows.

I was going to recommend using GPS Visualizer. This on-line utility has a file conversion feature where you can have the track points reduced. However, after seeing what you have and want to accomplish (and the cache along a route limits of 500 miles and 500 track points) I would recommend the following:

 

Drag your KML file into Google Earth and you will see it. Use the Add > Path feature to create a new KML track for those portions of the trail you actually want to use. Just click points following the trail. You do not have to follow it exactly, because when you set up the PQ, you decide the distance on each side of the track to include caches, like a half mile or so. You can create multiple tracks,name them, and save them (right click on the Path name on the left side, then save-as.) Then use these to create your cache along a route PQs.

Link to comment

MapSource or EasyGPS aren't really options since I'm not running Windows.

It would be easier to help you if you let someone know what you were ruining in stead of letting them play "pin the tail on the donkey".

 

Without that I would have to say "yes it is easy to slit the file down, I use software to accomplish this."

Link to comment

Even after reducing the track points down, he needs to split his 2,000 miles into the maximum 500 mile segments. ("Routes need to be under 500 miles and less than 500 points.")

Since 500 miles is a long segment, and may result in missing caches in the PQ (PQ limit of 500 is only 1 per mile in a 500 mile track), I recommend a more refined approach of tracing the parts of the track that will actually be useful.

Link to comment

I have a kml trail that is well over the 500 point limitation imposed for CAR. Is there an easy way to split to down?

 

Do you want to *split* it in parts (of 500 points) or reduce the number of points?

A "little bit" of softening of the trail (reducing the number of points) probably wouldn't be objectionable, but the main goal is to split it into parts.

Link to comment

A "little bit" of softening of the trail (reducing the number of points) probably wouldn't be objectionable, but the main goal is to split it into parts.

 

I have a solution, but I'm nost sure if it is easy enough to you. I wrote a lightweight python library than can manipulate GPX files. With gpsbabel you can convert KML to GPX files (and back). Writing a python script that splits a GPX file into parts of 500 points each is trivial (at least if you know the basics of programming).

 

If you want to try it, the library is open source, you can found it here https://github.com/tkrajina/gpxpy. Alternatively, you can try trackprofiler but this solution requires some manual work to split the track into segments (if track segments are a solution?).

Link to comment

If you want to try it, the library is open source, you can found it here https://github.com/tkrajina/gpxpy. Alternatively, you can try trackprofiler but this solution requires some manual work to split the track into segments (if track segments are a solution?).

Trackprofiler upload link doesn't work all by itself. Do you have to register to use it?

 

It works for me. Here's an example Potok Banina). Can you see it? I know there are issues when uploading big files, because the site is running on google app engine which have limitations on upload file size. What file format did you try to upload?

Link to comment

If you want to try it, the library is open source, you can found it here https://github.com/tkrajina/gpxpy. Alternatively, you can try trackprofiler but this solution requires some manual work to split the track into segments (if track segments are a solution?).

Trackprofiler upload link doesn't work all by itself. Do you have to register to use it?

 

It works for me. Here's an example Potok Banina). Can you see it? I know there are issues when uploading big files, because the site is running on google app engine which have limitations on upload file size. What file format did you try to upload?

When I click the upload button I get this "Page not found". Using Firefox.

Link to comment

When I click the upload button I get this "Page not found". Using Firefox.

 

I'd like to investigeta what's the problem but can't without your track file. Would it be possible if you send it to me via email?

 

Don't understand how the track file would help. The problem is the upload button links to a "not found" page. Seems more like a site problem to me.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...