GPSFileDepot.com
 

News:

Welcome to GPSFileDepot!

Main Menu

GNIS to GPX Support Thread [Official]

Started by -Oz-, April 13, 2008, 08:19:59 AM

Previous topic - Next topic

-Oz-

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.
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

cbellevie

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!

cbellevie

#2
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  :)

-Oz-

They changed the file since I made it.

Try it now; should work for you and do everything in feet.
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

-Oz-

And your above change used to work, it won't work anymore.
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

cbellevie

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!

-Oz-

Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

krellor

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.


FEATURE_ID|FEATURE_NAME|FEATURE_CLASS|STATE_ALPHA|STATE_NUMERIC|COUNTY_NAME|COUNTY_NUMERIC|PRIMARY_LAT_DMS|PRIM_LONG_DMS|PRIM_LAT_DEC|PRIM_LONG_DEC|SOURCE_LAT_DMS|SOURCE_LONG_DMS|SOURCE_LAT_DEC|SOURCE_LONG_DEC|ELEVATION|MAP_NAME|DATE_CREATED|DATE_EDITED
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.

-Oz-

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. http://www.gpsfiledepot.com/tools/gnis_process.php

My third suggestion would be to open the CSV file and cut it in half.
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

krellor

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.  :)

krellor

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).

magellan

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?

-Oz-

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 |
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!