<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Spencer,<div><br></div><div>I'm using Overpy to fetch data using Overpass API, then process it, then send it to JOSM using its remote control feature:</div><div><br></div><div><a href="https://github.com/osmbe/public_transport.git">https://github.com/osmbe/public_transport.git</a><br></div><div><a href="https://github.com/osmbe/public_transport/blob/master/scripts/OSM_data_model.py">https://github.com/osmbe/public_transport/blob/master/scripts/OSM_data_model.py</a><br></div><div><a href="https://github.com/osmbe/public_transport/blob/master/scripts/Agency.py">https://github.com/osmbe/public_transport/blob/master/scripts/Agency.py</a><br></div><div><br></div><div>You can experiment with it in this Notebook:</div><div><br></div><div><a href="https://colab.research.google.com/drive/14ggsAKrs9gs03AVSNIGlWsLWJEq7EAaF#scrollTo=4GOsvegsGPxM">https://colab.research.google.com/drive/14ggsAKrs9gs03AVSNIGlWsLWJEq7EAaF#scrollTo=4GOsvegsGPxM</a><br></div><div><br></div><div><br></div><div>Maybe it helps. In a previous iteration all this did involve loading the data into a PostGIS database:</div><div><br></div><div><a href="https://github.com/PolyglotOpenstreetmap/OSM_PublicTransportRoutes">https://github.com/PolyglotOpenstreetmap/OSM_PublicTransportRoutes</a><br></div><div><br></div><div>Polyglot</div></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 21, 2018 at 2:16 PM Spencer Gardner <<a href="mailto:spencergardner@gmail.com">spencergardner@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I'm researching options for a Python-based tool that uses OSM data. From what I can gather there's no native Python library for OSM imports to a PostGIS database. (Yes, imposm is developed in Python but there's no documentation I can find on how to use it as a Python library--it appears to be intended as a command line tool). This seems odd to me since there's such a large community of OSM users. I feel like I'm missing something. Are there other viable Python libraries I'm not aware of? (Viable = large-ish user base and history of bugfixing.) Is there documentation for using imposm within Python that I've overlooked?<div><br></div><div>Bonus points for:</div><div>- Windows compatibility</div><div>- No external (i.e. non-Python) libraries needed</div><div><br></div><div>Thanks for any help!</div></div>
_______________________________________________<br>
dev mailing list<br>
<a href="mailto:dev@openstreetmap.org" target="_blank">dev@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/dev" rel="noreferrer" target="_blank">https://lists.openstreetmap.org/listinfo/dev</a><br>
</blockquote></div>