OpenStreetMap

Jothirnadh's Diary

Recent diary entries

Breaking route relations while splitting roads

Posted by Jothirnadh on 8 June 2017 in English. Last updated on 14 September 2018.

The most common error we end up doing while splitting well-mapped roads in a highly mapped area is by breaking a route relation. This usually involves breaking the continuity of a bus or highway route due to missing members. The community has reported broke route relations while the data team was trying to improve navigation features (Turn lanes & turn restrictions) in US cities. On thorough research found some points to share with you all and hope this helps in solving route relations breakages in future.

The first thing to note, there is nothing wrong with any of the split way or knife-tool that we use to split the road. In general, route relations are very long and spreads across the city. When two or more persons work at the same time, on editing roads part of the same route relation, JOSM will throw relation edit conflict. This conflict is very specific on which version of the edit to keep and which one to remove. In general, people tend to resolve the conflict by pushing their edits and skipping the other’s edits. This causes the route relation breakage. Let me explain clearly with examples.

Example:

For this use case, I took a bus route (Relation: 333P) in Bangalore, India and tried to download the data into JOSM at two corners of the route into two different layers (layer-1 & layer-2). Now the route relation 333P has 89 members at version-61.

Route Relation: 333P in Bangalore with the location of a road to split in layer-1 and layer-2

  • In layer-1 the road with route relation 333P is split at any node and uploaded to OSM. This will split the road into two segments, one with version 1 and other will continue with version n+1. As one road is split into two roads, JOSM will also add the new road segment into relation. Now we have 90 members in the relation and version is increased to 62.
  • Lets shift to layer-2 which is still in Version 61 & 89 members. Split a different road with route relation 333P into two segments. While uploading the data to OSM a conflict dialog box pops up with 1 conflict.

The OSM server rejects the upload since it has a newer version of the relation

  • We now need to merge the server version 62 with our version 61 before it can be uploaded to the server. In the resolve conflicts tab I selected my version of the relation to use for the merged result.

Current version (my edits) and OSM version in Resolve conflict tab

After pushing my current edits without considering the other version in OSM

  • Due to this, the JOSM will only keep the members that are split in layer-2 to the route relation 333P and remove one member (the road segment with version 1) that is added in layer-1 from the route relation. This will break the route relation.

How to avoid route relation breakages?

  • To avoid breaking the continuity in the relation, it is necessary to include the new members from both versions in the merged relation
  • Like previously, while resolving conflict in layer-2 and once we choose our version in Resolve conflicts window, JOSM will automatically freeze any more edits. But we still need to add the missing member from layer-1.

  • Now by clicking Unfreeze option at the bottom of the dialog allows us to continue to make changes to the merged version

  • Now the important part - Find the new member in the relation member list from the server version (Their version). The conflict dialog will highlight this is red to indicate that it is only present in this list. Select this member and add it to the merged version of the relation.

  • Now all the missing members are added to the relation. Click on Freeze → Apply Resolution → Upload to OSM. Check if the relation has any breakages (It should not anymore 😉)

Resolving relation conflicts can be challenging since it can be difficult to get the context of the edit in a list of object id’s. If JOSM can be intelligent enough to preserve the continuity of a relation over conflicting edits, then it can identify the missing member and add it to the relation without causing the relation to break. Want your ideas on how we can resolve this issue following a much simpler approach.

This is one case I came across and there might be many such cases where even inexperienced mappers may be unknowingly breaking relations if they are not familiar with proper conflict resolution. Please feel free to post your thoughts on this and share any easier workflow you may have to resolve such conflicts.

P.S. Always before uploading modified data into OSM check for their updates on OSM just by pressing ⌘+U for MAC, cntrl + U for Windows and Linux users (Update data) 🖐️

Happy mapping!

Location: Old Binnamangala, Bengaluru, Bangalore North, Bengaluru Urban, Karnataka, 560001, India

Reverting huge changesets using JOSM

Posted by Jothirnadh on 14 September 2016 in English. Last updated on 14 September 2018.

OpenStreetMap is a great place where we can share the on-ground information with the community. Most of the time the data we add is good, but sometimes we might end up adding bad data. We might even come across unspecified bad imports which are supposed to be reverted. To overcome this we have a reverter plugin in JOSM, which helps in reverting data on changeset basis. The plugin works fabulously in reverting small changesets but fails to revert huge changesets with the below popup:

screen shot 2016-09-14 at 5 22 16 pm

There is no proper documentation for reverting huge changesets. On through research found that it’s because of the less socket.timeout given by default in JOSM. If we adjust the socket.timeout then the reverter plugin started to work well with big datasets. The below values worked for me.

image

You can adjust your socket.timeout by going to –> JOSM > preferences > advanced preferences

For more tools to revert, see the OSM Wiki -> http://wiki.openstreetmap.org/wiki/Change_rollback

Hope my findings help you with better mapping. Let me know if there is any other simpler way to revert as there is no proper documentation for reverting huge changesets.

Happy mapping!

Mapping turn lanes in San Francisco, Washington DC and Los Angeles

