GPSBabel GPX -> CSV

 

I just ran a conversion from KML to GPX to CSV using GPSBabel. The KML to GPX conversion went just fine. But in the GPX to CSV conversion, the software swapped the latitude and longitude values for each POI. Is there a setting I should be aware of in GPSBabel to preclude this?

Thanks.

A setting (or three)

Assuming you really do want to go from kml to csv (rather than kml to gpx), you can do it in one step.

What you need, is an xcsv 'style' file for gpsbabel.
The style file needs to contain something along the lines of:-

DESCRIPTION Garmin CSV File for POI Loader
EXTENSION csv
FIELD_DELIMITER COMMA
RECORD_DELIMITER NEWLINE
BADCHARS COMMA
SHORTLEN 24
IFIELD LON_HUMAN_READABLE, "", "%08.5f"
IFIELD LAT_HUMAN_READABLE, "", "%08.5f"
IFIELD SHORTNAME, "", "%s"
IFIELD DESCRIPTION, "", "%s"
OFIELD LON_DECIMAL, "", "%08.5f"
OFIELD LAT_DECIMAL, "", "%08.5f"
OFIELD SHORTNAME, "", "%-.24s"
OFIELD DESCRIPTION, "", "%-.50s"

Then you tell gpsbabel to use it:

Assuming

input kml file is INPUT.KML
output csv file is OUTPUT.CSV
'style' file is GARMIN.STYLE

The command line is :-

gpsbabel -w -i kml -f "INPUT.KML"
-o xcsv,style=GARMIN.STYLE -F "OUTPUT.CSV"

 
 
Can I mention that GeePeeEx Editor will read KML files, to use as the basis of your POI's. It will also convert .csv and .gpx to .kml. (The latter functionality is fully active, even in the trial version)

--
------------------------ Phil Hornby, Stockport, England ----------------------               http://GeePeeEx.com - Garmin POI Creation made easy           »      

GeePeeEx

Hornbyp wrote:

Can I mention that GeePeeEx Editor will read KML files, to use as the basis of your POI's. It will also convert .csv and .gpx to .kml. (The latter functionality is fully active, even in the trial version)

Thanks...I think I'll go ahead and register GeePeeEx rather than go through that nightmare with GPSBabel. I've been spotting locations in Google Earth for POI's but I've been lacking a good way to convert them to .csv. It sounds like GeePeeEx is the answer.