<html><head></head><body><div class="ydp87b40943yahoo-style-wrap" style="font-family: verdana, helvetica, sans-serif; font-size: 13px;"><div><div><span><span></span><span></span></span>For Building quality analysis, I extract data from Overpass-API and I import into PostgreSQL/PostGIS schemas, <span><span>I use a solution based on <span><span><span>osmosis pgsnapshot_schema_0.6. This solution similar to OSM2Pgsql is well documented and facilitates a lot importing OSM database extracs into PostGIS.<br></span></span></span></span></span></div><div><br></div><div>Telenav uses a similar approach that they documented on Github<br></div><div>See <a href="https://github.com/TelenavMapping/verifying_our_edits" rel="nofollow" target="_blank">https://github.com/TelenavMapping/verifying_our_edits</a></div><div><br></div><div>The Osmosis instruction to import in <span> PostgreSQL, </span>do not let specify a particular database schema. Like in the main.sh script, the solution is to first load data in the public schema. Once loaded, it is moved it to a particular schema. <br></div><br><div class="ydp87b40943signature"><span style="font-style:italic;color:rgb(0, 0, 191);font-weight:bold;"> <br><font face="garamond, new york, times, serif">Pierre </font><br></span></div></div>
<div><br></div><div><br></div>
</div><div id="ydp7e5124adyahoo_quoted_5863485366" class="ydp7e5124adyahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
Le vendredi 21 décembre 2018 09 h 08 min 41 s HNE, Michael Reichert <osm-ml@michreichert.de> a écrit :
</div>
<div><br></div>
<div><br></div>
<div><div dir="ltr">Hi Spencer,<br clear="none"><br clear="none">Am 21/12/2018 um 05.54 schrieb Spencer Gardner:<br clear="none">> I'm researching options for a Python-based tool that uses OSM data. From<br clear="none">> what I can gather there's no native Python library for OSM imports to a<br clear="none">> PostGIS database. (Yes, imposm is developed in Python but there's no<br clear="none">> documentation I can find on how to use it as a Python library--it appears<br clear="none">> to be intended as a command line tool). This seems odd to me since there's<br clear="none">> such a large community of OSM users. I feel like I'm missing something. Are<br clear="none">> there other viable Python libraries I'm not aware of? (Viable = large-ish<br clear="none">> user base and history of bugfixing.) Is there documentation for using<br clear="none">> imposm within Python that I've overlooked?<br clear="none"><br clear="none">There are currently two serious import programmes for OSM data into<br clear="none">PostGIS databases – Osm2pgsql and Imposm 3. The first one is written in<br clear="none">C++ (formerly C), the second one in Go.<br clear="none"><br clear="none">I am not aware of any well-known Python library for an import. Given the<br clear="none">typical use cases and the speed of existing solutions, it is unlikely<br clear="none">that there is any. There are Python bindings of the C++ library<br clear="none">Libosmium. The bindings are called Pyosmium. Libosmium is the fastest<br clear="none">library to deal with OSM data.<br clear="none"><br clear="none">Why do you need a library for the import? Which use cases are not<br clear="none">covered by Osm2pgsql or Imposm 3?<br clear="none"><br clear="none">Please keep in mind that OSM data is large (our planet is about 40 GB in<br clear="none">.osm.pbf format). Using a interpreted language is a waste of time and<br clear="none">energy for most purposes.<div class="ydp7e5124adyqt4283969264" id="ydp7e5124adyqtfd09831"><br clear="none"><br clear="none">> Bonus points for:<br clear="none">> - Windows compatibility<br clear="none">> - No external (i.e. non-Python) libraries needed</div><br clear="none"><br clear="none">Osm2pgsql runs under Windows.<br clear="none"><br clear="none">Best regards<br clear="none"><br clear="none">Michael<br clear="none"><br clear="none">-- <br clear="none">Per E-Mail kommuniziere ich bevorzugt GPG-verschlüsselt. (Mailinglisten<br clear="none">ausgenommen)<br clear="none">I prefer GPG encryption of emails. (does not apply on mailing lists)<div class="ydp7e5124adyqt4283969264" id="ydp7e5124adyqtfd35008"><br clear="none"></div></div><div class="ydp7e5124adyqt4283969264" id="ydp7e5124adyqtfd53243">_______________________________________________<br clear="none">dev mailing list<br clear="none"><a shape="rect" href="mailto:dev@openstreetmap.org" rel="nofollow" target="_blank">dev@openstreetmap.org</a><br clear="none"><a shape="rect" href="https://lists.openstreetmap.org/listinfo/dev" rel="nofollow" target="_blank">https://lists.openstreetmap.org/listinfo/dev</a><br clear="none"></div></div>
</div>
</div></body></html>