Skip to content

Add lua hooks for processing diff files #1526

Description

@doskabouter

Would it be possible/doable to add some hooks so I can at least observe modifications on openstreetmap objects when processing diff files?
As I read it, modifications are done by a delete and an insert so I can't use triggers in the database to see what exactly changed. Ideally I would also have access to some persistent storage (be it local files or database) where I can put the results of the modification analysis in (mainly for invalidating tiles only when "relevant" changes happen)

Activity

  1. joto commented on Jun 15, 2021

    @joto
    Collaborator

    Please tell us what you would like to achieve in the end. That would help in evaluating what kind of mechanisms could be useful to achieve that goal.

    Concerning "access to some persistent storage": You must have a file system and a database when using osm2pgsql, I suggest using those. :-)

  2. doskabouter commented on Jun 15, 2021

    @doskabouter
    Author

    First off, I just found out that there's a discussions section here which would be better for this, sorry for that.

    My goal is to be able to determine based on the exact changes which tiles to invalidate.
    f.e. changed tags that are irrelevant for rendering don't need to invalidate anything, or changes in residential roads don't need to invalidate higher zoomlevel tiles.
    It's probably doable with current software when only storing rendering-relevant tags, but I also want to do some analytics on the data occasionally.

    My thought was that it would be nice if for every change/creation/deletion some lua method would be called (like f.e. osm2pgsql.process_relation) in which I could determine which zoomlevels (if any) to invalidate.

    And as for persistent storage: I'm restricted ofcourse to what the lua api offers me and I'm not yet experienced with that

  3. locked and limited conversation to collaborators on Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions