universal-dashboard icon indicating copy to clipboard operation
universal-dashboard copied to clipboard

UDMapVectorLayer Support for Geometry Type: MultiPolygon

Open leeberg opened this issue 6 years ago • 0 comments
trafficstars

Description

In my attempts to pull public GEOJSON data sources, I have had great success with "PolyGon" Country borders. However, many countries with "separated borders" or "Exclaves/Enclaves" and islands typically use "MultiPolygon" data type.

You will also see this in State data as well: (Wtf kentucky?) - in this example Kentucky has a polygon for it's mainland, and this tiny little Exclave. image

Issue in practice

As you can see on my GeoJSON test data map - all the landlocked or single contiguous border countries have no problems rendering. Countries with mutli-polygons do not render.

image

when you zoom fast on re-render you can also see a ton " Unknown Type" errors: image

For Testing:

MultiPolygon: Germany with islands like Rügen, Usedom, Fehmarn https://github.com/mledoze/countries/blob/master/data/deu.geo.json

Another Non-ISland example known as an "Exclave" would be the Kaliningrad area of Russia: https://github.com/mledoze/countries/blob/master/data/rus.geo.json

(Singly) Polygon - Currently Working GREAT : Czech Republic: https://github.com/mledoze/countries/blob/master/data/cze.geo.json

Data Formats

Polygon: image

MultiPolygon: (Note the extra [ ) image

Workaround

By breaking apart the GEOJSON in UD dashboard script and then creating each polygon New-UDMapVectorLayer -Polygon -Positions $Positions in the script - this can be worked around. I was able to geojson the entire world, multipolygons and regular polygons.

Would still be nice to just allow the multipolygon type though 😎

image

image

leeberg avatar Jul 18 '19 04:07 leeberg