Saturday 29 May 2010

May 29

Mapnik Installation (r1796)

I checked out the project's branch from SVN. I want to manage the project locally with Git, so I'll be committing to the server using git-svn.

The installation caused me some trouble:
  • After installing version 1_43 of boost in /usr/local and building boost.regex, libboost_regex was still linked to libicu version 42. I had libicu 44 in both /usr/local/lib and /usr/lib, but libicu 42 stil in /usr/lib. Even when I included -sICU_PATH=/usr/local when building with bjam it was still linked to the older version. I solved it removing libicu 42 from /usr/lib and leaving only version 44, but I'm sure this is not the correct way to solve this problem.
  • The revision I checked out (1796) includes new code that implements some SVG features that are still in development. This revision had two bugs, which where solved by Herm (http://trac.mapnik.org/ticket/557), in files include/mapnik/svg/agg_svg_path_renderer.h (declaration of function 'arc_to' had parameter 'rx' twice | the second 'rx' should be 'ry') and agg/include/agg_rasterizer_scanline_aa.h (function 'abs' should be preceded with 'std::').
  • When configuring the build with scons (python scons/scons.py configure) the following problem was solved by removing 'config.py' which (I think) acts as a cache where scons saves the options chosen (i.e. BOOST_LIBS, DEMO) of previous ran configurations:
Note: will build without these OPTIONAL dependencies:
- ociei (Oracle database library | configure with OCCI_LIBS & OCCI_INCLUDES | more info: http://trac.mapnik.org/wiki/OCCI)
- rasterlite

Problem encountered parsing mapnik version, falling back to [0, 8, 0]
  • Finally, when I finished the installation, importing mapnik2 in python produced the following error, which I solved removing the input file plugins from /usr/local/lib/mapnik2/input [UPDATE: Running the build again installed correctly the input files and python doesn't show errors anymore when importing mapnik2 (it may have something to do with what's referred to here http://trac.mapnik.org/wiki/InstallationTroubleshooting under 'Input/Plugin 'file not found' output')]:
Problem loading plugin library: /usr/local/lib/mapnik2/input/ogr.input (libtool error: file not found)
Problem loading plugin library: /usr/local/lib/mapnik2/input/gdal.input (libtool error: file not found)

Wednesday 26 May 2010

May 26

These are/were today's activities:

  • I applied patch of ticket 343. Although I tried to apply the patch automatically, I found that the code I downloaded (tags/release-0.7.0) already had some of the changes (agg_renderer mainly). I introduced the changes manually and recompiled.
  • To run the test script of ticket 343, I installed Postgresql-Postgis, imported some data and generated the include files of osm.xml. However, I run into an error saying that some columns are not present in my database. I'll fix this to continue with running the patch.
I consider that reading through the code has been a very useful activity, since I'm starting to see where scaling parameters might be placed. However, it seems that many elements of the code are concerned with scaling (strokes, text, etc.) and it may be difficult to identify all of them.