Posted by Jothirnadh on 13 April 2016 in English. Last updated on 14 September 2018.

San Francisco, Washington DC and Los Angeles just got 51,385 turn lanes added to the map over the last 3 months. This was part of the push by the Mapbox data team to enrich OSM for better navigation and guidance.

screen shot 2016-04-13 at 3 15 06 pm Turn lanes added in LA

All the mapping tasks were coordinated and documented on GitHub. We’re simultaneously working to create a navigation mapping guide to consolidate a lot of documentation on the wiki with added context for the areas we work on. This should make it easy for new mappers improve OSM in their areas and also help potential users of the map data understand the tagging model. The comments and suggestions from the community helped us a lot in improving the guide and to speed up the mapping process.

screen shot 2016-04-01 at 5 40 09 pm
Split up of turn lanes added

Please share your feedback on our changesets or at the Mapbox/mapping repository.

Happy Mapping!

Fixing the tagging errors in Rajahmundry

Posted by Jothirnadh on 16 February 2016 in English. Last updated on 14 September 2018.

In my previous hometown mapping of Rajahmundry post, I pointed out some of the data errors present. I contacted most of the OSM contributors and found that most of the data was added as part of a local muncipality project. It is nice to see that my local municipality is adopting open data in order to reach citizens and it will be the best opportunity to provide awareness of open data among the local citizens.

The data they added were from local surveys. I personally verified some points and I can attest that the locations are accurate, however, I found several cases of wrong tagging. For example, they mostly used the Name instead of name. According to OSM convention, keys should be the lower case.

screen shot 2016-02-16 at 2 23 56 pm

Wrongly tagged point features

To fix this, I extracted all the point features within the city using overpassturbo and exported that data into JOSM. There were a total of 480 point features tagged as Name instead of name. I selected all the point features in JOSM and retagged them with name tag. The names are now properly rendered in OSM.

screen shot 2016-02-16 at 2 25 30 pm

Names are now rendered, but more work is needed

Next actions:

  • There are more features that were not properly tagged, I’m now categorizing these errors in order to fix them.
  • All the mapped buildings are wrongly mapped. There is no connection with the buildings on the ground/imagery to the ones mapped. I’m proposing a clean-up of this area which I posted for discussion to the mailinglist.
  • Communicate with the contributors from http://mana-rajahmundry.org/ to help them fix the errors.

Suggestions and comments from the OSM community members are always welcome. Happy mapping.

Location: Old Binnamangala, Bengaluru, Bangalore North, Bengaluru Urban, Karnataka, 560001, India

Improving the road network coverage in Myanmar

Posted by Jothirnadh on 2 February 2016 in English. Last updated on 14 September 2018.

Myanmar is witnessing an unprecedented growth in international tourist arrivals following major democratic reforms since 2011. On OSM, around 70,000 kms of roads have been mapped so far, or roughly 42% of the total reported roadways.

Most of the major highways (motorways, trunk, primary, secondary and tertiary roads) are well mapped in the major cities of Yangon, Mandalay, and Naypyidaw, but there are a lot of missing residential and unclassified roads visible in the imagery. Over a period of three weeks, the Mapbox data team was able to add a total of 7,690 missing streets, out of which 2559 and 5131 streets were added in Mandalay and Yangon respectively.

yangon changes
Missing streets in Mingaladon locality in Northern Yangon

A full map of all objects added or modified by the Mapbox data team.

Issues we faced

  • Lack of an active Myanmar mailing list or forum made it difficult to reach out to the local mapping community for collaboration.
  • Identifying the streets in densely populated places is difficult because of the buildings and thick tree canopy. Lack of GPS traces in these areas also hampered the process to add missing roads.
  • There is a lack of road network classification guidelines for Myanmar in the OSM wiki and the general highway classification guide was used for this purpose.
  • Most roads that were previously added seem to be from lower resolution imagery and required cleanup.

How you can contribute

  • Prepare an OpenStreetMap wiki for the road tagging classification in Myanmar similar to Indian roads tagging classification.
  • Community members can engage in contributing to other cities of Myanmar by adding missing roads.
  • It would be good if local mappers can add more GPS traces so that we can add the roads covered under canopy and buildings.
  • Community members can also review our edits and give feedback.


Dhammayangyi temple in Myanmar. PD user:Hintha

Location: Hoysala Nagara, East Zone, Bengaluru, Bangalore North, Bengaluru Urban District, Karnataka, 560038, India

Adding missing towns and villages in OSM

Posted by Jothirnadh on 25 November 2015 in English. Last updated on 14 September 2018.

Adding missing towns and villages in OSM (India)

In India, there are ~7935 cities/towns officially recognized by the Government of India according to the 2011 census. But in OSM, there are only 3352 (as of 2015-11-23) cities/towns mapped as place node.

As the first step of mapping, it is important to mark all the major cities and towns in the country. The Mapbox data team did some background analysis of the data in OSM and compared it to other publicly datasets. This guide will walk through the step of using a public domain map layer from geonames.nga.mil for improving the location of India’s towns/cities in OSM using JOSM.

