Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

In example of the page ST_Project the select is

SELECT ST_AsText(ST_Project('POINT(0 0)'::geography, 100000, 45));
                  st_astext
    ------------------------------------------
     POINT(0.63523102912532 0.63947233472882)
    (1 row)

But, in my enviroment this code give me an error like "Azimuth must be between -2PI and 2PI".

After a few tryings I solve with :

SELECT ST_AsText(ST_Project('POINT(0 0)'::geography, 100000, radians(45) ))

The sample in page tells the data type expected is in degrees, and the function expects radians.

May I using wrong PostGIS version?

Thanks.

BTW : My PostGIS version : 2.0

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Please consult how to report documentation issues. I have the same behavior.

POSTGIS="2.0.1 r9979" GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.2, released 2012/10/08" LIBXML="2.7.8" TOPOLOGY RASTER

share|improve this answer
1  
Thanks. I think it's too soon to believe its a documentation issue. Hard to believe we are wrong, but I will wait for a few days for others users to confirm. Accept your answer because I think the same. –  Magno C Nov 28 '12 at 15:07
1  
Here's ticket about this issue: trac.osgeo.org/postgis/ticket/657 –  Vladimir Nov 28 '12 at 19:39
    
Hum. Looks like radians was adopted. Needs to be converted if I want to use degrees. The manual realy is incorrect. Thanks for your help. –  Magno C Nov 29 '12 at 0:52
add comment

FWIW: I have updated the documentation and just a heads up the new doc location is at

http://postgis.net/documentation

For this specific:

http://postgis.net/docs/manual-dev/ST_Project.html

share|improve this answer
    
Thanks for share. –  Magno C Jan 28 '13 at 9:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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