Tuesday, May 17, 2016

Working with Vector and Raster Data in Python

A GIS file type is a standard of encoding geographical information into a file. They are created mainly by government mapping agencies (such as the USGS or National Geospatial-Intelligence Agency) or by GIS software developers. Read more...



The two main GIS data types are Vector and Raster. These data types can easily be manipulated in common GIS software like: ArcGIS and QGIS.

However, in theis post, our goal is to work with such data types in python programming language.

According to Wikipedia and ESRI;-
Vector Data: is a representation of the world using points, lines, and polygons. Vector models are useful for storing data that has discrete boundaries, such as country borders, land parcels, and streets.

Raster Data: is a representation of the world as a surface divided into a regular grid of cells. Raster data are useful for storing data that varies continuously, as in an aerial photograph, a satellite image, a surface of chemical concentrations, or an elevation surface.
A raster data type is, in essence, any type of digital image represented by reducible and enlargeable grids.

In other to manipulate these form of GIS data in python programming language, you will need to install special libraries that can read shapefiles (vector) and Geo-tagged image or elevation data-set (raster).

Vector Data Python Libraries

For processing or manipulating shapefiles in Python, there are many modules like:-
~ osgeo/ogr
~ Fiona
~ Pysal
~ Pyshp
~ shpUtils

Raster Data Python Libraries

For processing raster some of the available modules are:-
~ osgeo/gdal
~ rasterio
~ georasters
~ rasterstats
~ lightningtrace
~ python-geotrellis
~ django-raster
~ raster2xyz



For processing geospatial geometries and 3D plotting:-
~ shapely
~ matplotlib
~ descartes
~ seaborn
~ mayavi
~ vincent



There are also modules also for processing vector and raster on web maps which give you directly the possibilities of reading and plotting a shapefile on internet based mapping platforms. They include:-
~ mapnik
~ Pycairo
~ folium
~ geodjango
~ geopandas
~ GeoVis


More libraries or modules are available on PyPi GIS

Thanks for reading.

No comments:

Post a Comment