[postgis-devel] ST_GetValues()

Regina Obe lr at pcorp.us
Thu Apr 15 22:08:44 PDT 2021


> Sent: Friday, April 16, 2021 1:03 AM
> To: 'PostGIS Development Discussion' <postgis-devel at lists.osgeo.org>
> Subject: RE: [postgis-devel] ST_GetValues()
> 
> > And building on that, ST_GetValues() which reads values from a raster
> > into the Z or M coordinates of a reference geometry.
> >
> > CREATE FUNCTION st_getvalues(rast raster, geom geometry, resample
> text
> > DEFAULT 'nearest', band integer default 1, dimension text default 'z')
> > 	RETURNS geometry
> > 	AS 'MODULE_PATHNAME', 'RASTER_getGeometryValues'
> > 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE;
> >
> > Comments appreciated.
> >
> > P
> >
> Why is this called ST_GetValues?  The Get seems a bit wordy and doesn't
> follow the naming of other function.
> Is there a reason you dismissed the more obvious to me ST_Values?
> 

[Regina Obe] One more thing - sent too soon.

Seems the terminology of using Values is all wrong here as it returns a
geometry.
Here is a crazy idea which I know you are going to hate cause you hate
overloading functions  :)

How about just overloading the name ST_Force3DZ, ST_Force3DM cause that's
essentially what you are doing here isn't it?

Except  instead of passing in a numeric to force up, you are passing in a
raster to interpolate the values.



More information about the postgis-devel mailing list