[Qgis-developer] Details of rendering GIS map data in QGis
Eric MSP Veith
eveith at wwweb-library.net
Fri Sep 30 10:32:13 EDT 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello list,
first things first: This post is not strictly about QGis itself, but how about
it renders the raw spatial data. If you happen to know a better place where to
ask this question, please point me at it and ignore the rest of this e-mail.
Thanks.
I am currently creating a simulation environment which lives of an interactive
map. This map has its source in a PostGIS data base, from which I select only
few general data (administrative boundaries, water areas, land, cities) to
provide some points of orientation for the user. For the displaying itself I
use Qt's drawing classes, i.e. QGraphicsView, QGraphicsScene, etc., which I
subclass in cases needed.
I am currently trying to find a good (technical) way of displaying the data to
the user. I first tried a simple approach: I fetched points from the PostGIS
database, calculated a scale factor from the size of the QGraphicsView
instance and the size of the layer fetched from the database, and multplied
every value with that scaling factor. It worked (kind of), but of course now
everything is upside down, since Qt's drawing begins from the top-left corner,
whereas POINT(x, y) values from the database are actually POINT(lat, long).
I am wonderin how QGis does that, because it looks nice. I already checked out
the source files from Git, but without knowledge of it I get lost fast.
I'd really appreciate some sentences of advice and/or a pointer to the
relevant methods and classes in the QGis sources.
Thank you so much in advance.
Eric
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
iQIcBAEBAgAGBQJOhck/AAoJEIXD2TZ1epVB1uYQAKXK69d28RantTD8oPHKukln
fTE+6CJ/ocVsB1l1Htj9IMLQthuNB9mKqoruBZRFialmQnQvr4g/xGFOGhrxtyXU
FqS09+q60jEh/IHCulsjR0TBAItlLBLVyxhcZs6MwIosGRsdplW778kpjDIn4TQ/
SVfRBA3I2ppfuK5/qxoHuvoQ5g1qi7kf5+PiTlSy5HGFQYDBSgN711M7BV80OH3q
sDdBGoXbGSylD3fJyvPapFGtJaMPC0VZi+FPpqAOXWCZG6oVIg5AhVvDrzwrnV8l
O06MsiZoP9C6wum3fawTkvjekRLhHO3Tc6xtT9wLKgxki4n2tSxJTTBML7KJOZiQ
6Bhlsw3mIJprfBtiSkaS7PuNgKG2JOIxskCEQJvLjQUoyz+WPUehAhmvJ2NGJK5C
z4aLSd2gFXWuGtmNOXaqhhh2cBLrw84QVFh+P0b8SZxfNMLqRrX1nBkGFteucJkW
PA01287WlXjv/txPx/w5xQ3x+XtrO8JSLCH8xL+dEf3Y9wOZ4U+T2HJDmXnlZB2A
/cEca7hhuwwE3glD6vzO/K6l/biz8Ebgi0BIUX2yQlynXn+5XtFhPK3Zn0pztIFu
lf1Z8dwiDjNwDJ1qAB5jTvipTh5pBtHYkQpeGEl16/uLcmeUmFP9YgMNrLT25Cy1
kPS2mBGmQM4bKnxaxYwL
=dqeB
-----END PGP SIGNATURE-----
More information about the Qgis-developer
mailing list