[postgis-users] Point geom, ST_Value, ST_Intersects and out of range raster coordinates

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Thu Jan 9 04:36:03 PST 2020


Solution is to filter out NULL returned when using ST_Value() or DISTINCT or GROUP BY multiple values returned when using ST_Intersect().

Using (only) one solution consistently returns consistent results.

Pierre

-----Message d'origine-----
De : postgis-users <postgis-users-bounces at lists.osgeo.org> De la part de Peter Devoy
Envoyé : 8 janvier 2020 09:29
À : PostGIS Users Discussion <postgis-users at lists.osgeo.org>
Objet : [postgis-users] Point geom, ST_Value, ST_Intersects and out of range raster coordinates

[Externe UL*]

Hi list

I am trying to sample a value in a raster using ST_Value and a point geometry.
With the same point geometry I tried to use ST_Intersects to sample from only the relevant row in the raster table but if the point is on the boundary of multiple raster tiles a row is returned for each.

However, at the cell level, ST_Value seems to play by different rules and raises
"NOTICE: Attempting to get pixel value with out of range raster coordinates..."
for all but one of the rows.  Resulting in NULL values for all but one row.

Please does anyone know if there is there a method or function I can use to get more "consistent" spatial logic without modifying the input point geometry?

E.g. either to filter out all rows where the sampled cell would be out of range; or, to have ST_Value return a value for each row found by ST_Intersects.

My postgis_version() = "2.5 USE_GEOS=1 USE_PROJ=1 USE_STATS=1".

Kind regards


Peter
_______________________________________________
postgis-users mailing list
postgis-users at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users
*ATTENTION : L’émetteur de ce courriel est externe à l’Université Laval.
Évitez de cliquer sur un hyperlien, d’ouvrir une pièce jointe ou de transmettre des informations si vous ne connaissez pas l’expéditeur du courriel. En cas de doute, contactez l’équipe de soutien informatique de votre unité ou hameconnage at ulaval.ca.
________________________________



More information about the postgis-users mailing list