developmentseed / observe

Cross-platform, offline, field mapping tool for OpenStreetMap
ISC License
67 stars 5 forks source link

Deleting node of a way with 2 nodes doesn't get visualized #296

Closed geohacker closed 4 years ago

geohacker commented 4 years ago

@LanesGood I noticed that when we delete a node of a way with just 2 nodes, it doesn't show up in modifiedSharedWays layer or editedGeojson layer. Obviously this is because it's no longer a valid LineString. What do you think we should do in these cases?

LanesGood commented 4 years ago

@geohacker can the remaining node be converted to a singular node in the editedGeoJSON layer? If so, we could either save it as a single node point (not sure if there's a valid use case there), or implement a special style that indicates that this node needs another node to be saved. If not, then users should not be able to delete the last two nodes on any lineString.

geohacker commented 4 years ago

@LanesGood thank you. I inspected a bit more and this is a slightly complicated issue we need to address all the way from where the edits are created.

So few things to do:

cc @batpad

geohacker commented 4 years ago

The last thing to do in this workflow is to delete polygons with less than 3 nodes. Will close this once @batpad makes a PR for it.

geohacker commented 4 years ago

This is now addressed. To finish the styles we should do #318