[postgis-tickets] [PostGIS] #3590: Auto cast from geometry to geoggraphy with polygon larger than a hemisphere

PostGIS trac at osgeo.org
Fri Jun 24 03:00:39 PDT 2016


#3590: Auto cast from geometry to geoggraphy with polygon larger than a hemisphere
---------------------+---------------------------
 Reporter:  linebp   |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  low      |  Milestone:  PostGIS 2.2.3
Component:  postgis  |    Version:  2.2.x
 Keywords:           |
---------------------+---------------------------
 I am trying to make som maps with point and polygon data from all over the
 world.

 I have my data in a postgis 2.2 stored as geography type.

 I am using mapserver 7 to serve my requests and it is generating requests
 for me with a bounding box constraint looking like:

 {{{
 geog && ST_GeomFromText('POLYGON((-180 -86, -180 86, 180 86, 180 -86, -180
 -86))', 4326)
 }}}

 where geog is of the type geography(Point, 4326). This results in no data
 returned. I'm guessing what happens is that the inside of the polygon
 becomes the outside when cast implicitly to a geography type. Casting the
 point explicitly fixes the problem and rows are returned as expected:

 {{{
 geog::geometry && ST_GeomFromText('POLYGON((-180 -86, -180 86, 180 86, 180
 -86, -180 -86))', 4326)
 }}}

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3590>
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