Presets are predefined set of tag(s) that represent a feature on the ground, for example, a Park. The idea of presets is widely used in OpenStreetMap and the iD editor makes it much easier. Presets can define fields, icons, and more metadata to make the feature unambiguous.
Though, it is still pretty difficult to create a new preset or edit an existing preset without having to rebuild iD. The HOT Visual Tag Chooser is a great preset editor which is compatible with JOSM. It allows you to export and import presets as an XML. iD makes it easy to deal with presets by defining them as JSON and parsing them appropriately. This makes us think that the preset editor is a sensible feature for iD.
Broadly, we should be able to create new presets and edit existing ones. This means that there should be a way to keep track of the presets. We thought it made sense to extend the OpenStreetMap rails API to include end-points to create, edit and delete presets. This can be used to fetch the presets and then loaded into iD. As a first step, we modified iD to enable sideloading of presets via an external JSON or an HTTP request.
Next, we extended the OpenStreetMap rails API to include CRUD for presets.
The modifications in iD are a bit crude because this is a proof of concept. We realize that there’s a lot of room for improvement. Since we are still getting a handle on how everything works in iD, there are several questions that came up during this process, such as:
We are hoping that this blog post will encourage conversations around the work that we have been doing and we can hopefully make the preset editor more concrete.