Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loading multipolygon #230

Open
3dfirelab opened this issue Mar 1, 2024 · 0 comments
Open

loading multipolygon #230

3dfirelab opened this issue Mar 1, 2024 · 0 comments

Comments

@3dfirelab
Copy link

3dfirelab commented Mar 1, 2024

Describe the bug
when loading the same pbf file either with pyrosm or within qgis, multipolygons do not show the same way. Orientation seems to be not interpreted similarly.

To Reproduce
using the this (pbf test file)[https://www.dropbox.com/scl/fi/75j6vc41qqyfqb07sgyif/test.pbf?rlkey=hlnle7tgmt1ju65m1ta9b7c2f&dl=0]
and this code

import pyrosm
import warnings
from shapely.errors import ShapelyDeprecationWarning
import matplotlib.pyplot as plt

osm = pyrosm.OSM(filepath='./test.pbf')
custom_filter={'tourism': True}
with warnings.catch_warnings():
    warnings.simplefilter("ignore", DeprecationWarning)   
    warnings.simplefilter("ignore", ShapelyDeprecationWarning)   
    warnings.simplefilter("ignore", UserWarning)         
    tourism = osm.get_data_by_custom_criteria(custom_filter=custom_filter)

tourism.plot()
plt.show()

this gives
image

the same file loaded in qgis
with filter
"tourism"!='NULL'
gives
image

the left and right polygon differ in both image.
They are multipolygon. It looks like there is a problem of orientation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant