add a WKB decoder for the Point class

This allows to return point geometries from the database and makes
the SQL a bit simpler.
This commit is contained in:
Sarah Hoffmann
2023-02-16 15:35:54 +01:00
parent b320f1c7e3
commit ee0c5e24bb
5 changed files with 39 additions and 22 deletions

View File

@@ -96,7 +96,7 @@ def _add_parent_rows_grouped(writer: JsonWriter, rows: napi.AddressLines,
def _format_search_json(result: napi.SearchResult, options: Mapping[str, Any]) -> str:
locales = options.get('locales', napi.Locales())
geom = result.geometry.get('geojson')
centroid = result.centroid_as_geojson()
centroid = result.centroid.to_geojson()
out = JsonWriter()
out.start_object()\