Test Scripts - Esri/arcgis-osm-editor GitHub Wiki

This page captures ArcGIS Editor for OSM Test Scripts. It also can be used for capturing results.

Important: During initial testing especially of editing workflows, download from and upload OSM data to the OSM Dev endpoint at http://api06.dev.openstreetmap.org instead of production.

Assumptions for all tests: Relevant version of ArcGIS Desktop is installed, and also ArcGIS Editor for OSM is installed.

Test for Downloading Data

Download Extract & Symbolize

This tests the following:

  • Ability to connect to and request data from OpenStreetMap
  • Ability to locate and load osm_domains.xml file and osm_feature_properties.xml files
  • Symbolization models for points, lines, and polygons

To Test:

  • Zoom into area, and launch the Download, Extract, & Symbolize tool
  • Once data is downloaded, use ArcGIS Editor to add something like the following as applicable: two building=yes polygons (with additional attributes "city" and "country" for properties), parking lot points, make an existing road more accurate (edit vertices)
  • Use Upload OSM Data tool to submit to OSM
  • Look at Changeset on OSM and verify that points, ways, and relations came through correctly and that geometries and tags are also correct

Pass: All features are uploaded successfully. Edited line shows up correctly in OSM. 'City' and 'Country' properties are submitted as tags.

Fail: Features are not uploaded and/or tags are not submitted.

Testing .OSM File Capabilities

This tests the following:

  • Connecting to and passing query along to a XAPI endpoint
  • Loading an .osm file to a file GDB
  • Creating a Network Dataset

To Test: Set the map document's data frame coordinate system to WGS 84. Zoom to a relatively large area in a city where you are familiar with the roads. Then launch the "Download OSM Data (XAPI)" tool, and enter information in the tool dialog as follows:

  • Use the default XAPI endpoint, or another XAPI endpoint for testing
  • In the "Download OSM Type" parameter, leave the default, an astericks, so all types can be selected
  • In the "Request Predicate" parameter, enter ''highway=*'' to select all road features
  • Choose a location to save the resulting file, and make sure to give it an .osm extension

Run the tool. The OSM file will not be added to the interface, but you should see it in the location specified in the tool parameters.

  • Now open the "Load OSM File" tool. Browse to your newly created .osm file. Choose to create the OSM feature dataset in a fresh geodatabase. Run the tool.
  • When the tool completed, open the Geoprocessing menu at the top of ArcMap and make sure that background geoprocessing is disabled (e.g., the "Enable" box is unchecked). Close the Geoprocessing menu.
  • Select the "Create OSM Network Dataset" tool. Fill out the parameters as specified. Choose the DriveGeneric.xml. Run the tool.
  • Add the resulting network dataset to the map. Use the Network Analyst tools to create a route. Verify that the route respects the directions (one ways, etc.) for which you are familiar.

DIFF files test

This tests the ability to keep an OSM dataset in ArcGIS updated by applying Diff files from OSM

  • Download an area where you know there will be some OSM editing occurring - for example, go to this area on the openstreetmap.org ID editor, and make real edits; ideal if you can do points, lines, and polygon features.
  • Now go back to your downloaded dataset and run the "Load OSM Diff Files" tool, for the time period where you made the other edits. Make sure you use the ISO 8601 time for the time input (for example 2015-03-04T14:00:00, means March 4th, 2015 2 p.m. UTC time )
  • Test is successful if your dataset in ArcMap is updated with the expected updates after the Load OSM Diff Files tool completes

Test for Node ID Ordering 1

This test the ability to upload a feature class using the Import workflow when the feature class was created using the ArcGIS Editor for OSM tools. Specifically, it tests that node IDs are properly tracked when the dataset is appended in preparation for upload.

To Test: Create a feature dataset using the ArcGIS Editor for OSM. Add features to one of the feature classes - e.g., building footprints. Export the feature class into another geodatabase.

Follow the workflow for importing, as described at https://github.com/Esri/arcgis-osm-editor/wiki/Contribute-an-existing-dataset-to-osm

  • Download data from OSM
  • Run OSM Attribute Selector to select custom tags (optional)
  • Append data to downloaded OSM data
  • Run Combine Attributes tool (only if you added tags/columns)
  • Attempt to Upload data
  • Repeat test with different OSM dataset and contributed data, but in same MXD. If process fails, could indicate this issue: https://github.com/Esri/arcgis-osm-editor/issues/18

Pass: Data should upload to OSM without issue and with a reasonable bounding box.

Fail: Data does not upload and user experiences error as described [https://github.com/Esri/arcgis-osm-editor/issues/16 here]. Also, if data uploads but bounding box is incorrect or not present.

Test for Node ID Ordering 2

  • Open ArcMap
  • Run Download OSM Data tool for two different geographies, resulting in two unique datasets
  • Symbolize each
  • Edit the first dataset and save edits
  • Open revision table and verify that all nodes and ways are captured in the table
  • Edit the second dataset and save edits
  • Open revision table and verify that all nodes and ways are captured in the table
  • Upload first set, and the second set edits
  • Verify that all edits appear in OSM changeset, and that geographies and tags appear as well