Hi,
As you declared your input shapefile to be in 4326 (which is lat/lon),
Postgis doesn't transform anything in your coordinates when you ask for
lat/lon.
Try to set the proper SRID for Dubai Local Transverse Mercator using
SELECT setSRID(the_geom,the_srid) FROM ult.test2;
Note that you may have to drop a constraint forcing your srid to be 4326
first.
Regards,
Guillaume
On 03/05/2010 09:03, Mehmet Erkek wrote:
Hi All,
I havea a shape file which I imported it to a table called ‘test2’
(using SRID=4326). I want to get centroids of geometries in lat/lon.
Here is what I run:
select ST_AsText( ST_Transform(centroid(the_geom),4326)) from ult.test2
limit 5;
and what I get:
POINT(496597.996430787 2774798.21242881)
POINT(496332.629887436 2793339.61534586)
POINT(496302.627327975 2793317.82477318)
POINT(496305.255261594 2793353.29646291)
POINT(496241.538851096 2774826.65593589)
So far all is fine except coordinates which are not latitude/longitude
*_My question is : How can I convert/get these coordinates in lat/lon?_*
This what I have in my prj file:
PROJCS["Dubai Local Transverse Mercator
(DLTM)",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",55.33333333333334],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]
And this is my postgis version: POSTGIS="1.3.6" GEOS="2.2.3-CAPI-1.1.1"
PROJ="Rel. 4.7.1, 23 September 2009" USE_STATS
I appreciate any help. Thank you.
-------------------------------------------------------------------
*Mehmet ERKEK***
www.REIDIN.com <http://www.reidin.com/>
This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately and delete
the original. Any other use of the email by you is prohibited. Please
Consider the Environment Before Printing This Email
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users