Esri / arcgis-osm-editor

ArcGIS Editor for OpenStreetMap is a toolset for GIS users to access and contribute to OpenStreetMap through their Desktop or Server environment.
Apache License 2.0
395 stars 129 forks source link

Planarize Tool deletes the features #183

Closed Hornbydd closed 6 years ago

Hornbydd commented 6 years ago

I'm using the 10.5 OSM editor. I have downloaded a sample of data, turned off the display of all but waterway lines. I select a few streams and then click on the Planarize tool on the Advance editing toolbar. I accept the default cluster tolerance of 0.000000009 decimal degrees, press OK, it shows it's green bar then when the dialog closes the lines are deleted from the dataset!

The expected behaviour would be that the selected lines are planarized and intersections resolved.

Whats going wrong?

ThomasEmge commented 6 years ago

The planarize tool will generate new geometry and copy some of the attributes along. There might be a little bit on unexpected behavior when it comes to attributes with associated domains. Here the planarize tool is picking the default value of NULL and if you used the rendering tool (which relies on the attributes being populated) then the newly generated geometries are 'dropped' from the display. The features do exist but due to the attributes driving the rendering they are not recognized.

Hornbydd commented 6 years ago

OK that makes sense but I had the attribute table open when I ran the planarize tool on the selected lines (they where lines representing rivers and streams) and the entire table emptied of rows. When I saw that I bailed out on committing the save via the editor>save option. Unfortunately I'm not at my works PC (works closed for Christmas), so are you saying that I would then go back into the attribute table on an un-symbolized version of the lines, select the rows that were created and manually (via a field calculate) re-attribute them with the correct OSM tag and hey presto they should symbolize in the layer that was created by the OSM download and symbolize tool? I won't be able to test this until after New Year when work re-opens.

Many thanks for your quick reply.

Hornbydd commented 6 years ago

Hi @ThomasEmge ,

I have had a chance to play with the tool but am now hitting another error which is corrupting the data on OSM. So this is what I have done:

Start Time: Wed Jan 03 12:42:48 2018 Opened changeset 55127910. Submitting 61 features to the server... The remote server returned an error: (400) Bad Request. Cannot parse valid way from xml string . Changeset id is missing Closed changeset 55127910. Failed to execute (OSMGPUpload). Failed at Wed Jan 03 12:42:49 2018 (Elapsed Time: 1.01 seconds)

When I go to the OSM website, edit mode using the iD editor, I see the individual vertices of the rivers as little tear drop shaped points and the river lines have been lost! So I have just spent my time re-digitising on the OSM website the rivers to put them back...

Any advice? Can you replicate this problem? I'm using the 10.5.x version. Someone here is also getting the same error.

ThomasEmge commented 6 years ago

Duncan, unfortunately this workflow is not going to work. But before we get into potential workarounds, what are you expecting out of running the planarize editor tool? The reason why I am asking is because the original nature of the OSM data is a node-based topology. Existing data should already be topologically consistent.

-Thomas

Hornbydd commented 6 years ago

Most of the rivers (certainly in the UK) I would say don't conform to arc-node topology. The centre lines intersect at junctions but not at nodes (polyline end points), they are simply touching. Another problem is that the network is fragmented as not all lakes/ponds/reservoirs have a centre line.

I'm looking to improve the network so that it could be used in all sorts of hydrological analysis. If I could get the OSM river network planarized and connected then we would have a network free of licensing issues which is a problem for the UK scientific community as the hydrological networks available in the UK often have severe licensing restrictions.

So when I discovered this extension I thought Ha! I can use ArcMap's editing power. But from your reply I get the impression it's not capable of feeding the edits back to OSM presumably because I am following an unanticipated workflow?

ThomasEmge commented 6 years ago

I see. First I would try to find out what is the reason why the stream network was captured that way - maybe ask in an OSM forum. At the same time suggest a potential solution you would like to try and see what kind of feedback you get. The importance here is the community driven approach. Can you give me a rough geographical area I can try to download and maybe suggest a workflow?

Hornbydd commented 6 years ago

Here is a random area which shows the problem: https://www.openstreetmap.org/#map=15/54.2893/-3.0719

Much of the additional river network has come from OS Open Data which is cartographic based, occasionally I see data captured from out of date [license] maps and I can only assume the person who captured it did not appreciate the ramifications of not capturing it topologically correct.

I would say having mooched around OSM that it is a nation wide problem.

I've had a play in SW England editing the network (simply splitting the network at junctions) using the iD editor. Whilst it works a treat, I would either go mad or die of old age before I ever get it all done, hence my exploration into the OSM ArcGIS Editor.

Hornbydd commented 6 years ago

I've decided to add this note in case anyone comes searching for a similar solution:

I've been exploring JOSM and I can achieve what I want to do. You need to install a plugin called UtilsPlugin2. Then you run the More Tools > Split adjacent ways on the selected water ways.

The latest version of JOSM allows bulk download using something built in called Overpass Turbo API.

Of cause this fixes the connectivity issue, turning touching streams into correct network junctions, but does not fix missing lake centrelines, ways pointing in the wrong direction or missing sections...