<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Hi Jesper,<br></div><div><br data-mce-bogus="1"></div><div>just from the manual: If you have the value, could you not use <!--StartFragment-->ST_PixelOfValue<!--EndFragment-->  to extract the location?<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>from the PostGIS-manual:<br data-mce-bogus="1"></div><blockquote><div> ST_PixelOfValue — Get the columnx, rowy coordinates of the pixel whose value equals the search value.  </div></blockquote><div>Regards,<br data-mce-bogus="1"></div><div>Birgit<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>Von: </b>"Jesper Kempe" <jesper.kempe@gmail.com><br><b>An: </b>postgis-users@lists.osgeo.org<br><b>Gesendet: </b>Montag, 19. April 2021 08:34:42<br><b>Betreff: </b>[postgis-users] Location of highest point in each region?<br></div><div><br></div><div data-marker="__QUOTED_TEXT__"><div dir="ltr">Hi<br><div>I have loaded a DEM dataset into a Postgis raster table. And a shapefile with polygons for a number of regions into another table. </div><br><div>For a couple of days now I have been trying to extract the height and location of the highest point in each of the regions. But I cannot find a way to do it.</div><br><div>I am able to find the highest value in each region using ST_SummaryStats() but not the location (coordinates) of that value.</div><br><div>Can anyone point me in the right direction how I should do this? </div><div>It must be possible to do this in Postgis right?</div><div><br>Thanks</div><div>Jesper</div></div>
<br>_______________________________________________<br>postgis-users mailing list<br>postgis-users@lists.osgeo.org<br>https://lists.osgeo.org/mailman/listinfo/postgis-users<br></div></div></body></html>