GPSFileDepot Forums

General Category => Map Making Support => Topic started by: -Oz- on April 13, 2008, 07:19:59 AM

Title: GNIS to GPX Support Thread [Official]
Post by: -Oz- on April 13, 2008, 07:19:59 AM
THIS SYSTEM NO LONGER FUNCTIONS. Check out this tutorial here (

Discuss any issues you have regarding the GNIS to GPX converter ( program in this thread.
Title: Re: GNIS to GPX Support Thread [Official]
Post by: cbellevie on January 15, 2009, 09:39:25 AM
I thought I'd use the official thread  ;)

I'm converting GNIS csv files and when converting summits, selected to append the elevation to the name (great feature!). Instead of appending the elevation in feet, it appears to be adding to elevation in meters. Did the file structure of the csv files possible change since the tool was written?

The header on the GNIS csv files reads:

"Feature name","Feature Id","Class","County","Latitude","Longitude","State","Map**","Ele(m)*","Ele(ft)*","BGN","Entry Date"

The resulting gpx file in turn produces the elevation in meters within <ele></ele>, which may or may not be the desired result of the tool (my assumption was not because when appending the elevation on summits it adds 'ft' to the elevation).

I guess my questions are: Is the elevation handed off to the gpx file supposed to be in meters? If not, any ideas for a work around this (aside from changing the script)?

This is a *great* tool and very much appreciated!
Title: Re: GNIS to GPX Support Thread [Official]
Post by: cbellevie on January 15, 2009, 10:00:39 AM
Could I possibly just delete the "Ele(m)*" column from each csv to achieve the elevation in feet? Not sure what the script looks for in regards to the elevation so not sure if this will work or not.

Edit to note that the above appears to have worked  :)
Title: Re: GNIS to GPX Support Thread [Official]
Post by: -Oz- on January 15, 2009, 08:14:32 PM
They changed the file since I made it.

Try it now; should work for you and do everything in feet.
Title: Re: GNIS to GPX Support Thread [Official]
Post by: -Oz- on January 15, 2009, 08:15:09 PM
And your above change used to work, it won't work anymore.
Title: Re: GNIS to GPX Support Thread [Official]
Post by: cbellevie on January 15, 2009, 08:39:01 PM
I just processed an unedited csv file with schools and it looks like the correct elevation in feet was passed onto the gpx file  :)  Thanks so much for all the hard work!
Title: Re: GNIS to GPX Support Thread [Official]
Post by: -Oz- on January 16, 2009, 01:23:06 PM
Glad you caught it :)
Title: GNISTOGPX failure
Post by: krellor on January 16, 2009, 02:16:07 PM
When I use the gnistogpx.php util to convert a pipe delimited file, it churns away for a while and then gives the below error.  I am checking Append Elevation, and Make Garmin Ready. I got the file from the GNIS usgs download for all Washington State features.  As a sample, here are the first two lines of the file.

Code: [Select]
233358|Pacific Crest National Scenic Trail|Trail|CA|06|Alpine|003|382213N|1193751W|38.3701902|-119.6307276|||||2920|Sonora Pass|01/19/1981|

The error I receive is:
Quote from: server
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

The file is relatively large at 4.8mb, and has 34,734 lines.  Would it be the file size causing the problem?  Or some other issue?  Any insight would be appreciated.
Title: Re: GNISTOGPX failure
Post by: -Oz- on January 17, 2009, 06:02:54 PM
With a file that large I think it's probably getting bogged down.  My first suggestion would be to uncheck the "Make Garmin Ready" box and see if that fixes it.

My second suggestion is to just use my other program that does everything on your computer.  Now, I will admit it requires a lot of dependent software to be installed as well.

My third suggestion would be to open the CSV file and cut it in half.
Title: Re: GNISTOGPX failure
Post by: krellor on January 17, 2009, 10:15:54 PM
Well, I tried the GNIS process util earlier, but it gives me an out of bounds error on both my Vista and XP machine.  I have FWtools and the postgis table setup according to the tutorial, so I dunno what the problem is.  And I registered all of the VB6 dlls.  I'm optimistic that a couple of programs I wrote in C and C# will do the trick, although I will give your ideas a try just in case I did something wrong in my code.  :)
Title: Re: GNISTOGPX failure
Post by: krellor on January 17, 2009, 10:23:25 PM
Actually, I see that in tsnakes thread you mentioned fixing gnis process, and I gave it a try and it works like a charm.  Kind of sad now that I wrote those programs.  :)  I guess being a programmer every problem looks like it can be solved with a hammer (or code in this case).
Title: Tool is broken
Post by: magellan on April 15, 2009, 06:31:40 AM
The USGS GNIS to GPX Converter is not working at all anymore for me. Everytime I try to convert a file it takes forever, then says "500 internal service error." Is this happening for anyone else, and can it be fixed?
Title: Re: Tool is broken
Post by: -Oz- on April 16, 2009, 07:05:23 AM
What are you converting?  If I have a test file (attach to your post) I'll try and figure out whats going on.

But yea, gpsvisualizer will work for you; just use the pipe delimiter |