[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    [postgis-users] Re: Projection...
From:       Wacek <wacek () adams ! szczecin ! pl>
Date:       2005-09-23 7:04:56
Message-ID: 4333A918.4070800 () adams ! szczecin ! pl
[Download RAW message or body]

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
> 
> 

Or:
	SELECT updateGeometrySRID('mytable', 'the_geom', 4326);
	UPDATE mytable set the_geom =
		transform(SetSRID(the_geom, 32107), 4326);

--strk;

----------------------------------

Hi, again.

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 :)

Wacek


[Attachment #3 (text/html)]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<pre wrap="">
On Thu, Sep 22, 2005 at 04:36:22PM +0200, Nicolas Ribot wrote:
</pre>
<blockquote type="cite">
  <blockquote type="cite">
    <pre wrap=""><span class="moz-txt-citetags">&gt; &gt; </span>Hi,
<span class="moz-txt-citetags">&gt; &gt;</span>
<span class="moz-txt-citetags">&gt; &gt; </span>I have some data from USA in 'NAD83 \
Nevada East' fromat (EPSG:32107 - <span class="moz-txt-citetags">&gt; &gt; </span>?). \
I want to change it to WGS84 (EPSG:4326) using PostGIS. When I use: <span \
class="moz-txt-citetags">&gt; &gt;</span> <span class="moz-txt-citetags">&gt; &gt; \
</span>"select updategeometrysrid('table', 'the_geom', 4326);" resulting values <span \
class="moz-txt-citetags">&gt; &gt; </span>are'nt correct. What am I doing wrong? \
<span class="moz-txt-citetags">&gt; &gt;</span> <span class="moz-txt-citetags">&gt; \
&gt; </span>Thanks in advance for your replies. <span class="moz-txt-citetags">&gt; \
&gt;</span> <span class="moz-txt-citetags">&gt; &gt; </span>Best regards
<span class="moz-txt-citetags">&gt; &gt; </span>Wacek
<span class="moz-txt-citetags">&gt; &gt;</span>
    </pre>
  </blockquote>
  <pre wrap=""><span class="moz-txt-citetags">&gt; </span>
<span class="moz-txt-citetags">&gt; </span>Hi Wacek,
<span class="moz-txt-citetags">&gt; </span>
<span class="moz-txt-citetags">&gt; </span>calling updategeometrysrid only changes \
the internal geometries SRID. <span class="moz-txt-citetags">&gt; </span>It does not \
reproject them. <span class="moz-txt-citetags">&gt; </span>You have to explicitly \
transform the geometries from the source <span class="moz-txt-citetags">&gt; \
</span>coordinates system to the target one, using the tranform() function. <span \
class="moz-txt-citetags">&gt; </span> <span class="moz-txt-citetags">&gt; \
</span>select transform(the_geom, 4326) from table; <span \
class="moz-txt-citetags">&gt; </span> <span class="moz-txt-citetags">&gt; </span>You \
can either create a new table containing the transformed <span \
class="moz-txt-citetags">&gt; </span>geometries, or drop SRID constraint on your \
table, transform the <span class="moz-txt-citetags">&gt; </span>geometries and re-add \
the SRID constraint adapted to the new <span class="moz-txt-citetags">&gt; \
</span>geometries' SRID  </pre>
</blockquote>
<pre wrap=""><!---->
Or:
	SELECT updateGeometrySRID('mytable', 'the_geom', 4326);
	UPDATE mytable set the_geom =
		transform(SetSRID(the_geom, 32107), 4326);

--strk;

----------------------------------

Hi, again.

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 <a \
class="moz-txt-link-freetext" \
href="http://gisgate.co.clark.nv.us/gismo/downloads/scl_l.zip">http://gisgate.co.clark.nv.us/gismo/downloads/scl_l.zip</a> \
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 :)

Wacek


</pre>
</body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic