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

Regex clause fails to match tag value #48

Closed starsep closed 8 months ago

starsep commented 8 months ago

I am using mazowieckie.gol file generated using

wget -O mazowieckie.osm.pbf https://download.geofabrik.de/europe/poland/mazowieckie-latest.osm.pbf
gol build mazowieckie mazowieckie.osm.pbf

I am using Python with geodesk 0.1.7. Regex query returns empty result but equality query returns expected result.

from geodesk import *
print(Features("mazowieckie.gol")('*[addr:city=Warszawa]["addr:street"="Jana Kasprowicza"]').count)
print(Features("mazowieckie.gol")('*[addr:city=Warszawa]["addr:street"~"Jana Kasprowicza"]').count)

169 0

I am not able to reproduce this behavior when using cli gol 0.1.9

gol query mazowieckie '*[addr:city=Warszawa]["addr:street"="Jana Kasprowicza"]' -f=count
gol query mazowieckie '*[addr:city=Warszawa]["addr:street"~"Jana Kasprowicza"]' -f=count

Both queries return

169

Retrieved 169 features in [...]ms

Am I doing something wrong or is it a bug?

clarisma commented 8 months ago

It's a bug, thanks for submitting! Fix coming soon...