Skip to content

faq 300810241

Billy Charlton edited this page Sep 5, 2018 · 2 revisions

[Network file] Select small area of map as network file

by Nodeshee Roopchund on 2018-07-07 04:39:28


Hello,

I want to know how to select only part of a network on OpenStreetMap?I need only a squared area on the map. How to select only this squared area and upload it to my Matsim evacuation network file?

Thankyou


Comments: 2


Re: [Network file] Select small area of map as network file

by Johan W. Joubert on 2018-07-07 05:45:08

Hi Nodeshee, I can think of three ways of doing it:

  1. Just go directly to OpenStreetMap, select the Export tab at the top, and then define your square area manually (on the left), or use the `Manually select a different area' link to click-and-drag your area of choice. You can then download that as an *.osm file.

  2. If you have the [Java OpenStreetMap Editor JOSM you can download only the area you're interested in. Come to think of it, there is a MATSim plugin for JOSM that you access/activate from within JOSM (just search through its plugins).

  3. If you want to automate the process, i.e. have to do it many times as-and-when you update the OpenStreetMap data, like I do with South African networks, you may want to automate it using scripts. For this I find that osmosis is useful. It is a command-line tool that have many functions to manipulate OpenStreetMap data. Two of those functions that might be useful to you is clipping an *.osm file, either providing the min and max longitude and latitude, or providing a polygon.

Hope that helps. Best, Johan


Re: [Network file] Select small area of map as network file

by Nodeshee Roopchund on 2018-07-07 06:23:21

Hi Joubert,

Thankyou for your reply. I tried the first way by manually selecting but the select shape is a square? I have uploaded an image of the area that I want to select for my evacuation. Is it possible to select only the square in the image?

Clone this wiki locally