Difference between revisions of "Converting GPX files to Shapefiles"

From stgo
Jump to: navigation, search
(Created page with 'back to Movement Analysis ---- This was from a OpenJUMP GIS user, sent on the OJ user email list (21 Nov. 2011): You can use [http://www.gdal.org/ogr/ ogr2ogr] for conve…')
 
 
Line 8: Line 8:
 
there are several layers in a GPX file as listed by ogrinfo
 
there are several layers in a GPX file as listed by ogrinfo
  
 +
<pre>
 
C:\data\OSM>ogrinfo test.gpx
 
C:\data\OSM>ogrinfo test.gpx
 +
 
Had to open data source read-only.
 
Had to open data source read-only.
 
INFO: Open of `test.gpx'
 
INFO: Open of `test.gpx'
Line 17: Line 19:
 
4: route_points (Point)
 
4: route_points (Point)
 
5: track_points (Point)
 
5: track_points (Point)
 +
</pre>
  
 
Command to use is like
 
Command to use is like
  
ogrinfo -f "ESRI Shapefile" tracks_out.shp test.gpx tracks
+
ogrinfo -f "ESRI Shapefile" tracks_out.shp test.gpx tracks
  
 
- f outputformat (optional in this case, .shp is the default)
 
- f outputformat (optional in this case, .shp is the default)

Latest revision as of 01:55, 22 November 2011

back to Movement Analysis


This was from a OpenJUMP GIS user, sent on the OJ user email list (21 Nov. 2011):

You can use ogr2ogr for converting GPX files into shapefiles. Note that there are several layers in a GPX file as listed by ogrinfo

C:\data\OSM>ogrinfo test.gpx

Had to open data source read-only.
INFO: Open of `test.gpx'
      using driver `GPX' successful.
1: waypoints (Point)
2: routes (Line String)
3: tracks (Multi Line String)
4: route_points (Point)
5: track_points (Point)

Command to use is like

ogrinfo -f "ESRI Shapefile" tracks_out.shp test.gpx tracks

- f outputformat (optional in this case, .shp is the default) output file input file input layer

GPX plugin and live GPS has worked for me but I have not used them recently.

-Jukka Rahkonen-