Skip to content

Support for combining OSM point and area elements in GOQL queries (out center) #106

@sfkeller

Description

@sfkeller

A very typical use case for querying POIs (e.g. museum), is, that you like to get not only the OSM node elements as points and OSM area elements as polygons, but both aggregated into one single resultset of geometry type point.

This requires that 1. a "center point" function (Centroid or even better a PointOnSurface) is applied to the area geometry of the OSM Area elements, and 2. that this resultset is being combined ("union") in to one resultset, consisting of the OSM Node elements and the OSM Area elements with "center point" geometries.

The GOQL docs are unfortunately very rudimentary about describing and controlling the resultset https://docs.geodesk.com/goql .

Looking at the only GOQL example "Museums in Paris" in https://docs.geodesk.com/python/examples/museums, this is how an Overpass QL query would look like:

/* Museums in Paris
*/ 
[out:json];
{{geocodeArea:Paris}}->.searchArea;
//area[boundary=administrative][admin_level=8][name="Paris"]->.searchArea; // not-unique
( 
  nwr[tourism=museum](area.searchArea);
); 
out center;

=> How can this implemented in Geodesk?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions