Git Product home page Git Product logo

Comments (5)

phibos avatar phibos commented on June 8, 2024

At the moment it is not possible to export the data(Result()). But I like the idea and it might help to decrease the time to create a proof of concept.

Are you looking for a way to export the data in the OSM-XML format? http://wiki.openstreetmap.org/wiki/OSM_XML

from python-overpy.

gregmacfarlane avatar gregmacfarlane commented on June 8, 2024

That's exactly what I want right now.

What I need eventually is a graph/network xml that can be read by MATSim, a Java-based transportation simulator. MATSim includes classes that read an OSM-XML file and convert it into a network file that it can use, a process described here.

Basically, I'm trying to find a way to automate/code the first couple of parts in that process, where the user

  1. downloads the file for the geography they want,
  2. queries the file to extract the highways that the network will use.

It seems overpy consolidates these two steps into a single convenient query, but I can't pass it on.

from python-overpy.

gregmacfarlane avatar gregmacfarlane commented on June 8, 2024

Of course another solution for me would be to write the code to turn the OSM data into a usable network directly in python. But that's my problem, not yours!

from python-overpy.

dbuse avatar dbuse commented on June 8, 2024

As a workaround you can simply fire your queries (in xml or overpass query language) at the overpass-interpreter (e.g. http://overpass-api.de/api/interpreter) using wget, curl etc and save the file.

Alternatively you can build xml structures quickly using pythons built-in xml libs. I am currently working on a very similar project extracting data from OSM for the SUMO simulator.

However, being able to export overpy results to xml (or json) would be quite advantageous.

from python-overpy.

SilvanaP avatar SilvanaP commented on June 8, 2024

Hello, 07b638a has a bug in line 62, it writes out the node id but it should be the way id - I commented also directly under the file in more detail. Otherwise the script works great, thanks!

from python-overpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.