[postgis-tickets] [PostGIS] #3202: ST_DistanceSphere allows operations on mixed SRIDs

PostGIS trac at osgeo.org
Thu Jul 16 23:34:03 PDT 2015


#3202: ST_DistanceSphere allows operations on mixed SRIDs
---------------------+---------------------------
 Reporter:  mwtoews  |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  low      |  Milestone:  PostGIS 2.2.0
Component:  postgis  |    Version:  trunk
 Keywords:           |
---------------------+---------------------------
 With PostGIS 1.5, using `ST_Distance_Sphere` with mixed SRIDs raised an
 error:
 {{{
 SELECT ST_Distance_Sphere(ST_SetSRID(p1, 4326), p2) AS q1,
   ST_Distance_Sphere(p1, ST_SetSRID(p2, 4326)) AS q2,
   ST_Distance_Sphere(ST_SetSRID(p1, 4269), ST_SetSRID(p2, 4326)) AS q3
 FROM (
     SELECT ST_MakePoint(0, 0) AS p1, ST_MakePoint(0, 1) AS p2
 ) f;
 ERROR:  geometry_distance_spheroid: Operation on two GEOMETRIES with
 different SRIDs
 }}}
 But with recent versions of PostGIS, these queries are permitted without
 error or notice.

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3202>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list