[GRASS-user] Grass7 - Inconsistencies with v.out.ogr and v.out.postgis

Mark Wynter mark at dimensionaledge.com
Fri Apr 26 19:01:23 PDT 2013


> Do you have fresh installation from svn?

Thanks Martin.  Good advice - I just pulled the latest from svn! 

v.out.postgis now works, generating correct feature count and SRID=2193

yet... v.out.ogr when writing directly to PostGIS  assigns SRID 900915 to the geometry column - when it should be 2193.  
SRID 2193 is in the PostGIS spatial_ref_sys table.  

v.out.ogr when writing to shapefile correctly assigns 2193 - see below.

Any idea as to why this is happening with v.out.ogr and PostGIS specifically?  I suspect it has something to do with SRID 2193 not being recognised (somewhere in the process), hence a new SRID is created?  Yet it works with v.out.postgis.


SELECT postgis_full_version();

                                                                           postgis_full_version                                                                            
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 POSTGIS="2.1.0SVN r11004" GEOS="3.3.8-CAPI-1.7.8" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.2, released 2012/10/08" LIBXML="2.7.8" LIBJSON="UNKNOWN" TOPOLOGY RASTER
(1 row)



> v.out.ogr input=osm_nz_roads_2193_cleaned type=line dsn=/var/tmp/osm_nz_roads_export.shp
> 
> ogrinfo -so osm_nz_roads_export.shp osm_nz_roads_export
> INFO: Open of `osm_nz_roads_export.shp'
>      using driver `ESRI Shapefile' successful.
> 
> Layer name: osm_nz_roads_export
> Geometry: Line String
> Feature Count: 176783
> Extent: (1148817.072845, 4793789.625743) - (2089039.165212, 6193819.546965)
> Layer SRS WKT:
> PROJCS["Transverse_Mercator",
>    GEOGCS["GCS_grs80",
>        DATUM["New_Zealand_Geodetic_Datum_2000",
>            SPHEROID["Geodetic_Reference_System_1980",6378137,298.257222101]],
>        PRIMEM["Greenwich",0],
>        UNIT["Degree",0.017453292519943295]],
>    PROJECTION["Transverse_Mercator"],
>    PARAMETER["latitude_of_origin",0],
>    PARAMETER["central_meridian",173],
>    PARAMETER["scale_factor",0.9996],
>    PARAMETER["false_easting",1600000],
>    PARAMETER["false_northing",10000000],
>    UNIT["Meter",1]]
> cat: Integer (10.0)
> osm_id: Integer (10.0)
> name: String (255.0)
> highway: String (255.0)
> bridge: Integer (10.0)
> oneway: Integer (10.0)
> driveable: Integer (10.0)
> trainable: Integer (10.0)
> walkable: Integer (10.0)
> cycleable: Integer (10.0)
> ignore: Integer (10.0)


More information about the grass-user mailing list