[postgis-users] Re: Projection...
wacek at adams.szczecin.pl
Fri Sep 23 00:04:56 PDT 2005
On Thu, Sep 22, 2005 at 04:36:22PM +0200, Nicolas Ribot wrote:
>>> > Hi,
>>> > I have some data from USA in 'NAD83 Nevada East' fromat (EPSG:32107 -
>>> > ?). I want to change it to WGS84 (EPSG:4326) using PostGIS. When I use:
>>> > "select updategeometrysrid('table', 'the_geom', 4326);" resulting values
>>> > are'nt correct. What am I doing wrong?
>>> > Thanks in advance for your replies.
>>> > Best regards
>>> > Wacek
>> Hi Wacek,
>> calling updategeometrysrid only changes the internal geometries SRID.
>> It does not reproject them.
>> You have to explicitly transform the geometries from the source
>> coordinates system to the target one, using the tranform() function.
>> select transform(the_geom, 4326) from table;
>> You can either create a new table containing the transformed
>> geometries, or drop SRID constraint on your table, transform the
>> geometries and re-add the SRID constraint adapted to the new
>> geometries' SRID
SELECT updateGeometrySRID('mytable', 'the_geom', 4326);
UPDATE mytable set the_geom =
transform(SetSRID(the_geom, 32107), 4326);
This works but values after reprojection aren't quite correct (every point has the same coordinates). I have checked reprojecting my own points between these two SRIDs and it is correct. I am wondering if the source data SRID is really 32107 ('NAD83 Nevada East'). Vendor does not provide such information. To check this I use UDIG ('User-friendly Desktop Internet GIS') and his layer information feature. After adding a layer from file the visualisation is OK, but after exporting it to DB and trying to visualize it from there no features are rendered. That's why I am asking about reprojecting this data to SRID:4326. I am using source file http://gisgate.co.clark.nv.us/gismo/downloads/scl_l.zip containing streets in Clark County in USA. How can I check what SRID is my source data? Maybe someone can try reprojecting source data I have mentioned to 4326 and tell me about the results.
Thanks a lot for your previous posts and looking forward for some new :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the postgis-users