[GRASS-dev] nasty gotcha in alternate ogr2ogr solution comment

Hamish hamish_b at yahoo.com
Mon Nov 3 06:18:06 EST 2008


> > Author: hamish
> > Date: 2008-11-02 06:54:33 -0500 (Sun, 02 Nov 2008)
> > New Revision: 34139
> >
> > Modified:
> >   grass/trunk/scripts/v.out.gps/v.out.gps
> > Log:
> > comments about nasty gotcha in alternate ogr2ogr
> solution (merge from devbr6)
> ...
> > +#     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.
> 
> hi Hamish,
> 
> curious - what does that mean? To use ogr2ogr in
> conjunction with
> g.proj -wf is one of my favourites... but is
> 
> GRASS 6.4.svn (latlong_tbe_climate):~ > g.proj -wf
> GEOGCS["wgs84",DATUM["WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563],
> TOWGS84[0.000,0.000,0.000]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]
> 
> sufficient to work around the indicated '+nadgrids will be ignored'
> problem?


If ogr2ogr is given PROJ.4 +terms the OGR srs reading FN ignores anything
it can't parse, which includes +nadgrids with filename. so ogr2ogr skips
+nadgrids file unless the +wktext param is added then it doesn't try to
match terms and passes literally.. FW says it better:
 http://trac.osgeo.org/gdal/changeset/15681
  (google: nadgrids+ogr2ogr for ML)

AFAICT `g.proj -wf` doesn't include grid file, while `g.proj -jf` does.
So I think my "best use `g.proj -wf` in that case" might be wrong as it
drops the grid file, so really best to use:

IN_PROJ="`g.proj -jf` +wktext"

http://trac.osgeo.org/gdal/ticket/2638#comment:6
http://trac.osgeo.org/gdal/changeset/15681



Hamish



      



More information about the grass-dev mailing list