osdatahub icon indicating copy to clipboard operation
osdatahub copied to clipboard

Allow Extent to be multipolygon

Open FHunt-OS opened this issue 3 years ago • 3 comments

It would be useful if Extent could be a multipolygon to allow query results from non-contiguous areas, without needing to make multiple extent/API objects.

FHunt-OS avatar May 30 '22 17:05 FHunt-OS

This is not easily solved, at the moment. The underlying API does not support MultiPolygons or multiple geospatial filters. Therefore, a significant amount of post-processing would need to be done, which breaks away from the idea of this being a fairly thin wrapper of the API. This issue should stay open for when this is implemented upstream.

E-Paine avatar Aug 19 '22 11:08 E-Paine

Since it only takes the extent of the polygon it should be easy to make it take a multipolygon. I can filter out the bits I don't want later if necessary.

ian-astun avatar May 30 '23 15:05 ian-astun

A related issue is that using Extent.from_ons_code() method doesn't work because some ONS codes are interpreted as multipolygons. One example is that of Greenwich (E09000011), which shouldn't even result in a multipolygon.

Ilkka-LBL avatar Jul 21 '23 12:07 Ilkka-LBL