Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating custom OSM maps #39

Open
SteffenMuehle opened this issue Mar 16, 2021 · 1 comment
Open

Creating custom OSM maps #39

SteffenMuehle opened this issue Mar 16, 2021 · 1 comment

Comments

@SteffenMuehle
Copy link

Hi and thanks a lot for your work!

I have an agent-based simulation running on an OSM map, using your package as well as Agents.jl.
For testing purposes, I'd like to use a custom made OSM map, instead of a "real" map from an .osm file.
The custom made OSM map could be a simple square grid for example, with homogeneous weights etc.

Is there an easy way to create a custom instance with OpenStreetMapSpace type?

Best regards
Steffen

@pszufe
Copy link
Owner

pszufe commented Mar 17, 2021

Thank you for using OpenStreetMapX
All this library does is to translate an OpenStreetMap to a LightGraphs graph with a set of metadata. Hence, essentially a map that can be further processed by other libraries is just a graph.
Hence perhaps what you need for your simulation is a piece of code to generate such graph.

If you really need it to be MapData for some reason, you could use the constructor:

MapData(bounds, nodes, roadways, intersections, g, v, n, e, w, class)

(see ?MapData for details).

It would be perhaps possible to create a simplified constructor that just takes a graph, weights and node locations. If you want to make such contribution to OpenStreetMapX, I am all open to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants