Add lua hooks for processing diff files #1527
Replies: 3 comments
-
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. :-) |
Beta Was this translation helpful? Give feedback.
-
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. 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 |
Beta Was this translation helpful? Give feedback.
-
I have moved the issue over. So it's a discussion now.
Lua is a general purpose language and you can use all the built-in functionality as well es extra libraries to, for instance, read and write files and access a PostgreSQL database. So that's really something where you don't necessarily need support from osm2pgsql itself. |
Beta Was this translation helpful? Give feedback.
-
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)
Beta Was this translation helpful? Give feedback.
All reactions