[GRASS-SVN] r42100 -
grass/branches/develbranch_6/scripts/v.in.gpsbabel
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon May 3 20:33:01 EDT 2010
Author: hamish
Date: 2010-05-03 20:32:59 -0400 (Mon, 03 May 2010)
New Revision: 42100
Modified:
grass/branches/develbranch_6/scripts/v.in.gpsbabel/v.in.gpsbabel
Log:
stub for using OGR's GPX driver instead of custom parsing
Modified: grass/branches/develbranch_6/scripts/v.in.gpsbabel/v.in.gpsbabel
===================================================================
--- grass/branches/develbranch_6/scripts/v.in.gpsbabel/v.in.gpsbabel 2010-05-03 23:21:34 UTC (rev 42099)
+++ grass/branches/develbranch_6/scripts/v.in.gpsbabel/v.in.gpsbabel 2010-05-04 00:32:59 UTC (rev 42100)
@@ -135,6 +135,13 @@
exit 1
fi
+if [ `ogr2ogr --formats | grep -cw GPX` -eq 1 ] ; then
+ g.message -v "OGR is GPX capable."
+ OGR_GPX=1
+else
+ OGR_GPX=0
+fi
+
#### set temporary files
TEMPFILE="`g.tempfile pid=$$`"
if [ $? -ne 0 ] || [ -z "$TEMPFILE" ] ; then
@@ -362,7 +369,18 @@
#### prepare line components
if [ $RTE -eq 1 ] ; then
-
+
+ if [ $ORG_GPX -eq 1 ] ; then
+ # http://www.gdal.org/ogr/drv_gpx.html
+ # make it really easy ; but need to reproject from WGS84/LL.
+ # use '-c location=', then v.proj it in, then rm -rf the temp locn?
+ #? GPX_USE_EXTENSIONS=YES
+ #? export GPX_USE_EXTENSIONS
+ #v.in.ogr dsn="$TEMPFILE.gpx" out=$map_name
+ echo
+ fi
+
+
# this part is quite difficult using gpx... I'll explain all I've done
# if someone has any suggest please mail!!!!
More information about the grass-commit
mailing list