pyrosm icon indicating copy to clipboard operation
pyrosm copied to clipboard

loading multipolygon

Open 3dfirelab opened this issue 1 year ago • 0 comments

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.

3dfirelab avatar Mar 01 '24 16:03 3dfirelab