Hi Even,<div><br></div><div>I've missed that part...</div><div><br></div><div>just to confirm that with <span class="Apple-style-span" style="font-family: 'Lucida Grande', Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(46, 46, 46); "><strong class="command" style="font-weight: normal; font-family: 'Courier New', Courier, Monaco, monospace; color: rgb(0, 0, 0); ">psql -d [yourdatabase] -f spatial_ref_sys.sql and deleting those extra lines created automatically, now I can upload shapes with the right SRID</strong></span></div>
<div><font class="Apple-style-span" face="'Courier New', Courier, Monaco, monospace"><br></font></div><div><span class="Apple-style-span" style="color: rgb(46, 46, 46); "><strong class="command" style="font-weight: normal; color: rgb(0, 0, 0); "></strong></span><font class="Apple-style-span" face="'Courier New', Courier, Monaco, monospace">thanks !<br>
</font><br><div class="gmail_quote">On Tue, Nov 30, 2010 at 2:32 PM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@mines-paris.org">even.rouault@mines-paris.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Sebastian,<br>
<br>
I'd suggest checking what I wrote at the end of my previous email : "Make sure<br>
<div class="im">you've filled the spatial_ref_sys table with the appropriate PostGIS .sql<br>
script. The '3' you get sounds like the spatial_ref_sys table of this database<br>
was empty and that the PG driver added new entries in it."<br>
<br>
</div>The mentionned .sql script is spatial_ref_sys.sql. See<br>
<a href="http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392" target="_blank">http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392</a><br>
<div><div></div><div class="h5"><br>
> I've replaced the -lco 27700 with -a_srs EPSG:27700<br>
><br>
> now select ST_SRID(wkb_geometry) from sebas<br>
><br>
> gives 4...<br>
><br>
> any ideas ?<br>
><br>
> On Tue, Nov 30, 2010 at 10:59 AM, Even Rouault <<a href="mailto:even.rouault@mines-paris.org">even.rouault@mines-paris.org</a><br>
> > wrote:<br>
><br>
> > Selon "Sebastian E. Ovide" <<a href="mailto:sebastian.ovide@gmail.com">sebastian.ovide@gmail.com</a>>:<br>
> > Sebastian,<br>
> ><br>
> > The option "-lco 27700" has no effect. The correct syntax would be<br>
> > something<br>
> > like "-lco SRID=27700", but there's no such option, so don't loose your<br>
> > time<br>
> > trying that ;-)<br>
> ><br>
> > The SRID is set automatically by comparing the SRS of the source layer with<br>
> > what<br>
> > exists in the spatial_ref_sys table (or the one you can set with the -a_srs<br>
> > EPSG:27700 as suggested by Jorge). If there's a match, then the SRID from<br>
> > spatial_ref_sys will be used. Otherwise the PG driver will add a new entry<br>
> > in<br>
> > the spatial_ref_sys table (and the SRID number will not be equal to the<br>
> > EPSG<br>
> > code). Make sure you've filled the spatial_ref_sys table<br>
> > with the appropriate PostGIS .sql script. The '3' you get sounds like the<br>
> > spatial_ref_sys table of this database was empty and that the PG driver<br>
> > added<br>
> > new entries in it.<br>
> ><br>
> > Best regards,<br>
> ><br>
> > > Hi All,<br>
> > ><br>
> > > I've just uploaded a shape with<br>
> > ><br>
> > > ogr2ogr -f PostgreSQL "PG:dbname='gis' host='10.0.1.40' port='5432'<br>
> > > user='gis' password='gis'" sebas.shp -lco 27700 -lco PRECISION=NO<br>
> > -progress<br>
> > > -lco OVERWRITE=yes -lco dim=2 -nln sebas -overwrite<br>
> > ><br>
> > > but from<br>
> > ><br>
> > > select ST_SRID(wkb_geometry) from sebas;<br>
> > ><br>
> > > I'm getting 3<br>
> > ><br>
> > > (with<br>
> > ><br>
> > > select ST_SRID(ST_SetSRID(wkb_geometry,27700)) from sebas;<br>
> > ><br>
> > > I'm getting the right value )<br>
> > ><br>
> > > any ideas ?<br>
> > ><br>
> > ><br>
> > ><br>
> > > --<br>
> > > Sebastian E. Ovide<br>
> > ><br>
> ><br>
> ><br>
> ><br>
><br>
><br>
> --<br>
> Sebastian E. Ovide<br>
><br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Sebastian E. Ovide<br><br><br><br><br>
</div>