[postgis-devel] ST_GetValues()

Paul Ramsey pramsey at cleverelephant.ca
Fri Apr 16 10:21:42 PDT 2021



> On Apr 16, 2021, at 10:09 AM, Regina Obe <lr at pcorp.us> wrote:
> 
>>> Speaking of which I forgot to ask if this is a set returning function.
>>> I assume not and you'd return a collection in cases where it's relevant?
>> 
>> It returns what you put in. Whatever geometry you put in, you get out,
> with
>> an extra Z or M dimension.
>> 
>> P
>> 
>> 
> Hmm so what happens if you pass in a polygon would it just interpolate the
> Z's in it.
> Wouldn't that often result in an invalid polygon?  Like I would expect in
> many cases it would result in a polyhedralsurface or at very least a
> collection of polygonZs.

All that's happening under the covers is

foreach vertex in geometry
  find raster value associated with vertex
  add value to vertex Z or M

That's it. 

P

> 
> Points, Linestrings and multilinestrings yes that works great.
> 
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel



More information about the postgis-devel mailing list