Mapnik from QT C++ with postGIS

1,325 views
Skip to first unread message

Alexander Stolen

unread,
Sep 30, 2013, 5:30:01 AM9/30/13
to map...@googlegroups.com
Hello. I try to work with Mapnik by C++, my map data is uploaded to postGIS. Where I can find some documentation? Maybe someone have a sample how to connect to postGIS with mapnik and c++?

Artem Pavlenko

unread,
Sep 30, 2013, 10:45:57 AM9/30/13
to map...@googlegroups.com
Hi Alexander,

Have you seen :

https://github.com/mapnik/mapnik/blob/master/demo/c%2B%2B/rundemo.cpp

To use postgis.input instead of shape.input consult :
https://github.com/mapnik/mapnik/wiki/PostGIS

HTH

Artem
> --
> You received this message because you are subscribed to the Google Groups
> "mapnik" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mapnik+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Alexander Stolen

unread,
Sep 30, 2013, 12:40:10 PM9/30/13
to map...@googlegroups.com
Hi Artem. :)
I alredy read it, thank you. When I try to use rundemo I recieve error: undefined reference to `mapnik::datasource_cache::register_datasources(std::string const&)'
I dont understand what I do wrong...


2013/9/30 Artem Pavlenko <ar...@mapnik.org>
You received this message because you are subscribed to a topic in the Google Groups "mapnik" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapnik/qGIXoCR8fvk/unsubscribe.
To unsubscribe from this group and all of its topics, send an email to mapnik+un...@googlegroups.com.

Artem Pavlenko

unread,
Oct 1, 2013, 3:55:35 AM10/1/13
to map...@googlegroups.com
Please post more details about your setup - compiler version/flags, OS .. etc.

I can't guess what you're doing wrong, otherwise :)
Artem

Alexander Stolen

unread,
Oct 1, 2013, 4:53:21 AM10/1/13
to map...@googlegroups.com
I use windiws 7x64, qt 5.1 with mingw compiler.

smartitc

unread,
Oct 1, 2013, 9:08:32 AM10/1/13
to map...@googlegroups.com

Dear all,

I am technically in charge of a beautiful site (Cultural Heritage - Rome) with GeoServer and Openstreetmap maps.

www.futouring.it

Map server is not very competitive with Mapnik, and current rendering is … let's say subject to improvement.
Knowing map server limitations I would have considered very appropriate a Mapnik integration with Geoserver , afterall they are OGC and open data matters.

What can I do, is there any integration?

If not why not?

Maybe this has been already discussed .. if this is the case sorry for that …but.

Thanks
Stefano.

Alexander Stolen

unread,
Oct 5, 2013, 12:59:14 AM10/5/13
to map...@googlegroups.com
Hello again. When I try to create postgis datasouce_cache like in sample https://github.com/mapnik/mapnik/wiki/PostGIS, happends exception "Could not create datasource for type: 'postgis'", what I do wrong? I use windows 7x64, QT5 with msvc2010.


2013/10/1 smartitc <stefano.m...@smartitc.com>

Dane Springmeyer

unread,
Oct 5, 2013, 4:37:39 PM10/5/13
to map...@googlegroups.com
On Oct 4, 2013, at 9:59 PM, Alexander Stolen <rea...@gmail.com> wrote:

> Hello again. When I try to create postgis datasouce_cache like in sample https://github.com/mapnik/mapnik/wiki/PostGIS, happends exception "Could not create datasource for type: 'postgis'", what I do wrong? I use windows 7x64, QT5 with msvc2010.
>

This error indicates that you have not registered the postgis plugin. Use: `mapnik::datasource_cache::instance().register_datasources()` to do this, like you see in the c++ example program:

https://github.com/mapnik/mapnik/blob/master/demo/c%2B%2B/rundemo.cpp#L65

Dane

Alexander Stolen

unread,
Nov 9, 2013, 5:38:15 AM11/9/13
to map...@googlegroups.com
Thank you. :)

воскресенье, 6 октября 2013 г., 0:37:39 UTC+4 пользователь Dane Springmeyer написал:
Reply all
Reply to author
Forward
0 new messages