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
397 stars 130 forks source link

OSM Attribute Selector toolvalidation scripting needs minor change #143

Closed mboeringa closed 8 years ago

mboeringa commented 8 years ago

Hi @ThomasEmge ,

I detected a minor issue with the toolvalidation of the OSM Attribute Selector.

When I type an OSM key in the Select OSM Tag Keys parameter, and click the + button to add it to the list, the toolvalidation shows an error. See the images below. Only when I additonally set the Input OpenStreetMap Feature Class parameter, will the parameter properly validate and the message disappear.

osm_attribute_selector-toolvalidation_error

osm_attribute_selector-toolvalidation_error_message

Despite seemingly completely trivial, this issue has cost me days trying to debug my models and code, because for some reason I still not can explain, I am getting the following error message when calling the OSM Attribute Selector from my code and models in some cases, see the image below, which is clearly related to the tool validation. Unfortunately, the issue is not really consistent, at least I haven't been able to pinpoint a specific issue in my code or models that might cause this issue (of course, I am setting the Input OpenStreetMap Feature Class parameter in my code and models...).

My models used to work with the old OSM Attribute Selector, before the major changes implemented in the last version.

Anyway, I see no reason why the Select OSM Tag Keys parameter should be depended on the Input OpenStreetMap Feature Class parameter to properly validate. These are independed parameters. Keys can have any value and do not have to be verified against the Feature Class, as also proven by the fact that I can enter complete nonsense / non-existing keys like "XXX" and still get it validated as long as I set the feature class parameter. In fact, they can't be depended at all, as there is nothing to verify the key against in the Feature Classs (unless - which is completely unthinkable concerning the hefty processing involved - you would like to verify them in toolvalidation against the presence / absence of the key in the osmTags tag store / field)

Could you adjust the validation code so that the Select OSM Tag Keys parameter is no longer depended on the Input OpenStreetMap Feature Class parameter for validation? osm_attribute_selector-error_message_scripting