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

Download OSM Data (XAPI) should give proper warning or error when query times out #151

Closed mboeringa closed 7 years ago

mboeringa commented 8 years ago

Hi @ThomasEmge,

As a result of #150 , it has become clear to me that it is actually very easy to have a silent fail of the Download OSM Data (XAPI) tool due to query time out against the XAPI server.

Looking at the resulting osm XML file returned, it has become obvious that the XAPI server always returns a valid XML file by closing the XML structure with a finishing "osm" tag, see the first image below. This means that it is far from obvious that anything bad happened at all, as there is no feedback in the Download OSM Data (XAPI) tool to warn you of this, the tool succeeds, as the XAPI server returns valid XML, see the second image below.

This is undesirable, as the chances are really big people will use the tool to try and download large custom extents. If there is no warning, and they start processing the files using either the Load OSM File tool or the new OSM File Loader (Load only) tool, they will run into the same issues I did in #150.

It is desirable to have a solution for this. Things are not so bleak though, as it does seem the XAPI server writes a remark to the XML warning of the query time out, see the red arrow in the first image. By parsing this at the end of the - supposedly - successful download session, it should be relatively easy to enhance the Download OSM Data (XAPI) tool with the capability to detect a failed download, and present a proper warning to the user about this, and preferably a strong advice to not continue using the downloaded file due to missing data.

Proper closing tag on failed XAPI osm XML file download and time out remark in the XML structure: xapi_query_time_out

No warning visible in Download OSM Data (XAPI) tool: xapi_query_time_out_no_message_osm_loader

ThomasEmge commented 8 years ago

If the server is not responding in the allotted time for the OSM request then this error is reported as a warning in the tool. In your case the server delivered a valid result - properly formed xml document. That the content of the OSM file isn't what the user expected is not something the tool can and should check.

mboeringa commented 7 years ago

Seems taken care of in your https://github.com/Esri/arcgis-osm-editor/commit/480a763615d738cfdda34a940c0c051ba8e16371 commit, so I will close it for now.