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:
utilsfolder and ...