NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

My goal is to obtain the driving road network of a certain area using open street map data. Reference link: What's the general algorithm to draw a road network of a certain area? I'm using Julia package OpenStreetMapX. In the function call get_map_data, I realized that there is the other function OpenStreetMapX.crop!(osmdata, crop_relations = false). I understand that the purpose of this function is to crop the nodes, ways, relations based on a given bounds. I'm confused about these two different methods.

asked 24 Oct '19, 10:39

good0's gravatar image

good0
11112
accept rate: 0%

edited 27 Oct '19, 14:24

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701


I had a quick look at the repo and there didn't seem to be a crop function to start with, see https://pszufe.github.io/OpenStreetMapX.jl/latest/reference/ Further I didn't see any PBF format support, just OSM xml format.

I would suggest asking the author for support as it is rather unlikely anybody here will be able to help you.

permanent link

answered 27 Oct '19, 14:33

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

The crop function is here: https://github.com/pszufe/OpenStreetMapX.jl/blob/master/src/crop.jl The .osm file is supported as the following: using OpenStreetMapX map_data = get_map_data("/home/ubuntu/mymap.osm"); println("The map contains $(length(map_data.nodes)) nodes")

(28 Oct '19, 12:33) good0

If just doesn't turn up in the documentation.

(28 Oct '19, 14:43) SimonPoole ♦

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×3
×1

question asked: 24 Oct '19, 10:39

question was seen: 1,684 times

last updated: 28 Oct '19, 14:43

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum