dainst / idai-field

iDAI.field | Archaeological Field Recording App by the German Archaeological Institute
Apache License 2.0
36 stars 16 forks source link

properly close polygons to keep valid geojson after manual editing #212

Open lsteinmann opened 3 months ago

lsteinmann commented 3 months ago

When a polygon is manually created via entering points in the required notation in the editing modal or switching from polyline to polygon in the same modal by adding [], the polygon as differing first and last point coordinates. GeoJSON expect the first and last point coordinate of a polygon to be the same. This should automatically corrected upon saving the resource after manual editing as well as upon export to GeoJSON.

This issue also affects field publication, which should (to be sure) correct the geometries upon import to support legacy projects.

lsteinmann commented 3 months ago

ah, not clear if this is relevant for shp-files as well - we need to check that.