How to create GIS enabled image viewer (QGraphicsview) in Qt



  • I want to load raster or vector data into qgraphicsview which is GIS enabled.
    GIS enabled image viewer means it can handle all kind of coordinate reference systems and projections.

    Please Help or Guide me a right direction to achieve it.
    Any Help will be appreciated
    Thanks


  • Qt Champions 2017

    Hi
    But what format need it support ? There are many GIS formats available.



  • Hi
    Thanks for quick response.

    I want to load .tif or GTiff files for raster and .shp for vector on GIS canvas which can handle the geographic and UTM coordinate system atleast.


  • Qt Champions 2017

    @kanuashu7
    Hi
    So maybe first find some c++ LIBs that allows reading such formats?
    Im not sure if any of the Qt map stuff could be used.
    I know many used GDAL but i have no personal experience with it
    http://www.gdal.org/frmt_gtiff.html



  • I can read all this formats usig GDAL but i am not able to display them on correct coordinate system, for that i need GIS enabled canvas like QGIS


  • Qt Champions 2017



  • Actually, I am trying to make my own application in Qt similar to QGIS which can handle all the GIS capabilities like loading of raster and vector data by reading and loading it correct coordinate system.


  • Qt Champions 2017

    Hi
    ahh that way.
    I wonder if source of QGIS could not provide at good point to start ?
    to see how they draw it etc ?



  • Nope, its very difficult to understand the QGIS architecture and to understand its classes.
    I am looking for simple solution like these are the steps i want to achieve -:

    1. I need to make my qgraphicsview to understand the geographic coordinate system and UTM coordinate system.
    2. Load geo resgistered raster images on correct lat long location on my qgraphicsview.


  • Have you read the shapefile documentation? It is a very simple structure and easy to program. I wrote as shapefile reader nearly 30 years ago in Smalltalk. I could help you with it if you decide to write one.


  • Qt Champions 2017

    +1 for smalltalk :)



  • @ofmrew Thanks for your suggestion.

    I am able to read vector and raster files correctly.
    Also, I can display them on QGraphicsview with its original coordinate system.

    But, I want to customize my QGraphicsview to one of the coordinate reference system mentioned below -:

    1. Geographic Coordinate Reference System
    2. UTM Coordinate Reference System


  • @kanuashu7 It has been awhile since I worked with GIS, but here are my observations:
    QGraphicsView uses a flipped y-axis, so the data will probably be upside down, but you can correct for that.

    UMT should only require registration which requires a scale and translation.

    For the first item, have you considered OpenGL or 3D.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.