Download JOSM

  • JOSM - If you are new to JOSM you can find help in this guide

Add the GNS layer in JOSM’s Imagery Preferences

  • To add the GNS layers within JOSM, go to Imagery > Imagery Preferences.
  • Add a new WMS entry.
  • In the Enter service URL, paste the following parameters: http://geonames.nga.mil/names/service.svc/get?FORMAT=image/jpeg&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&LAYERS=Approved__N_&STYLES=&SRS={proj}&WIDTH={width}&HEIGHT={height}&BBOX={bbox}. Click Get layers.
  • In the Select layers, choose the Approved_(N) layers.
  • In the Image format, choose image/png. Click OK adding gns layer

Load background layers in JOSM

  • Add Bing imagery as the satellite background.
  • To add the added GNS layer, click Imagery > geonames.nga.mil: Approved_(N)
  • Note: Click ok for the warning then JOSM will take care of the image projection issues.

adding gns and bing layers

Start editing OSM data

  • Download the data in OSM.
  • Use the Geonames layer as a reference for missing towns/cities within your editing area.
  • Make sure that you download an OSM data layer of the location you are working on and if the data is missing add it to the map. The tags that can be added to a place can be found here
  • NOTE: GNS data accuracy varies from place to place. Refer to the satellite imagery to accurately position the nodes you added in OSM.
  • Upload your edits and the following comments:

changeset comment: "Add place town nodes" source comment: "Bing, geonames.nga.mil WMS"

ezgif com-optimize 1

Location: Indiranagar 1st Stage, Bengaluru, Bangalore North, Bengaluru Urban, Karnataka, 560001, India

Mapping my hometown Rajahmundry

Posted by Jothirnadh on 10 November 2015 in English. Last updated on 14 September 2018.

Rajahmundry is one of the most populated cities in Andhra Pradesh, India. It is located on the banks of Godavari river and it is most known for its high cultures and traditions. Rajahmundry is also known as the ‘Cultural Capital’ of Andhra Pradesh.

Problems encountered while mapping

I started my OSM mapping journey recently and the first thing I wanted to map is my hometown (Rajahmundry). In the beginning, I was quite surprised to see that most of the roads and buildings of the city are already mapped by OSM mappers for which I’m always thankful. This made my work much simpler and thought of adding names to the streets which I’m familiar with, but soon I started to encounter errors in the data. The most common error is the misalignment of data, which I mentioned in the following context.

1. The difference in Satellite data

The city is having overall coverage of Bing imagery but the Satellite data is divided into three major blocks. The center block is from 2013 coverage, the upper block is from 2012 coverage and the lower right block is from 2011 coverage.

screen shot 2015-11-09 at 10 54 34 am

There is a significant shift at the intersection of these blocks

screen shot 2015-11-09 at 11 51 20 am

screen shot 2015-11-09 at 11 52 40 am

This is the major reason that caused data alignment problems in this city.

2. Misaligned roads

Due to the shift in the merging of satellite data the roads in this blocks are completely misaligned. Most of the roads are aligned to the older satellite imagery and the others are aligned with the newer satellite imagery. This brought a lot of mess in the data.

screen shot 2015-11-09 at 12 13 50 pm

3. Building digitization

Most of the buildings at the heart of the city are digitized by different contributors but are digitized in different time periods which caused data alignment problem. Also, the satellite image is not that clear to identify the building footprints, which made it hard for the contributors to identify the exact building dimensions I guess.

screen shot 2015-11-09 at 12 51 08 pm

4. Misplaced Hospitals and medical shop’s

The only thing one can identify by looking at the cities data is Medical symbols marked all around the city. I’m sure that there are many hospitals and medical stores in the city but not as many as marked on the map. I personally went to the marked locations of some medical stores but failed to find most of them. It seems like all the medical related shops and hospitals are imported by a single user whom I need to contact and know the details of the imported data.

screen shot 2015-11-09 at 1 17 19 pm

What I tried to contribute so-far

Cleaning up the data without a proper understanding of the background is pretty hard. In the beginning, I started to align the roads to the Bing imagery, but later I found the shift in the imagery itself which spoiled my previous work. I tried to delete all the duplicate roads and nodes. I did not touch the building alignment work as the imagery is not clear enough to mark the building footprint (hoping to get clear imagery soon). I also made some changes to the borders of the Rajahmundry Airport. I aligned the roads with the available imagery but I don’t think it’s the best process to follow.

All together my edits look as below, but there are a lot more to go

screen shot 2015-11-09 at 1 28 43 pm

What I intended to do in Future

  • Hoping for some suggestions from the community members to take further actions in such conditions.
  • Will try to contact the user who made huge import of data (mainly medical related) to know the details of the collected data to identify the data quality.
  • Try to contact local mappers to improve the data.
  • Will try my best to arrange a mapping party to grow the local mapping community.
Location: Rajamahendravaram, Rajahmundry (Urban), East Godavari, Andhra Pradesh, 533100, India