Ticket #259 (closed defect: fixed)
ST_Distance geography throws an error with empty geographies
| Reported by: | robe | Owned by: | pramsey |
|---|---|---|---|
| Priority: | medium | Milestone: | PostGIS 1.5.0 |
| Component: | postgis | Version: | |
| Keywords: | Cc: |
Description
I suppose this is technically not a defect, but is not consistent with the way ST_Distance behaves with geometry. ST_Distance returns 0 in this case . Also its not desirable for queries to fail with empty geometries/geoegraphies
But this: SELECT ST_Distance(ST_GeographyFromText('SRID=4326;POLYGON EMPTY'), ST_GeographyFromText('SRID=4326;POINT(1 2)'));
returns: ERROR: Error in geography_distance_sphere calculation. CONTEXT: SQL function "st_distance" statement 1
Change History
Note: See
TracTickets for help on using
tickets.
