<div dir="auto">Hi Sarah,<div dir="auto">thanks a lot for your replies and for clearing the terms. I was misusing those concepts, now everything is clear and works fine ;)</div><div dir="auto"><br></div><div dir="auto">Regards,</div><div dir="auto">Giovanni</div><div dir="auto"><br></div><div dir="auto">PS: sorry for the late reply but your responses were considered spam by Gmail.</div></div><div class="gmail_extra"><br><div class="gmail_quote">Il 18 mar 2017 10:52, "Sarah Hoffmann" <<a href="mailto:lonvia@denofr.de">lonvia@denofr.de</a>> ha scritto:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi again,<br>
<br>
looking at the code again, it turns out changesets are actually<br>
implemented.<br>
<br>
I suspect that you are mixing up terminology here. A changeset<br>
in osmium, is the collection of metadata about a particular<br>
set of data that was uploaded. Changeset information is<br>
available in a separate file here:<br>
<a href="http://planet.osm.org/planet/changesets-latest.osm.bz2" rel="noreferrer" target="_blank">http://planet.osm.org/planet/<wbr>changesets-latest.osm.bz2</a><br>
<br>
The XML for changesets looks something like that:<br>
<changeset id="15449959" created_at="2013-03-22T02:09:<wbr>28Z" num_changes="0" closed_at="2013-03-22T03:09:<wbr>28Z" open="false" user="javiarch" uid="1116739"><br>
    <tag k="comment" v="pje sargento Cabral"/><br>
                <tag k="created_by" v="iD 0.0.0-alpha3"/><br>
                <tag k="imagery_used" v="Bing"/><br>
</changeset><br>
<br>
You probably want to process OSM data change files from<br>
<a href="http://planet.osm.org/replication/" rel="noreferrer" target="_blank">http://planet.osm.org/<wbr>replication/</a>. These files are normal<br>
data files. so you have to process them using the data<br>
callbacks node(), way(), relation(). Have a look at the<br>
osm_diff_stats.py example, to find out how to distinguish<br>
between created, modified and deleted objects.<br>
<br>
Kind regards<br>
<br>
Sarah<br>
<br>
On Sat, Mar 18, 2017 at 08:20:26AM +0000, Sarah Hoffmann wrote:<br>
> Hi Giovanni,<br>
><br>
> the ChangeSet type is currently not exported into a python type<br>
> but it's really easy to do. Could you open a feature request at<br>
> <a href="https://github.com/osmcode/pyosmium/issues" rel="noreferrer" target="_blank">https://github.com/osmcode/<wbr>pyosmium/issues</a> and I'll see to it to<br>
> add support for it.<br>
><br>
> Kind regards<br>
><br>
> Sarah<br>
><br>
><br>
> On Fri, Mar 17, 2017 at 12:33:01PM +0100, G. Allegri wrote:<br>
> > I've just started giving a look to Pyosmium. I've done tests based on the<br>
> > examples from its repo and everything works fine.<br>
> > I would like to replicate osmium changeset-filter [1] and I'm striving to<br>
> > make the osmium.SimpleHandler parse the changesets from an osmChange file.<br>
> ><br>
> > I've tried:<br>
> ><br>
> > >>>class MyHandler(osmium.<wbr>SimpleHandler):<br>
> > ...     def changeset(self,changeset):<br>
> > ...             print changeset<br>
> ><br>
> > >>>handler = MyHandler()<br>
> > >>>handler.apply_file('<wbr>mychange.xml>')<br>
> ><br>
> > but nothing happens. No errors, no outputs.<br>
> ><br>
> > I've tried to setup the osmium.io.Reader manually, and setting the entity<br>
> > bit:<br>
> ><br>
> > >>>reader =<br>
> > osmium.io.Reader('mychange.<wbr>xml',osmium.osm.osm_entity_<wbr>bits.CHANGESET)<br>
> > >>>omsium.apply(reader,<wbr>handler)<br>
> ><br>
> > No output again.<br>
> ><br>
> > First question: is it possible to parse osmChanges with Pyosmium? If yes,<br>
> > what's the right way to do it?<br>
> ><br>
> > Thanks a lot,<br>
> > Giovanni<br>
> ><br>
> ><br>
> > [1] <a href="http://osmcode.org/osmium-tool/manual.html#working-with-changesets" rel="noreferrer" target="_blank">http://osmcode.org/osmium-<wbr>tool/manual.html#working-with-<wbr>changesets</a><br>
><br>
> > ______________________________<wbr>_________________<br>
> > dev mailing list<br>
> > <a href="mailto:dev@openstreetmap.org">dev@openstreetmap.org</a><br>
> > <a href="https://lists.openstreetmap.org/listinfo/dev" rel="noreferrer" target="_blank">https://lists.openstreetmap.<wbr>org/listinfo/dev</a><br>
><br>
</blockquote></div></div>