libosmscout status update Juni 2012


libosmscout status update Juni 2012

After a while a new status update. As usual even while being silent for a while, the project is still healthy and alive and in fact there were a number of interesting changes – not only by me but by the rest of the community.

Changes since the last update

  • Speed increase and reduced memory usage: As usual we did a number of efforts to improve performance while using less memory. Major improvement was the implementation of the low zoom optimizations, dramatically reducing the amount of data required for drawing ways in low zoom. Also in general ways with the same attributes are merged if possible. Also a optional renumbering and resorting step was introduced, better organizing the data in the database files, thus reducing IO during data loading. Future optimization will do the same for areas. But we also optimized the style sheet, indexes and rendering code to load and render data faster.
  • Support for multipolygon relations: We now handle multipolygon relations, supporting most standard variants. The code is currently refactored again to correctly handle some more complex cases better.
  • Modularisation: We have splitted the code into a number of libraries,so there is now a core library, a library for importing of data, a library for the basic rendering engine and one for each backend.
  • Improved style sheet: The style sheet syntax has been changed. The new syntax allows better and more compact definitions while on the same time, preparing support for more features. One feature is, that now values are given in mm, allowing better support on different devices (desktop,mobile) without the requirement to modify the style sheet. We also slightly improved the label placing code and the rendering of bridges and tunnels. Also the rendering of the Qt backend was improved in some situations.
  • Improved routing speed and quality: The routing speed was increased by around factor 5-6, while the routing quality has been improved (roundabouts, more flexible profiles, support for max speed, better support for turn restrictions). Much work has been put in the resulting route description, now being of comparable quality to other solutions. The route description generator is now also extensible, allowing you to further enhance the quality without changing the core engine.
  • Improved import: Some changes were done to improve import speed and better handle buggy data in the import files.
  • Better support for non-Linux platforms, especially Windows (mingw but also VisualStudio) and MacOS/IOS, but also Android. We now have project files for VisualStudio 2008 as part of the repository and some JNI mapping code for using libosmscout under Android.
  • There is now also better support for 64bit system and for database files >2GB.
  • Bug fixing: A tons of bugs were fixed in all code areas.

Some current screenshots

The first screenshot shows the routing output in an IOS application (this is not the libosmscout renderer, though the cairo renderer has successfully been ported to IOS, too. Rendering speed was around 0.1-0.5 seconds, depending of the scene to render). The community member used the router during his holiday on Costa Rica and was happy to use it – and came successfully back to tell :-) The next two screenshots are by another community member. He uses a custom 3D renderer on top of libosmscout to draw OSM data in 3D. He thus gains all the data structures, import features, the fast database, concentrating on the 3D aspect. Additional OSM tags for 3D description of building were injected into the database, to get evaluated in the renderer. The project can be found here: https://github.com/canurabus/libosmscout-render.

Next steps

This is a “no guarantee” list of changes planed for the near future:

  • Work on drawing seas and coastlines. There is already some code, I started a while ago. Now is the time to get back to it to add the last obvious “must have” feature in the renderer.
  • Some work on the new style sheet language. The alternateColor for ways will be dropped. Instead a style sheet condition will be added to explicitly differentiate between drawing a simple way and a more complex variant.
  • Some more work on the router to make it faster. Currently a path in the graph starts and ends at a junction. However the way merging feature allows to have longer paths and thus skip junctions if they are not the target. This should reduce the number of visited nodes.
  • Some work on the style sheet to improve look. Move away from the 1:1 copy of the mapnik style.
  • Add some more features to the renderer like drawing arrows for oneway streets.
  • Add a tool to do some validation on a style sheet, like hints about types that have no style…
  • Promote some demos to first class tools by moving them n the repository.
About these ads

