[postgis-devel] [PostGIS] #926: ST_GeometryN, ST_PointN (input of array) return set

PostGIS trac at osgeo.org
Fri Apr 29 11:24:34 PDT 2011


#926: ST_GeometryN, ST_PointN (input of array) return set
-------------------------+--------------------------------------------------
 Reporter:  robe         |       Owner:  pramsey      
     Type:  enhancement  |      Status:  new          
 Priority:  medium       |   Milestone:  PostGIS 2.0.0
Component:  postgis      |     Version:  trunk        
 Keywords:               |  
-------------------------+--------------------------------------------------

Comment(by robe):

 David,

 I really like the from,to range idea you have.  I was thinking to myself
 if you wanted to grab all 100,000 points of a long linestring that passing
 in an array of 100,000 integers would be mighty inefficient (granted much
 more efficient than what we are doing now, but still inefficient).  The
 range idea solves that problem nicely I think and will probably be more
 used than the input array option.

 The skip idea for thining yap that was the along the lines of what I was
 thinking why it's nice to pass in an array index.  I'll look at the C code
 we have so far to see if I can patch together something that does this
 wihtout having to learn C.

 If it doesn't work I'll come whimpering to the PostGIS Dev group for help.
 Probably would be worthwhile to do benchmarks on the two approaches.

 I'm not sure why I think it but I suspect the return of array might be
 more efficient.

 Do you have some examples of PL/R code how you would stuff such an array
 into it.  Would be curious to see that and yes being able to write fast,
 efficient, and terse sql / plpgsql functions is my primary objective for
 this.  I see this mem copy issue as our main barrier for that so this is
 one step in that direction.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/926#comment:4>
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-devel mailing list