universal-dashboard
universal-dashboard copied to clipboard
UDMapVectorLayer Support for Geometry Type: MultiPolygon
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.

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.

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

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:

MultiPolygon: (Note the extra [ )

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 😎

