[postgis-users] couldn't get the correct projected values

Paragon Corporation lr at pcorp.us
Fri May 16 03:17:44 PDT 2008


You are confusing setsrid with transform.

Remember setsrid - doesn't change the geometry it simple certifies that a
geometry is of a particular projection - basically 

I am because I say I am


Transform - moves a geometry from one projection to another

I am not , but please make me so.  Of course the please make me so will fail
if you don't know what it is  to begin with


So all being said, your statement 2 is wrong and should be

update izmir_il4 set the_geom=Transform(the_geom,32635);

Hope that helps,
Regina

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of orkun
Sent: Friday, May 16, 2008 4:00 AM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] couldn't get the correct projected values

hello

whatever I have done, I couldn't get the correct projected values in postgis
environment.

1. # lon/lat to utm projection 

create table izmir_il4 as select
gid,il_kod,iladi,transform(the_geom,32635) as the_geom from il_izmir3; 

2.
update izmir_il4 set the_geom=setsrid(the_geom,32635);

3. 

select extent(the_geom) from izmir_il4;

extent                                  
--------------------------------------------------------------------------
BOX(26.2226982116699 37.8668251037598,28.4587249755859 39.3925666809082)

but these are not utm values. They are still in lon/lat values

I checked extent values with proj values. I got correct values:

echo "26.2226982116699 37.8668251037598" | proj +proj=utm +zone=35
+ellps=WGS84 +datum=WGS84   
431631.23       4191323.84
orkun at orkun-desktop:/usr/local/izmir/veri/izmir3$ echo "28.4587249755859
39.3925666809082" | proj +proj=utm +zone=35 +ellps=WGS84 +datum=WGS84   
625615.27       4361356.53


how can get values generated from "proj" in postgis environment ?
what am I doing wrong ?

here is the srid values of 32635 :
32635 | +proj=utm +zone=35 +ellps=WGS84 +datum=WGS84 +units=m +no_defs

regards

--
Ahmet Temiz
Jeo. Müh.
Afet Isleri Gen. Md.lügü
Deprem Ar. D.

Ahmet Temiz
Geo. Eng.
General Dir. of
Disaster Affairs



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users






More information about the postgis-users mailing list