TUDelftGeodesy / stmtools

Xarray extension for Space-Time Matrix
https://tudelftgeodesy.github.io/stmtools/
Apache License 2.0
6 stars 0 forks source link

stm.enrich_from_polygon cannot handle polygons with holes #31

Closed Simon-van-Diepen closed 1 year ago

Simon-van-Diepen commented 1 year ago

If a polygon in a geopackage has holes, the query only works for a small subset of the points that are in that polygon. Other polygons are unaffected.

rogerkuou commented 1 year ago

Hi Simon @Simon-van-Diepen , thanks for submitting this issue! Could you please attach a small example here to help me reproduce this issue? Ideally it can be:

I will take a look this week.

Thanks in advance!

Simon-van-Diepen commented 1 year ago

AoI_EUPs_base.gpkg.zip

In this geopackage entries 44, 45, 47, 99, 101, and 111 have holes. All lie in the region of AHN tiles 31DN2 and 31BZ2.

rogerkuou commented 1 year ago

Hi @Simon-van-Diepen , I was trying to reproduce your bug with this notebook, but it seems to work well. In the notebook I manually created a STM with points inside/outside your polygon example, and I was able to enrich. Shall we find a time to look at this together?

Simon-van-Diepen commented 1 year ago

@rogerkuou yes let's have a look at this together, looking at the notebook it indeed seems to work but that wouldn't explain my issue

rogerkuou commented 1 year ago

After checking with Simon, we agreed that for now we need not reproduce this. For now I will close this issue.