WorldWindJava
WorldWindJava copied to clipboard
GeoJsonCoordinateParser does not properly handle MultiPolygons
Description
GeoJsonCoordinateParser does not properly handle MultiPolygons causing an error message being logged ("WARNING: Unexpected object type [Lgov.nasa.worlwind.formats.geojson.GeoJSONPositionArray;") and the coordinates not being returned. This appears to be caused by the GeoJsonCoordinateParser.resolveArrayOfArrays(List) expecting the List to contain a List instead of an Array.
Note that this was previously reported on the WorldWind Bug Report forum but does not appear to have been fixed yet in the main branch : https://forum.worldwindcentral.com/forum/archived-forums/worldwind-net-development/support/bug-reports/16787-unexpected-object-type-geojsonpositionarray
Steps to Reproduce
- Create GeoJSONDoc based on GeoJSON file containing a MultiPolygon
- Call the GeoJSONDoc.parse() method
Expected behavior: The coordinates are returned and no error message is logged.
Actual behavior: An error message being logged ("WARNING: Unexpected object type [Lgov.nasa.worlwind.formats.geojson.GeoJSONPositionArray;") and the coordinates not being returned
Reproduces how often: 100%, everytime
Operating System and Version
Windows 10, RHEL 7
Additional Information
None