I think is better explain with a small example: selected a geometry point i get it back in a coordinate pair

SELECT ST_AsGeoJSON('010100002031BF0D009A999919F9BD2D41CDCCCC4C758E5241')

to return back the geometry simply i make

SELECT ST_GeometryFromText('POINT(974588.55 4864469.2)')

having for example the same pair of coordinates but in a different "form" (srid?)


How i can transform them into the previous pair? I know,i'm a bit confused about all this stuff, where i can find a good reading source?

  • ST_Transform is the SQL function you want. There are plenty of examples in postgis.org/docs/ST_Transform.html – BradHards Aug 22 '15 at 0:31
  • i have read documentation but i have not find the way, because i don't know in what type of srid they are, i'll try to look better, where i can find a guide to understand difference between srid systems? – gaia Aug 22 '15 at 0:35
  • Do you know anything about projections? – BradHards Aug 22 '15 at 0:36
  • no, i'm noob, i think wiki can be a good starting projected point :) – gaia Aug 22 '15 at 0:47
  • There are lots of hits you can get from google searches, but because the concept is inherently about converting from 3D to 2D, I think animations help, which is why the online course I put into my answer is a good idea. – BradHards Aug 22 '15 at 0:56

If you're not familiar with projections and the like, you might want to do the NOAA course on this: http://coast.noaa.gov/digitalcoast/training/datums (note that you do need Flash, and its narrated so you need sound; but you can skip the registration if you like, and the ArcGIS specific parts at the end are obviously not needed).

Once you have an understanding of what type of changes you are making, then you can do the change.

Note that the SRID for some data types (including WKT and WKB) is implicit (usually mapped to SRID of 0 or -1; indicating "unknown"). Therefore you have to know where the data came from, or guess the SRID based on knowing what some of the data represents. There are extensions to WKT and WKB that are used in PostGIS that make it explicit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.