I am attempting to directly update the coordinates using the WebAPI, but am running into issues with the formatting (I think) of JSON fragments.
The worflow is as follows.
Use MapShaper to simplify the coordinates.
Export as GeoJSON.
Use curl to PUT the coordinates to the correct end point, e.g. http://myserver/api/organisationUnits/abcd1234/coordinates
Use curl to PUT the feature type (either “POLYGON” or “MULTI_POLYGON”) depending on what is reported by the GeoJSON.
That part seems to work fine and I get something which looks like this.
In the GIS client, when loading any of the MultiPolygon’s I get
Uncaught TypeError: Cannot read property ‘length’ of null with util.map.getTransformedFeatureArray.
If I mangle the GeoJSON such that is has four square brackets (instead of five as above) things works OK. If I change the number of square brackets of normal polygons to three (as in the spec example here) , I get the same error.
Is there a particular reason for this? It would seem to be desirable to allow the upload of GeoJSON directly from a GIS system, without having to mangle it before.
Jason P. Pickering