[postgis-devel] [PostGIS] #268: Simple intersection query between geography column and POLYGON geography fails

PostGIS trac at osgeo.org
Thu Oct 15 07:08:04 PDT 2009


#268: Simple intersection query between geography column and POLYGON geography
fails
-----------------------+----------------------------------------------------
  Reporter:  mcayland  |       Owner:  mcayland     
      Type:  defect    |      Status:  new          
  Priority:  medium    |   Milestone:  postgis 1.5.0
 Component:  postgis   |     Version:               
Resolution:            |    Keywords:               
-----------------------+----------------------------------------------------
Comment (by robe):

 This is strange. I think its a bug in the bbox creation than the operator
 itself that for some reason the bbox being created is a geometry and not
 geography.

 It works fine when I convert a geometry to geography on the fly like so
 or maybe its not creating a bbox in this case.


 {{{
 explain select count(*) from neighborhoods
  where geography(ST_Transform(the_geom,4326)) &&
 ST_GeographyFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))');
 }}}

 -- but doesn't work with below
 {{{
 SELECT name, geography(ST_Transform(the_geom,4326)) As the_geog
 INTO nei_geography
 FROM neighborhoods ;

 explain select count(*) from nei_geography where the_geog &&
 ST_GeographyFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))');

 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/268#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
PostGIS


More information about the postgis-devel mailing list