[OSM-dev] Get geometries out of OSM changes file

Simon Poole simon at poole.ch
Sun Mar 21 20:03:27 UTC 2021


Hi Francois

Am 21.03.2021 um 19:15 schrieb François Lacombe:
> Thank you Darafei
>
> You link points me to an OverpassAPI endpoint and I don't get how I'm 
> able to produce augmented diff from an osc file.

You can't.

Essentially you have two choices

- have a database that has all the required current state / geometries, 
then you can generate all the geometry changes from that plus the osc file.

- you use Overpass augmented diffs instead of the osc diff feed 
(arguably augmented diffs are overkill for this, but it is what we 
have). The augmented diffs contain all the necessary information plus 
some to recreated the geometry changes.

Simon


> Osmchange is mentioned as a reader of augmented diff, but not as a 
> producer.
>
> Any extra elaboration will be welcome, all the best
>
> François
>
> Le dim. 21 mars 2021 à 18:17, Darafei "Komяpa" Praliaskouski 
> <me at komzpa.net <mailto:me at komzpa.net>> a écrit :
>
>     https://wiki.openstreetmap.org/wiki/Overpass_API/Augmented_Diffs
>     <https://wiki.openstreetmap.org/wiki/Overpass_API/Augmented_Diffs>
>
>     нд, 21 сак 2021, 20:01 карыстальнік François Lacombe
>     <fl.infosreseaux at gmail.com <mailto:fl.infosreseaux at gmail.com>>
>     напісаў:
>
>         Hi all
>
>         For the needs of ProjetDuMois statistics computing chain, I'm
>         looking for an appropriate logic to get geometries associated
>         with osm changes in an osc file, particularly for past versions.
>
>         According to this discussion, it sounds to not be easy.
>         https://help.openstreetmap.org/questions/58931/osc-to-osm-change-file-to-osm-osmium/58948
>         <https://help.openstreetmap.org/questions/58931/osc-to-osm-change-file-to-osm-osmium/58948>
>
>         Currently, we convert an OSC file to CSV without any geometry
>         information
>         https://github.com/vdct/ProjetDuMois/blob/master/db/10_project_update.js#L275
>         <https://github.com/vdct/ProjetDuMois/blob/master/db/10_project_update.js#L275>
>         with following xslt sheet
>         https://github.com/vdct/ProjetDuMois/blob/master/db/osc2csv.xslt
>         <https://github.com/vdct/ProjetDuMois/blob/master/db/osc2csv.xslt>
>
>         We now aim to group and count changes against some
>         administrative boundaries. As a given feature can change of
>         admin area between two versions, we must filter the changes
>         we're interested in, intersect each of them with selected
>         admin boundaries and finally count how may they are in each
>         admin boundary.
>
>         Despite I'll be able to get lat/lon for nodes, rebuild
>         linestrings for ways will be tricky as we'll have to not only
>         check against nodes ids but timestamps as well.
>
>         It's not a problem to do that each day with daily updates but
>         issues occurs when we drop the database and try to get back 2
>         or 3 month with no geometry history at all.
>         See this chart (in French) :
>         https://github.com/vdct/ProjetDuMois/issues/188#issuecomment-802221915
>         <https://github.com/vdct/ProjetDuMois/issues/188#issuecomment-802221915>
>
>         I'll be happy to discuss about such process here as I think
>         someone may already had to solve it.
>         Thanks in advance, all the best
>
>         François
>         _______________________________________________
>         dev mailing list
>         dev at openstreetmap.org <mailto:dev at openstreetmap.org>
>         https://lists.openstreetmap.org/listinfo/dev
>         <https://lists.openstreetmap.org/listinfo/dev>
>
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20210321/505e5b22/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20210321/505e5b22/attachment.sig>


More information about the dev mailing list