Skip to content

(almost) Weekly Reports

michaelzangl edited this page Aug 19, 2015 · 6 revisions

On this page, I will be publishing regular Reports on the current status of the project.

OpenGL panel included in map view.

2015-06-07

I began creating the plugin. Currently, it's main task is to allow the user to switch to an OpenGL view instead of the normal map view (and switch back).

One main challenge to allow this was to pack the JOGL libraries with the plugin. The default packing of JOSM plugins does not work with JOGL, since libraries are just added to the main jar and all the native libraries would get mixed up in the process. JOGL expects all of it's jar files to be in a single directory, so i wrote a simple unpack script that unpacks the libraries from the plugin file into the plugin data directory. This has the disadvantage that we need twice the disk space, but it does not need any changes or hacks for JOGL and it should work on all platforms JOGL supports.

When activated, the plugin adds a new button to the toolbar that switches to the OpenGL view. That view currently only displays a white triangle.

GLG2D Drawing the main map

2015-06-15

GLG2D has been activated to draw the main map. We cannot simply use the paint()-Method of the original MapView here, because it uses Java2D to draw the view and stores that on a bitmap which is then painted. Instead, we query the list of layers to draw and then draw each of them individually. Some minor bugs in GLG2D were fixed and it is now compatible to the version of JOGL used. It still has issues with the background texture that shows the download area. Transparent areas also do not have the right opacity set.

Bug fixes in GLG2D

2015-06-22

GLG2D had many bugs (and sill has some) that were caused because JOSM uses some features of Java2D that a normal swing application does not need and that probably were not tested. There is still a bug in the drawing of dashed lines, the dash lengths and offsets are not respected the right way.

Other than that, the map view looks fine now.

Patches to JOSM applied

2015-07-05

The patches to JOSM that are required to integrate the new map view are now merged in JOSM. This allows you to run the plugin without the need of using a custom JSOM build.

Multi-threaded geometry generation and caching

2015-07-30

Rendering the map has seen a lot of changes the past weeks. The geometries are now generated in separate threads during the render process. They are then added to a cache that allows them to be reused, even if the map view was moved/scaled. The current effort is to invalidate that cache whenever the style for elements changes and to regenerate the correct new geometry.

Cache invalidation

2015-08-11

Geometry generation and merging has seen many small improvements that increased drawing speed a lot. Thin lines are now drawn as GL_LINE_STRIP (or related), respecting dashes. A performance test has been added that automatically renders some examples and compares the render result and times for Java2D and OpenGL.

Cache invalidation is on it's way and works mostly for the hover-effect and style changes to single elements. It is a difficult task, there are still some cases there, that are not handled. I need to add Listeners on those, some of the listeners are not even provided by JOSM.

Final cleanup

2015-08-19

A lot of small changes made the plugin pretty usable the last few days. Many minor bugs were closed, background geometry generation activated and lots of documentation added.

The plugin is now ready to be used and tested. There will be some bugs, but all in all it should work and improve drawing speed especially in denser areas.

I also did a first release