[postgis-tickets] [PostGIS] #3187: Bounding box for collection types in twkb is corrupt

PostGIS trac at osgeo.org
Mon Jun 29 14:44:30 PDT 2015


#3187: Bounding box for collection types in twkb is corrupt
---------------------+---------------------------
 Reporter:  nicklas  |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  medium   |  Milestone:  PostGIS 2.1.8
Component:  postgis  |    Version:  2.1.x
 Keywords:           |
---------------------+---------------------------
 In ST_AsTWKB bounding box calculation doesn't work on collections.

 It is seen when running this query:

 {{{
 select st_astwkb(st_collect('point(1 1)'::geometry,'linestring(1 1, 1
 2)'::geometry),0,0,0,true,true)
 }}}

 it returns
 st_astwkb

 {{{
 \x07032cfeffffffffffffffff0102feffffffffffffffff010202010306020002000202020309020002020202020002
 }}}

 This comes from that at the top level the bbox is never calculated. It is
 calculated in the subgeoemtries and zeroed between subgeoemtries and when
 moving back to top level.

 I don't think we shall put bbox on subgeoemtries at all for collections,
 just like multigeometries and instead put an envelope bbox on top level.
 That corresponds to ordinary collections.

 If no objections I will fix it later this week.

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