[postgis-tickets] [PostGIS] #3428: Feature request: A function to convert a geometry's coordinates into a MultiPoint

PostGIS trac at osgeo.org
Wed Jan 13 16:02:57 PST 2016


#3428: Feature request: A function to convert a geometry's coordinates into a
MultiPoint
--------------------------+----------------------------
  Reporter:  mwtoews      |      Owner:  pramsey
      Type:  enhancement  |     Status:  new
  Priority:  medium       |  Milestone:  PostGIS Future
 Component:  postgis      |    Version:
Resolution:               |   Keywords:
--------------------------+----------------------------

Comment (by dbaston):

 On my laptop it takes about 1s to call the ST_ToMultiPoint function on a
 LineString with 1 million points.  Not as fast as it could be, but I'm not
 sure about dismal.   The components of the SQL function are all
 implemented in C, so there's no glaring performance problem, like PLPGSQL
 array access, that would be resolved by a direct native implementation.

 There's certainly overhead -- a few serialization-deserialization round
 trips, some overhead from the SRF and aggregate machinery, but I'm not
 sure how much better a direct implementation would be.  Certainly not a
 hard one to put together, though...

 I'll attach a postscript file with the call graph and execution times for
 the following:

 {{{
 -- foo has one record, a linestring with 1M points
 SELECT ST_NPoints(ST_ToMultiPoint(geom)) FROM foo
 }}}

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