Mapnik filter expressions and KDE4

View: New views
3 Messages — Rating Filter:   Alert me  

Mapnik filter expressions and KDE4

by Andreas Theofilu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm developing a KDE application with KDE4 (4.2) and using Mapnik to read some
shape files and render a map. The program is written in C++ and I'm using the
C++ API to access Mapnik. My application work, but at the moment where I link
with KDE libraries, the filter expressions stop work. Mapnik still accept them
and if I create a map file with "save_map()" all filter expressions are there.
The problem is, that none of them seems to match. A small test program without
KDE libraries showed, that the filter expressions do match. But as soon as I
link with KDE libraries, the filters stop to work. So only the rules without
any filter expression are drawn.

Has anybody run into this problem already? Does anybody know a work around or
is there something I should set at compile time? I've tried a lot, but found
no solution and I'm not that deep into Mapnik to understand the details of how
it applies the filters to shape files.

I'm using Mapnik 0.6.0, the one coming with Debian testing currently. I hope
someone can give me a hint or even a solution.
--
Andreas Theofilu
http://www.TheosSoft.net/

                     --==| Enjoy the science of Linux! |==--



_______________________________________________
Mapnik-users mailing list
Mapnik-users@...
https://lists.berlios.de/mailman/listinfo/mapnik-users

Re: Mapnik filter expressions and KDE4

by Andreas Theofilu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Freitag, 4. September 2009 12:03:47 schrieb Andreas Theofilu:

> Hi,
>
> I'm developing a KDE application with KDE4 (4.2) and using Mapnik to read
> some shape files and render a map. The program is written in C++ and I'm
> using the C++ API to access Mapnik. My application work, but at the moment
> where I link with KDE libraries, the filter expressions stop work. Mapnik
> still accept them and if I create a map file with "save_map()" all filter
> expressions are there. The problem is, that none of them seems to match. A
> small test program without KDE libraries showed, that the filter
> expressions do match. But as soon as I link with KDE libraries, the filters
> stop to work. So only the rules without any filter expression are drawn.
>
[...]
I've found the solution!! It's the compiler option "-fvisibility=hidden". This
is set with cmake. To deactivate it, it's enough to add the option
"-fvisibility=default" and compile the whole program again. Then the filters
of Mapnik work as expected.
--
Andreas Theofilu
http://www.TheosSoft.net/

                     --==| Enjoy the science of Linux! |==--

_______________________________________________
Mapnik-users mailing list
Mapnik-users@...
https://lists.berlios.de/mailman/listinfo/mapnik-users

Parent Message unknown Re: Mapnik filter expressions and KDE4

by Andreas Theofilu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Dane,

there is a definition for KDE4 called __KDE_HAVE_GCC_VISIBILITY. If this is
set (KDE was compiled with this set), cmake passes the switch -
fvisibility=hidden to the compiler. At this moment the part of Mapnik, where
it compares the filter expressions, doesn't work anymore. So there must be
some now hidden symbols in Mapnik, who shouldn't be hidden. It is only in
context with the filter expressions. Everything else of Mapnik is still
working.

So yes, there is some need for more visibility flags. But I'm not that deep
into Mapnik to say, where exactly they are needed.

Am Samstag, 26. September 2009 02:47:03 schrieben Sie:

> Andreas,
>
> Interesting finding. Can you explain a bit more about what you think
> is going on? Do we need to pass more visibility flags in the mapnik
> compile or it is that you only needed to do so with your C++
> application?
>
> Cheers,
>
> Dane
>

--
Andreas Theofilu
http://www.TheosSoft.net/

                     --==| Enjoy the science of Linux! |==--
_______________________________________________
Mapnik-users mailing list
Mapnik-users@...
https://lists.berlios.de/mailman/listinfo/mapnik-users