[osmosis-dev] Writing an Osmosis plugin
Brett Henderson
brett at bretth.com
Mon Oct 22 23:59:00 BST 2012
Hi Pawel,
On 23 October 2012 00:55, Paweł Paprota <ppawel at fastmail.fm> wrote:
> Hi all,
>
> I want to implement a new plugin for Osmosis which would allow populating
> a specific schema. I described the idea briefly on the dev@ list last
> week[1].
>
> I see this as an extension to the pgsnapshot schema so I would largely
> reuse the existing code. Major addition to the pgsnapshot schema is a table
> (or - tables - similar to OWL's qtile structure) with changes and a table
> with changeset information (most important - changeset geometry).
>
> I would like to write an Osmosis plugin because that would allow to
> quickly get the database up and running in order to do performance testing
> on it.
>
> What is the current practice for writing Osmosis plugins? Should I keep it
> in the main Osmosis tree (like tagtransform) or should it be a separate
> tree?
>
> I looked at the plugin development documentation on the wiki but it looks
> a bit outdated so any tips would be welcome.
>
> For now I have started in the main tree.
>
> [1] http://lists.openstreetmap.**org/pipermail/dev/2012-**
> October/025985.html<http://lists.openstreetmap.org/pipermail/dev/2012-October/025985.html>
>
Up until now, all plugins have been developed outside the main tree. There
have been a few reasons for this:
- Historically development used to be based in SVN and I was hesitant to
have experimental features on the main trunk. I tried to keep trunk
relatively stable.
- The pace of Osmosis development compared to newly developed plugins
typically don't align very well so sometimes it's easier to manage them
separately.
- I'm hesitant to create more maintenance overhead for myself. My
bandwidth is limited so I usually only add new features that have a
reasonable sized audience.
However, due to the fact that every module in Osmosis is built as a
separate plugin and source code is maintained in Git, things have changed
somewhat. My suggestion would be to work in the main tree but on your own
branch in your own repo. Create your new tasks in a new project/plugin
following the existing pattern. It's up to you where you store your
repository, but github is probably the easiest choice. By having your
source in the main tree, it makes it easy for you to develop, easy for
others to build it themselves, easy to release a custom-built Osmosis with
your plugin, and easy to distribute a standalone plugin as a single
compiled jar.
Once your plugin is stable and seeing some real-world use we can look at
merging it into the main Osmosis repository. I won't be able to spend much
time maintaining it though so I'll need assistance fixing any bugs that are
found.
How does that sound?
Brett
PS. The wiki is out of date with respect to plugins and could do with an
update. Plugins used to be second class citizens in the Osmosis world, but
now everything is created as plugins. The only difference is whether
plugins are included in the main distribution or not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20121023/f17c6464/attachment.html>
More information about the osmosis-dev
mailing list