[gdal-dev] PG: does OGR2OGR set the SRID correctly ?

Jorge Arévalo jorge.arevalo at deimos-space.com
Tue Nov 30 05:52:47 EST 2010


On Tue, Nov 30, 2010 at 11:30 AM, Sebastian E. Ovide
<sebastian.ovide at gmail.com> wrote:
> Hi All,
> I've just uploaded a shape with
> ogr2ogr -f PostgreSQL "PG:dbname='gis' host='10.0.1.40' port='5432'
> user='gis' password='gis'"  sebas.shp -lco 27700 -lco PRECISION=NO -progress
> -lco OVERWRITE=yes -lco dim=2 -nln sebas -overwrite
> but from
> select ST_SRID(wkb_geometry) from sebas;
> I'm getting 3
> (with
> select ST_SRID(ST_SetSRID(wkb_geometry,27700)) from sebas;
> I'm getting the right value )
> any ideas ?
>
>
> --
> Sebastian E. Ovide
>
>
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>

Hi Sebastian,

Did you test this?

ogr2ogr -f PostgreSQL -a_srs <the data srid> "PG:dbname='gis'
host='10.0.1.40' port='5432' user='gis' password='gis'"  sebas.shp
-lco 27700 -lco PRECISION=NO -progress -lco OVERWRITE=yes -lco dim=2
-nln sebas -overwrite

-- 
Jorge Arévalo
Internet & Mobilty Division, DEIMOS
jorge.arevalo at deimos-space.com
http://mobility.grupodeimos.com/
http://gis4free.wordpress.com


More information about the gdal-dev mailing list