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

2020-01-09 Thread Pierre Racine
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  De la part de Peter 
Devoy
Envoyé : 8 janvier 2020 09:29
À : PostGIS Users Discussion 
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@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 
hameconn...@ulaval.ca.


___
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users

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

2020-01-08 Thread Regina Obe
ST_Value has a exclude_no_data value which I think defaults to true.  You could 
try changing it to false to see if the error goes away.  You'll probably get 
garbage back if anything.

https://postgis.net/docs/RT_ST_Value.html

I thought ST_Intersects had the same feature, but I guess I'm mistaken or it 
was taken out a while ago as I don't see it documented and don't see a function 
signature for it either.

 https://postgis.net/docs/RT_ST_Intersects.html



-Original Message-
From: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] On Behalf Of 
Peter Devoy
Sent: Wednesday, January 8, 2020 9:29 AM
To: PostGIS Users Discussion 
Subject: [postgis-users] Point geom, ST_Value, ST_Intersects and out of range 
raster coordinates

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@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users

___
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users

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

2020-01-08 Thread Peter Devoy
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@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users