Skip to content

Instantly share code, notes, and snippets.

View planemad's full-sized avatar

Arun Ganesh planemad

View GitHub Profile

This is a Japanese version of the post by user:PlaneMad - Data issues in Japan

Over the last few weeks, the data team at Mapbox have been investigating the unusually large number of unconnected highways in Japan which otherwise looked comprehensively mapped.

screenshot 2015-10-08 17 25 25 Broken highways in Japan. Bigger circles indicate highways of higher classification

Looking into the data threw up quite a few interesting findings:

Advanced configuration

Hidden settings in JOSM can be configured directly from the advanced preferences panel. This also gives you access to export and import your configuration profiles.

The panel is hidden by default and is shown as the last option when Expert mode is enabled. screenshot 2015-10-15 14 42 52

Note JOSM will need to be restarted for any changes to take effect.

Create a simple development environment for your html/css/js projects.

Checklist

Share your code with GitHub

Fixing common mapping issues

Identifying common mistakes made by beginner mappers and knowing ow to fix them is important to improve the quality of the map. If you spot something which needs fixing, send a friendly message on the users' changeset on what was wrong and how it could be fixed. You can use this guide as a reference.

Issue Whats wrong How to fix it Tips
Overlapping ways A linear way goes over itself or another way with the exact same tags (note the arrows on the selected way) Delete the overlapping way, make sure there are no gaps or missing pieces left behind. You can use the JOSM validator to detect these issues

Adding imagery in JOSM

You can add imagery sources from WMS, TMS or even a scanned map source into JOSM for mapping into OpenStreetMap.

Imagery Sources

The imagery menu lists common imagery sources that is open to use for tracing for OSM. The most common imagery to use in from Bing which has fairly high resolution worldwide coverage at 30m/px resolution.

Tile Map Service (TMS)

Web Map Service (WMS)

{
"project": {
"type": "task",
"name": "Turn Lanes",
"description": "Mapping turn lanes from satellite imagery",
"doc_url": "https://github.com/mapbox/mapping/issues/153",
"changeset": {
"comment": "Add missing turn lanes from satellite imagery https://github.com/mapbox/mapping/issues/153",
"source":""
},

AC Boundaries

  • Export attribute table to assembly_constituencies.csv including .csvt headers
  • Convert field types using field calculator
    • stateCode = toInt("ST_CODE")
    • stateCode = toInt("ST_CODE")
  • Import into GRASS v.in.ogr.qgis as assembly_constituencies
  • Remove small areas v.clean.rmarea with threshold 10000 : 617 areas of total size 574572 removed
  • Dissolve into parliamentary_constituencies with field PC_NAME : v.reclass complete. 4391 features reclassed.
@planemad
planemad / overpass.md
Last active October 10, 2021 03:31
Creating custom OSM based maps using Mapbox

If you have been playing around with the new Mapbox Studio you might be interested to know how to make a custom map with objects of your own interest from OpenStreetMap.

To make the process of creating an updating an OSM based dataset on Mapbox more seamless, I was looking into a command line based workflow that could extract OSM data from Overpass and update a Mapbox hosted dataset in one go.

Requirements

Generate an Overpass Query

  • Use Overpass Turbo to create a query for the data you are interested in extracting. Since i'm interested in bus stops, I first browse the map to Bengaluru, India and then generate a query using the wizard query highway=bus_stop