Up to now, I have used GDAL to extract raster data from geotiffs and then, OpenGL to show that raster data.
But when it comes to extract vector data with the help of OGR, what library would you suggest to show these vector data in visual-studio picture controls that is more appropriate than OpenGL?

I've found out from your comments that you have thought I'm searching for a way to read vector data. This is the subject of my another question. Here, I'm just asking suppose that we have extracted all the geometries. Which environment is the best to show these geometries?

  • What do you plan to represent? Do you need to style it? Do you have a style already, or do you need to create one? What sort of architecture (e.g. thick client, mobile, web)? What have you already considered? What did (and did not) work for those?
    – BradHards
    Sep 7, 2013 at 6:51
  • well @BradHards it will be client application that would be runned on PC's and laptops. It's first time I'm working with vector datasets and up to know I have just used GDAL to read geotiff images in fact I'm a beginner in GIS programming so I don't know what do you mean by style. I haven't done anything special already and in fact just want to know which is the best library to show Geospatial Data in order to start study that. Sep 7, 2013 at 7:46
  • removed raster and gdal tags. Gdal can't be used for vectors, and this Q is not about rasters. (gis.stackexchange.com/questions/7077/… may be useful) Sep 7, 2013 at 8:14
  • It would help us if you tell us what you are trying to convey (per my original comment). Think about a point location. You could just make it a pixel of a different colour. You could make it an icon. You could make it a circle where the size (or colour, or shading) depends on some other parameter (e.g. its the location of a place like a city or town, and you're showing population, or wealth, or crime rates). There are lots of way to represent information, and the best way to show it depends on your situation. Please edit your question to provide this situation detail.
    – BradHards
    Sep 8, 2013 at 3:56

2 Answers 2


If this is to be used for MS Windows only, check out MapWinGIS, which is a free and open source C++ based GIS programming ActiveX Control. It is also used for MapWindow.


1) You can use Python: when you read a shapefile with Python with ogr, you get points, lines or polygons with x,y (and z) coordinates:

from osgeo import ogr
# open the layer
ds = ogr.Open('lines.shp')
layer = ds.GetLayer(0)
detail = layer.GetFeature(0)
geom = detail.GetGeometryRef()
# nodes of the line
for i in range(geom.GetPointCount()):
    xy = geom.GetPoint(i)
    print xy
(206643.21517600652, 125181.18058575876)
(201007.33432923188, 121517.85552059766)

These results can therefore be visualized by any Python modules to do: Pypi: Plotting


Visualize shapefile in Python

2) If you want to use OpenGL, see using GDAL/OGR api to read vector data (shapefile)--How? or GDAL and OpenGL projects but you need to know C and/or C++

  • thanks but not permitted to use python. I'm learning to develope softwares with visual c++. Sep 7, 2013 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.