[Marble-devel] Using marble to render PostGIS data in different Projections

Ander Pijoan ander.pijoan at deusto.es
Mon Feb 10 11:05:40 UTC 2014


I don't know if this can be useful, but I coded a geojson parser (
marble/src/plugins/runner/json/JsonParser.cpp ) that transforms GeoJSON
geometries to Marble geometries.

It is thought to receive a geojson file like this one for example (
http://geojson.org/geojson-spec.html#examples) as it will try to find the
geometries inside a json array called "features".

PostGIS has a function ST_AsGeoJSON which returns the geometry in that
format.

I don't know if the way you have your system is suitable to create a json
string with all the geometries you need and send it to the JsonParser or
something like that.


2014-02-10 11:45 GMT+01:00 Knut Krause <knut.krause at lagom.de>:

> Hi,
>
> I have a PostGIS database with geometries. Now I'd like to do some
> computation
> on them. For my core algorithm I need the polygons in raster format. So I
> would be great if I could somehow use marble to draw my geometries on a
> flat
> surface like QImage. To show the result of my algorithm though I'd like to
> render a path on a plain marble widget.
>
> Is it possible to use marble for that? Right now I use GDAL to transform
> the
> geometry from WKB to QPolygonF but that involeves a lot of number crunching
> myself to get the positions right and I fear I'm not smart enough to cope
> with
> projections correctly.
>
> I thought something like
>
> PostGIS -> <magic> -> GeoPainter -> QImage
>
> would be great to render a set of geometries on an image as big as the
> bounding box of the geometries. Anyone here an idea if this works?
>
>
> Knut
> _______________________________________________
> Marble-devel mailing list
> Marble-devel at kde.org
> https://mail.kde.org/mailman/listinfo/marble-devel
>



-- 
Ander Pijoan Lamas
Research Assistant, Deustotech
Computer Science Engineer
University of Deusto

E-mail: ander.pijoan at deusto.es
Phone: +34 664471228
in: http://www.linkedin.com/profile/view?id=162888312
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20140210/2ef6f6ad/attachment.html>


More information about the Marble-devel mailing list