[postgis-tickets] [PostGIS] #3123: Aggregates for ST_AsTWKB removed?

PostGIS trac at osgeo.org
Tue May 19 12:47:53 PDT 2015


#3123: Aggregates for ST_AsTWKB removed?
--------------------------+---------------------------
  Reporter:  usmanm       |      Owner:  pramsey
      Type:  enhancement  |     Status:  new
  Priority:  medium       |  Milestone:  PostGIS 2.2.0
 Component:  postgis      |    Version:  trunk
Resolution:               |   Keywords:
--------------------------+---------------------------

Comment (by nicklas):

 You are right they are removed, but the functionality remains. The syntax
 is just changed.

 What has happened is that the ordinary ST_AsTWKB can take arrays of
 geoemetries together with array of id.

 So instead of writing :


 {{{
 ST_AsTWKBAgg(geom,id)
 }}}


 you write:


 {{{
 ST_AsTWKB(array_agg[geom), array_agg[id])
 }}}


 [http://postgis.net/docs/manual-dev/ST_AsTWKB.html]

 So, we are relying on standard aggregation functions on PostgreSQL rather
 than building our own.

 In the old ST_AsTWKBAgg, there was some ugly part of the implementation to
 get the values valid for the whole aggregate like precision and boolean
 values for size and bounding box through the process. The approach now is
 cleaner because the parts that shall aggregate do so with array_agg and
 the rest is just an ordinary function.

 Credits for this shall go to Paul Ramsey.

 Also note that the specification have had some major changes too. Oe of
 the biggest benefits is that you now can nest collections as deep as you
 like in a twkb-geoemtry. And you can control the precission independent
 for xy, z and m dimensions.

 [https://github.com/TWKB/Specification/blob/master/twkb.md]

--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/3123#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-tickets mailing list