Display vector files in QT using GDAL / OGR

I am writing an application to download vector form maps / files using gdal / ogr and display them on a gui created using Qt. I am new to working with vector files, I cannot decide how to visualize them in the graphical interface. The few approaches that come to my mind: - convert vector files to raster and display them as raster. - To draw each figure in a vector file one by one (I don’t know how to do this, I don’t even know if this is possible with GDAL / OGR, or how difficult it is, because in my case vector files can be very complicated )

The decision on how to visualize vector files is very important for me, because after displaying vector files I need to support some additional functions, such as changing the projection, interactive selection, georeference, etc.

Can anyone who worked on the vector / gis material tell me how this is usually done and which Qt widget is used to display such data.

+4
source share
2 answers

I solved the problem of drawing vector files by writing rendering functions for each type of form file. Qt QPainter was really handy for drawing shapes like Polygon, Multipolygon, Line, Multiline, and then displaying the output as a QImage.

0
source

Mapping vectors is a difficult task because it requires rendering of geometries.

I would consider Quantum GIS (QGIS). It is actually also based on QT, but comes with a sophisticated rendering engine. The QGIS user application can even work autonomously.

+1
source

Source: https://habr.com/ru/post/1410951/


All Articles