Ticket #310 (closed enhancement: fixed)

Opened 4 years ago

Last modified 7 months ago

port ST_DumpPoints() to C

Reported by: kneufeld Owned by: pramsey
Priority: medium Milestone: PostGIS 2.1.0
Component: postgis Version: trunk
Keywords: Cc: bitner, nw@…

Description

The current implementation of ST_DumpPoints is in plpgsql - as such it doesn't scale well.

At some point, this function should be ported to C, mimicking ST_Dump.

Change History

Changed 2 years ago by bitner

  • cc bitner added

Hacky test that shows potential performance gain by getting away from the plpgsql looping structure with npoints. Dumping a 2600 point linestring takes almost a second with st_dumppoints and ~30ms with this function.

CREATE OR REPLACE FUNCTION dump_linestring_points(geometry) RETURNS SETOF geometry AS $BODY$ SELECT

( 'SRID=' bar ';POINT(' foo ')' )::geometry

FROM

regexp_split_to_table(

rtrim(

substring(asewkt($1) from 23) ,')'

), ','

) as foo , srid($1) as bar

WHERE st_geometrytype($1)='ST_LineString'; $BODY$ LANGUAGE sql IMMUTABLE STRICT COST 1 ROWS 100;

Changed 13 months ago by strk

  • owner changed from pramsey to strk
  • status changed from new to assigned
  • milestone changed from PostGIS Future to PostGIS 2.0.1

I don't think there's a problem in doing this for 2.0.X, right ?

Changed 13 months ago by robe

no problem as long as we don't change the front-facing api

Changed 12 months ago by robe

  • milestone changed from PostGIS 2.0.1 to PostGIS 2.1.0

Changed 8 months ago by robe

  • cc nw@… added
  • owner changed from strk to pramsey
  • status changed from assigned to new
  • priority changed from low to medium

Nathan said he was interested in doing this. Adding him to cc so he can add his patch to this ticket. pramsey I believe was going to act as mentor

 http://www.postgis.org/pipermail/postgis-devel/2012-September/022009.html

Changed 7 months ago by pramsey

  • status changed from new to closed
  • resolution set to fixed

Committed Nathan Wagner's implementation at r10595

Note: See TracTickets for help on using tickets.