Opened 8 years ago

Closed 5 years ago

#310 closed enhancement (fixed)

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 (6)

comment:1 Changed 7 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;

comment:2 Changed 6 years ago by strk

Milestone: PostGIS FuturePostGIS 2.0.1
Owner: changed from pramsey to strk
Status: newassigned

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

comment:3 Changed 6 years ago by robe

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

comment:4 Changed 5 years ago by robe

Milestone: PostGIS 2.0.1PostGIS 2.1.0

comment:5 Changed 5 years ago by robe

Cc: nw@… added
Owner: changed from strk to pramsey
Priority: lowmedium
Status: assignednew

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

comment:6 Changed 5 years ago by pramsey

Resolution: fixed
Status: newclosed

Committed Nathan Wagner's implementation at r10595

Note: See TracTickets for help on using tickets.