2

I'm using PostGIS. When I enter the following, you can see that the input point is transformed:

=# SELECT ST_ASEWKT(ST_GeographyFromText('POINT(-33.7832527413259  151.120353207011)'));                                          
NOTICE:  Coordinate values were coerced into range [-180 -90, 180 90] for GEOGRAPHY
                     st_asewkt                      
----------------------------------------------------
 SRID=4326;POINT(-33.7832527413259 28.879646792989)
(1 row)

Firstly I don't understand why the point is transformed (it's for a point in Sydney Australia so it's a real lat/lon) nor can I work out how to get the original lon value back (~123 is an odd size difference)

Any suggestions (probably a bit of a noob question as this is my first use of a GIS system)

1 Answer 1

4

Your coordinates in the input point are backwards, try

SELECT ST_ASEWKT(ST_GeographyFromText('POINT(151.120353207011 -33.7832527413259)'));
1
  • Now you say that I realise you are correct, thanks.
    – Ivan Wills
    Nov 24, 2015 at 1:19

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.