Add or change feature properties - Esri/arcgis-osm-editor GitHub Wiki

This customization allows you to add feature properties that are not by default present in the feature’s attributes. For example, you are editing buildings in OSM, and you want to also add information about the buildings’ roofs, walls, and floor levels. So you Start Editing, right click on a building feature, Select “Attributes” only to find that the attribute editor does not have the subtype for your building features as an option. This customization gets those desired attributes into your ArcMap editing environment.

To do this, you will create a new version of the OSMFeaturesProperties.xml file, edit it, and then update the Editor Options in ArcMap to reference your customized file. The OSMFeaturesProperties.xml file - found in the \\OSMEditor\bin folder - configures what attributes (OSM tag keys) and what suggested attribute values (OSM tag values) are presented to you in the ArcGIS editor environment.

The OSMFeaturesProperties.xml file has the following outline:

  • osmfeatures: xml root element
  • baseInfoURI: default URL for the OSM wiki feature help page
  • osmfeature id=”#” name=”” displayname=”” infoURL=http://: XML description of OSM feature with the following XML attributes:
    • id: (required) unique feature number
    • name: (required) “=” delimited string concatenation of feature domain feature name
    • displayname: (optional) localizable description of OSM feature, if missing the name of feature will be used
    • infoURL: (optional) link for online wiki help, if missing the base URL and the name of the feature will be used
  • tag ref=”” value=”” optional=”true|false”: suggested OSM tag keys with the following XML attributes:
    • ref: (required) reference to tagkey entry
    • value: (optional) default value for mentioned tag key
    • optional: (optional) flag if the tag key is required or optional
  • tagkey name=”” displayname=““ editable=”true|false” infoURL=““ tagtype=”taglist|tagstring|tagdouble|tagdouble“: XML element for the OSM tag key with the following XML attributes:
    • name: (required) name of the OSM tag key
    • displayname: (optional) localizable description of the OSM tag key, if not provided the name itself will be used
    • editable: (optional) can the user edit the name of the field, the default is false
    • infoURL: (optional) link for the online wiki help, if no URL is provided the autogenerated URL is a concatenation of the base URL and the name of the key
    • tagtype: (required) what type of a OSM key is this, if the key is of type "taglist" then the XML element will have one or more tagvalue child elements
  • tagvalue name=”” displayname=”” infoURL=””: XML element describing suggested value for a specific tag key using the following XML attributes:
    • name: (required) name of the value – essentially the value itself
    • displayname: (optional) localizable description of the value
    • infoURL: (optional) link for the online wiki help, currently not used
Below is an example for the default feature properties description for the "highway=motorway" feature, and further below a section where the values for the 'access' tag are defined:
<osmfeatures xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
  <baseInfoURI>http://wiki.openstreetmap.org/wiki/</baseInfoURI>
  <osmfeature id="0" name="highway=motorway" displayname="Motorway" infoURL="http://wiki.openstreetmap.org/wiki/Tag:highway%3Dmotorway">
    <tag ref="access" value="no" optional="false" />
    <tag ref="motorcar" value="yes" optional="false" />
    <tag ref="hgv" value="yes" optional="false" />
    <tag ref="oneway" value="yes" optional="false" />
    <tag ref="surface" value="paved" optional="false" />
    <tag ref="name" optional="true" />
    <tag ref="ref" optional="true" />
    <tag ref="lanes" optional="true" />
  </osmfeature>
...
    <tagkey name="access" tagtype="tag_list" infoURL="http://wiki.openstreetmap.org/wiki/Key:access">
      <tagvalue name="unknown" displayname="Unknown" />
      <tagvalue name="yes" displayname="Yes" infoURL="http://wiki.openstreetmap.org/wiki/Tag:access%3Dyes"/>
      <tagvalue name="designated" displayname="Designated" infoURL="http://wiki.openstreetmap.org/wiki/Tag:access%3Ddesignated"/>
      <tagvalue name="official" displayname="Official" infoURL="http://wiki.openstreetmap.org/wiki/Tag:access%3Dofficial"/>
      <tagvalue name="destination" displayname="Destination" />
      <tagvalue name="agricultural" displayname="Agricultural" />
      <tagvalue name="forestry" displayname="Forestry" />
      <tagvalue name="delivery" displayname="Delivery" />
      <tagvalue name="permissive" displayname="Permissive" />
      <tagvalue name="private" displayname="Private" />
      <tagvalue name="no" displayname="No" />
    </tagkey>
Adding or adjusting tags and tagvalues is simply a matter of making a copy of this file, and then editing it in accordance with the tag conventions described at http://wiki.openstreetmap.org/wiki/Map_Features. In the example below, the tags for maxspeed and minspeed are added.
<osmfeatures xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
  <baseInfoURI>http://wiki.openstreetmap.org/wiki/</baseInfoURI>
  <osmfeature id="0" name="highway=motorway" displayname="Motorway" infoURL="http://wiki.openstreetmap.org/wiki/Tag:highway%3Dmotorway">
    <tag ref="access" value="no" optional="false" />
    <tag ref="motorcar" value="yes" optional="false" />
    <tag ref="hgv" value="yes" optional="false" />
    <tag ref="oneway" value="yes" optional="false" />
    <tag ref="surface" value="paved" optional="false" />
    <tag ref="name" optional="true" />
    <tag ref="ref" optional="true" />
    <tag ref="lanes" optional="true" />
    <tag ref="maxspeed" optional="true" />
    <tag ref="minspeed" optional="true" />
  </osmfeature>
Save the file once you are done editing it.

Using the Updated Data Model

Once you've created new updated configuration files, you can reference them in the editor options on the OpenStreetMap tab. To do this, see Change OSM Editing Options.


Back to Documentation
⚠️ **GitHub.com Fallback** ⚠️