7 Responses to “libosmscout status update Juni 2012”

  1. Thorsten Says:

    Great!! I don´t know how often I searched for a vector map rendering engine on iOS.. Really hard to find this. I read about your project in a post on the route-me mailing list.

    I am developing a geocaching app for iOS and implementing OSMScout “brennt mir unter den Fingernägeln”.

    Thanks! Best, Thorsten

    • framstag Says:

      You are welcome! Please subscribe to the mailinglist to get help. Note that there is now also besides a cairo backend also a native Max OS X/iOS backend, which is not yet finished but promissing.

  2. ShaoLin Says:

    Hi, could you write a little tutorial on the main features of libosmscout? I can’t find any documentation..
    Thanks

  3. Alexey Says:

    Hello, great job! Congratulations! Do you have may be link to xCode project of cairo renderer (from the first screenshot) for iOS? Thanks!

  4. Dan Says:

    Tim,

    I am going crazy over here, trying to compile your library for hours and hours.

    I’m running OS X Mountain Lion (10.8.5) on a 15″ Retina Early 2013 Macbook Pro.

    Which compiler should I use? I’ve tried gcc/g++ 4.9, 4.8, 4.6.3, and 4.2. They all cause different errors. I can’t find Mac OS installation instructions anywhere, including the mailing list archives. It is a pain to compile C++ code with Mountain Lion, because by default, the system doesn’t come with the standard C compilers. There is all kinds of BS in the procedure to set up the right environment on this machine. So, if there is any way you could simplify the process for me, I would be extremely grateful.

    ./autgen.sh and ./configure commands complete, but everything falls apart when I try to ‘make’

    I can’t even get past building libosmscout, which is required to build the examples.

    WIth 4.9/4.8, I was getting an error because of . The compiler complained that there is no such file. It doesn’t understand that type of #include.

    With 4.2, it accepts those #includes without complaint, but there is a different error:

    ========================================================================
    Terminal Output
    ========================================================================
    In file included from ../include/osmscout/util/Transformation.h:34,
    from osmscout/util/Transformation.cpp:20:
    ../include/osmscout/util/Geometry.h: In function ‘void osmscout::Normalize(double, double, double&, double&)':
    ../include/osmscout/util/Geometry.h:549: error: ‘sqrt’ was not declared in this scope
    make[1]: *** [osmscout/util/Transformation.lo] Error 1
    make: *** [all-recursive] Error 1
    ========================================================================
    /Terminal Output
    ========================================================================

    Then, if I add #include to the top of Geomtery.h, it gets a bit further but still aborts with this output:

    ========================================================================
    Terminal Output
    ========================================================================
    Undefined symbols for architecture x86_64:
    “_GOMP_parallel_end”, referenced from:
    osmscout::Database::GetObjects(osmscout::TypeSet const&, std::vector<osmscout::TypeSet, std::allocator > const&, osmscout::TypeSet const&, double, double, double, double, osmscout::Magnification const&, osmscout::AreaSearchParameter const&, std::vector<osmscout::Ref, std::allocator<osmscout::Ref > >&, std::vector<osmscout::Ref, std::allocator<osmscout::Ref > >&, std::vector<osmscout::Ref, std::allocator<osmscout::Ref > >&) constin Database.o
    “_GOMP_parallel_sections_start”, referenced from:
    osmscout::Database::GetObjects(osmscout::TypeSet const&, std::vector<osmscout::TypeSet, std::allocator > const&, osmscout::TypeSet const&, double, double, double, double, osmscout::Magnification const&, osmscout::AreaSearchParameter const&, std::vector<osmscout::Ref, std::allocator<osmscout::Ref > >&, std::vector<osmscout::Ref, std::allocator<osmscout::Ref > >&, std::vector<osmscout::Ref, std::allocator<osmscout::Ref > >&) constin Database.o
    “_GOMP_sections_end_nowait”, referenced from:
    __ZNK8osmscout8Database10GetObjectsERKNS_7TypeSetERKSt6vectorIS1_SaIS1_EES3_ddddRKNS_13MagnificationERKNS_19AreaSearchParameterERS4_INS_3RefINS_4NodeEEESaISH_EERS4_INSF_INS_3WayEEESaISM_EERS4_INSF_INS_4AreaEEESaISR_EE.omp_fn.0 in Database.o
    “_GOMP_sections_next”, referenced from:
    __ZNK8osmscout8Database10GetObjectsERKNS_7TypeSetERKSt6vectorIS1_SaIS1_EES3_ddddRKNS_13MagnificationERKNS_19AreaSearchParameterERS4_INS_3RefINS_4NodeEEESaISH_EERS4_INSF_INS_3WayEEESaISM_EERS4_INSF_INS_4AreaEEESaISR_EE.omp_fn.0 in Database.o
    ld: symbol(s) not found for architecture x86_64
    collect2: ld returned 1 exit status
    make[1]: *** [libosmscout.la] Error 1
    make: *** [all-recursive] Error 1
    ========================================================================
    /Terminal Output
    ========================================================================

    I have full terminal output available here:

    http://pastebin.com/2cCsRUV5

    Thanks for your time, Tim, I can’t wait to try out your library in my project…

    Sincerely,

    Daniel S.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: