Nishadh KA

Print map shape file python

2014-12-17


####Create and print map using pandas in python from SHAPE file#####

  1. Based on this note to print map from shape file, a sort of scripting map creation and printing without using qgis kind GUI.
  2. The above note uses fiona lib. Intsallation of fiona is super easy with anaconda. Command conda install fiona does all the jobs of installing with all its depndancy starting from gdal. Native installtion of gdal and linkingit with python libs are super hard. So anaconda is big big help in working with python.
  3. The above tutorial’s ipython notebook and data used is available from here
  4. Using th github source data nd code it was tested to get the png file of example data and it was made with out any error.
  5. The basic functionality is creation of pandas dataframe from shape file and plotting it with matplotlib command. Since it is a pandas, extensive data editing fucntionality of pandas will be supporterd in map creation also, such as filtering, merging, sorting , arithmatic and much more.
  6. So for example with India shape file and creation of some scatter plot over it.