OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2018-05-12 23:05:48

JeroenHoek
Member
Registered: 2014-06-22
Posts: 63

Gridify: A new JOSM plugin (preview)

In the proposal for amenity=parking_space a plugin that can split up a shape into a grid of shapes was suggested.

After experimenting a little with drawing amenity=parking_space in the map, I found that such a plugin was lacking (although Terracer can split up a shape along one axis).

I've written Gridify to fill the gap. It takes either four nodes, or a way consisting of four nodes as its input, and lets you configure the number of rows and columns it should generate.

gridify-dialog.png

gridify-out.png

Instead of generating 'blocks' (the default), you can also generate a gird of 'lines'.

The input shape does not need to have squared angles, any four nodes will work:

gridify-odd.png

My goal for this plugin is the help map features like parking spaces and other man-made features that can be represented by a grid of shapes.

The plugin now works, but still needs documentation, a bit of clean-up, and translation in the languages I know. I'll submit the plugin to the JOSM project after that.

Is this plugin something you would use?

Offline

#2 2018-05-13 22:51:32

n76
Member
Registered: 2013-05-22
Posts: 215

Re: Gridify: A new JOSM plugin (preview)

I can see where it could be useful in some situations. Thank you for developing it.

Offline

#3 2018-05-16 10:51:24

westnordost
Member
From: Hamburg
Registered: 2013-07-13
Posts: 280

Re: Gridify: A new JOSM plugin (preview)

Adjacent tennis courts smile

Nice one!

Offline

#4 2018-05-16 18:50:51

JeroenHoek
Member
Registered: 2014-06-22
Posts: 63

Re: Gridify: A new JOSM plugin (preview)

I've submitted the plugin to the JOSM project. If anyone wants to use the plugin in the mean time, you can download it here.

westnordost wrote:

Adjacent tennis courts smile

Didn't think of that one. Nice example.

Offline

#5 2018-05-25 20:04:27

Tordanik
Moderator
From: Germany
Registered: 2008-06-17
Posts: 2,274
Website

Re: Gridify: A new JOSM plugin (preview)

Gave it a try – works like a charm! This is going to make mapping parking spaces so much easier.

Quick idea: Perhaps it would make sense to have the newly created ways selected afterwards? This would be similar to how the built-in tools such as "split" or "create circle" tend to behave, and it would allow you e.g. add them to a relation at the same time. Not a pressing issue, though, given how much time this tool saves already.

Anyway, thank you! smile I didn't know I needed this, but now I don't really want to go back to meticulously using Shift+B, Split and Combine for this kind of task. Any news on getting this into the list of plugins? I put the .jar into my plugins directory manually, but I suspect others may prefer the comfort of the automatic install and updates.

Offline

#6 2018-05-26 15:22:49

JeroenHoek
Member
Registered: 2014-06-22
Posts: 63

Re: Gridify: A new JOSM plugin (preview)

Tordanik wrote:

Gave it a try – works like a charm! This is going to make mapping parking spaces so much easier.

Thanks! Glad to hear it helps.

Tordanik wrote:

Quick idea: Perhaps it would make sense to have the newly created ways selected afterwards? This would be similar to how the built-in tools such as "split" or "create circle" tend to behave, and it would allow you e.g. add them to a relation at the same time. Not a pressing issue, though, given how much time this tool saves already.

That sounds like a fairly trivial improvement, and it makes sense; so I can probably implement it at some point. Please feel free to open an issue for that feature request in the plugin's repository:

https://github.com/JOSM/josm-gridify

Tordanik wrote:

Any news on getting this into the list of plugins?

I have transferred ownership of the plugin's repository on GitHub to the JOSM-team. I expect one of the maintainers will review it for inclusion in the plugin list at some point, so it should become available to all JOSM users in the near future.

Offline

#7 2018-06-04 20:44:09

Klumbumbus
Member
Registered: 2014-01-12
Posts: 523
Website

Re: Gridify: A new JOSM plugin (preview)

JeroenHoek wrote:

I expect one of the maintainers will review it for inclusion in the plugin list at some point, so it should become available to all JOSM users in the near future.

There is no such a review process. Please simply add the link to the jar file to https://josm.openstreetmap.de/wiki/PluginsSource.

When you make changes to your plugin you may have a look at https://josm.openstreetmap.de/jenkins/ to check if this caused any errors in the continous integration tests.

Offline

Board footer

Powered by FluxBB