Jesse,
the answer lies in exploring available Spatialite SQL functions:
https://www.gaia-gis.it/gaia-sins/spatialite-sql-5.1.0.html
ST_Centroid() returns a Point geometry. You may get its coordinates with
ST_X() and ST_Y(). I suppose you'd need to use a sub-select construct to
get things
Hi,
I’m wanting to execute a SQL query on a vector database like:
vector_mem_ds.ExecuteSQL(f"select ST_Centroid(GEOMETRY) as cnt,
gdal_get_pixel_value('{raster_fp}', {ndvi_band_num}, 'georef', cnt.STX,
cnt.STY) from ds", dialect="SQLITE")
In particular, I want to use the geometry’s centroid