Hello OHM community! I’m making this post to summarize what was developed in my Google Summer of Code project, where I was mentored by Minh Nguyễn. The project’s title is Formatted citations in OpenHistoricalMap and it’s goal was to work on iD to improve the way users use sources when creating features. This is the project’s page: Google Summer of Code
Before the project, when an iD user wanted to cite the source they used to find info about a feature, they used the “Sources” field, that was a plain text field mapped to the source=*
key. The project I worked on aimed to change the way users cited sources using that field and perhaps other fields, to allow them to add more detailed sources that were also easier to filter, if another user needed to.
As the raw tag editor allows users to add any key they to a feature, some users use other key-value pairs to cite their sources. The {field}:source=*
key is sometimes used to explicitly cite the source where the info about {field} was found, so name:source=*
is used to say where they found the feature’s name.
Besides that, some users number their sources like source:1=*
and source:2=*
to cite two different origins for the feature’s info, they could be a book and an academic paper, for instance.
Another example is that keys in the style of source:name=*
and source:url=*
are also used to give more structure to the citation, separating the source’s name from it’s URL and other information about the source, like the date it was published, it’s author and so on.
We wanted to add specific fields in iD where users could edit the values for those keys without using the raw tag editor. To do that, the project was split in three main parts, each to tackle one new way to cite sources:
-
A subfield named “Source for {field}” was created, it can be added to any existing field, and is mapped to
{field}:source=*
. To make it show up, users shoud click the “@” button close to the field’s label. This allows users to write sources specific to that field that might not be related to the rest of the feature. Add source subfield to other fields #217 implements this and the update is already in production.
-
The field previously named “Sources” was renamed to just “Source” and now has more than one input. The previous plain text input still exists and expects a general description of the main source used, and it still maps to
source=*
. Three more rows were added to the field, one for the source’s name, another for the URL where it can be found and another for it’s date, each mapping tosource:name=*
,source:url=*
andsource:date=*
respectively. This allows users to specify more information about the source, and allows other people to filter a more specific type of data, e.g. If someone only wants URLs, they can use thesource:url=*
key. It not necessary to fill in all of these rows if the user doesn’t have all of the data for them. Update sources field #222 implements this, but it is not in production yet.
-
A functionality was added to allow users to cite multiple different sources. When the “Source” field has data, the user can go to “Add field” and add a field named “Source 1” that behaves exactly the same as “Source”, but is mapped to
source:1=*
. When “Source 1” has data, they can add “Source 2” and so on, until “Source 3”. The number of sources was limited to 4 (The original “Source” plus the 3 additional ones) because users only very rarely add more than 4 sources, but this limit can be increased in the future. [Add multiple source fields by pedromml · Pull Request #223 · OpenHistoricalMap/iD · GitHub](Add multiple source fields #223) implements this, but it is still being finished and will be merged soon.
And that’s what was developed in the project! Now that the changes are being deployed to production, users might have doubts about them or might want to tweak something or report a bug, and I’m open to working on that!
This was my first time on open source and I’m happy that I got to contribute to OHM and OSM!