clarisma / geodesk-py

Fast and storage-efficient spatial database engine for OpenStreetMap data
https://docs.geodesk.com/python
GNU Lesser General Public License v3.0
36 stars 0 forks source link

Consecutive queries #45

Closed osmuser63783 closed 7 months ago

osmuser63783 commented 7 months ago

Why does planet('ar[boundary=administrative][admin_level=2][type!=multilinestring]').relations("*[name:en=Germany]") return four relations, some of which are not returned by planet('ar[boundary=administrative][admin_level=2][type!=multilinestring]').relations ?

Only the following returns what I expected: planet('ar[boundary=administrative][admin_level=2][type!=multilinestring][name:en=Germany]').relations

I would have expected these filters to work one after the other, so that adding another one can only ever make the resulting feature set smaller.

I would expect the following to work:

countries = planet('ar[boundary=administrative][admin_level=2][type!=multilinestring]').relations
countries('*[name:en=Germany]').one

Instead it complains: QueryError: Expected only one feature, but found multiple.

clarisma commented 7 months ago

Thanks for submitting this! Queries can now be combined; fix is in main, will release as part of 0.1.7.