[Qgis-user] Query on QgsVectorLayer

Christoph Jung jagodki.cj at gmail.com
Thu Apr 9 11:56:00 PDT 2020


Hello Werner,

Thank you for your advice. But I need the geometry with the max/min x-value, i.e. the bounding box values will not be enough. 

Sincerely,
Christoph

> Am 09.04.2020 um 16:19 schrieb Werner Macho <werner.macho at gmail.com>:
> 
> Hi!
> 
> If you really only want the highest/lowest X-Value - what about
> querying the Bounding Box of the layer?
> Maybe that will also result in what you want.
> 
> regards
> Werner
> 
>> On Thu, 2020-04-09 at 13:37 +0200, Christoph Jung wrote:
>> Hello everyone,
>> 
>> I have a question concerning PyQGIS. Imagine there is a point layer
>> accessed via QgsVectorLayer, i.e. no matter which data source it is.
>> Is it possible to query this layer to get the point object with the
>> highest/lowest x-value in its geometry (similar to max-/min-aggregate 
>> functions in SQL)? Or do  I have to iterate over all objects and
>> compare the values by my own?
>> 
>> Sincerely,
>> Christoph
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> 
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


More information about the Qgis-user mailing list