[postgis-devel] [PostGIS] #529: && operator doesn't work on Geography

PostGIS trac at osgeo.org
Tue Jun 8 07:53:00 PDT 2010


#529: && operator doesn't work on Geography
-----------------------+----------------------------------------------------
  Reporter:  torlan    |       Owner:  pramsey      
      Type:  defect    |      Status:  closed       
  Priority:  critical  |   Milestone:  PostGIS 1.5.2
 Component:  postgis   |     Version:  trunk        
Resolution:  invalid   |    Keywords:               
-----------------------+----------------------------------------------------
Changes (by pramsey):

  * status:  new => closed
  * resolution:  => invalid

Comment:

 Your second bounding box is a narrow rectangle over the international
 dateline, there are no world capitals in that box.

 Your problem is a specific example of the general issue around describing
 bounded areas and arcs on a sphere. Since lines are segments of great
 circles, and coordinate pair has two interpretations, a short one and a
 long one. As a design decision in PostGIS geography, we decided to always
 choose the short one.

 Microsoft made similar choices in their geography, but also added an
 "everything" geography to get around the problem of defining a world-
 covering region. It looks like your version of a world-covering entity did
 in fact return the right results, but that is not be design: I never
 tested that case, we just got lucky.

 To create a region that covers large swathes of the globe, build it from
 arcs that are less than 180 degrees apart. That way each arc will be
 interpreted as the smaller possibility and the region as a whole will
 bound the area you want.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/529#comment:1>
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-devel mailing list