gis - Postgis ST_Transform -


i have point (x, y) srid 900913. transform srid 2180 , again srid 900913. imo should have same point, differs. why?

select st_x (st_transform(st_transform(st_geomfromtext('point(21.01233628836129 52.23044648850736)', 900913), 2180), 900913)), st_y(st_transform(st_transform(st_geomfromtext('point(21.01233628836129 52.23044648850736)', 900913), 2180), 900913)); 

the quick answer why 2 transformations different because of common confusion of projection systems.

the coordinate point(21.01233628836129 52.23044648850736) on spherical mercator projection @ 0°0'1.689"n 0°0'0.680"e, way outside poland, makes difficult or typically impossible reproject else.

the coordinates looking @ most likely longitude/latitude on wgs 84 (epsg:4326).

i think exercise attempting (latlon_check in particular):

select st_aslatlontext(geom) latlontext,   st_aslatlontext(st_transform(st_transform(geom, 2180), 4326)) latlon_check,   st_astext(st_transform(geom, 2180)) poland_cs92,   st_astext(st_transform(geom, 900913)) spherical_mercator st_geomfromtext('point(21.01233628836129 52.23044648850736)', 4326) geom;  -[ record 1 ]------+---------------------------------------- latlontext         | 52°13'49.607"n 21°0'44.411"e latlon_check       | 52°13'49.607"n 21°0'44.411"e poland_cs92        | point(637389.203455155 486840.46005323) spherical_mercator | point(2339082.5759974 6841900.8700405) 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -