Ticket #1937 (closed defect: invalid)
must specify "true" to st_length when casting to geography
| Reported by: | bcrosby | Owned by: | pramsey |
|---|---|---|---|
| Priority: | medium | Milestone: | PostGIS 2.0.2 |
| Component: | postgis | Version: | 2.0.x |
| Keywords: | Cc: |
Description
The following:
st_length(ST_MakeLine(ARRAY[st_geomfromewkt('SRID=4326;POINT(-79.3687166666667 43.86085)'), st_geomfromewkt('SRID=4326;POINT(-73.7409333333333 45.4704666666667)')])::geography)
Returns:
ERROR: function st_length(geography) is not unique
LINE 1: select st_length(ST_MakeLine(ARRAY[st_geomfromewkt('SRID=432...
^
HINT: Could not choose a best candidate function. You might need to add explicit type casts.
However, this works:
select st_length(ST_MakeLine(ARRAY[st_geomfromewkt('SRID=4326;POINT(-79.3687166666667 43.86085)'), st_geomfromewkt('SRID=4326;POINT(-73.7409333333333 45.4704666666667)')])::geography,true);
Returns:
st_length ------------------ 480679.079363184 (1 row)
Previous behaviour (in 1.5), you did not need to specify "true" as the second parameter to st_length.
Not sure if this is a bug, or if the documentation should be updated? (I was under the impression that 'true' was the default).
Change History
Note: See
TracTickets for help on using
tickets.
