Bläddra i källkod

fix +wktext comment, need to copy over DB to reproj map: only works from current mapset

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@34152 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 16 år sedan
förälder
incheckning
24a2fee304
1 ändrade filer med 20 tillägg och 2 borttagningar
  1. 20 2
      scripts/v.out.gps/v.out.gps

+ 20 - 2
scripts/v.out.gps/v.out.gps

@@ -262,6 +262,24 @@ if [ $? -ne 0 ] ; then
 fi
 
 
+# don't v.db.connect directly as source table will be removed with
+# temporary map in that case. So we copy it first but this fails when
+# the map (ie table) is in another mapset.  ?
+db.copy from_table="$INMAP" to_table="tmp_vogb_epsg4326_$$"
+if [ $? -ne 0 ] ; then
+    g.message -e "Error copying temporary DB"
+    cleanup
+    exit 1
+fi
+
+v.db.connect map="tmp_vogb_epsg4326_$$" table="tmp_vogb_epsg4326_$$" --quiet
+if [ $? -ne 0 ] ; then
+    g.message -e "Error reconnecting temporary DB"
+    cleanup
+    exit 1
+fi
+
+
 # export as GPX using v.out.ogr
 if [ $TRK -eq 1 ] ; then
    LINETYPE="lco=FORCE_GPX_TRACK=YES"
@@ -276,8 +294,8 @@ fi
 #   v.out.ogr -> shapefile -> GPX works, but we try to avoid that as it's
 #     lossy. Also that would allow ogr2ogr -a_srs $IN_PROJ -t_srs EPSG:4326
 #     so skip m.proj pains.. if that is done ogr2ogr -a_srs MUST HAVE +wktext
-#     with PROJ.4 terms or else the +nadgrids will be ignored! (best to feed
-#     it g.proj -wf) in that case.
+#     with PROJ.4 terms or else the +nadgrids will be ignored! best to feed
+#     it  IN_PROJ="`g.proj -jf` +wktext"  in that case.
 
 g.message -v "Exporting data ..."