DISCUSSION TAKEN FROM MAGIP LISTSERV
On Behalf Of Daigle, BillSent: Monday, August 09, 2010 10:16 AMTo: MAGIP DISCUSSION LISTSubject: RE:[magip] Polyline feature class to GPX conversion
I haven’t had to do this yet, but I can certainly see the need somewhere down the road. It should relatively simple via python. ESRI recently posted a blog and associated python scripts(10 and 9.3.1) for converting gpx files to feature classes.
It doesn’t look like it would be too hard to reverse engineer the script to produce gpx files from a polyline. Here is a python example for creating xml with python: http://www.postneo.com/projects/pyxml/. The tough part would certainly be accounting for the gpx schema: http://www.topografix.com/gpx/1/1/
Good luck! Bill
Bill Daigle Montana Fish, Wildlife & Parks Strategic Planning and Data Services Fisheries Information Specialist1420 East 6th AvePO Box 200701Helena, MT email@example.comPhone: 406-444-3737
On Behalf Of Michael SweetSent: Monday, August 09, 2010 9:20 AMTo: MAGIP DISCUSSION LISTSubject: [magip] Polyline feature class to GPX conversion
Hello fellow GISers – I’ve been looking at various options to automate the production of valid GPX format GPS files from an ArcGIS feature class for national wilderness boundaries. I’ve received good assistance from a few folks in other states who have had a similar need in the past, but realized that I neglected to ask my fellow Montanans. If you already have a successful automated routine for this conversion then I would be interested in hearing about your approach. Please feel free to contact me directly.
Unfortunately, the FME/ESRI interoperability extension reads, but does not write GPX. That would be too easy.
Thanks in advance,
Michael D. Sweet
Research and Information Systems Specialist (GIS)
Quantitative Services Group and Montana Climate Office
College of Forestry and Conservation
The University of Montana
Montana Forest and Conservation Experiment Station
32 Campus Drive
Missoula, Montana 59812-0576
I found an open source utility/library that will convert a polyline to a GPX route. The current Python approach is to convert a polygon to a polyline using ArcGIS geoprocessing, export as a shapefile, then pass the shapefile to ogr2gui. Ogr2gui can covert the shapefile to a GPX file using a DOS command line call from within Python.
"ogr2gui is an application used to convert and manipulate geospatial data. It is based on ogr2ogr, a command line utility from the "Geospatial Data Abstraction Library" (gdal.org)"
© Montana Association of Geographic Information Professionals
MAGIP is a 501(c)6 non-profit organization in Montana
Full Scope Association and Event Management
1236 North Ave. W, Missoula, MT 59801