WorldWindJava icon indicating copy to clipboard operation
WorldWindJava copied to clipboard

GeoJsonCoordinateParser does not properly handle MultiPolygons

Open tvanhill opened this issue 3 years ago • 0 comments

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

  1. Create GeoJSONDoc based on GeoJSON file containing a MultiPolygon
  2. 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

tvanhill avatar Jun 10 '21 20:06 tvanhill