-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Geospatial Development By Example with Python
By :

In the previous chapter, we generalized our import function by adding the capability to import more types of data supported by OGR.
Now, we will improve it again, make it handle some errors, make it compatible with our objects, and add two new capabilities. We will also convert the data in order to produce uniform objects.
To achieve our goals, we will analyze what kind of information is stored in the files that we want to open. We will use OGR to inspect the files and return some information that may help us with the data conversion.
First, let's alter our open_vector_file
function, allowing it to handle incorrect paths and filenames, which is a very a common error. Perform the following steps:
utils
folder and open the geo_functions.py
file.import
statements at the beginning of the file:# coding=utf-8 import ogr import osr import gdal import os from pprint import pprint
open_vector_file
function via the following code...Change the font size
Change margin width
Change background colour