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

Knut Krause knut.krause at lagom.de
Mon Feb 10 11:13:32 UTC 2014


Well, since I query the DB like I want to this would be no problem.

I think my bigger question is: Is it possible to render Marble geometries to a 
raster (QImage) with flat projection?

If so I maybe even use the GeoJSON workaround :-)


Knut

Am Montag, 10. Februar 2014, 12:05:40 schrieb Ander Pijoan:
> 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



More information about the Marble-devel mailing list