Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Python API Store Data

Johannes Kolbe edited this page Jul 29, 2014 · 1 revision

To store data IlwisObjects mainly uses GDAL or ILWIS3 connectors. That means you are able to store your data in most formats these connectors make possible. The best way to see if your format is supported is to just try it out.

To store data you first need to set an output connection to your object. This is done by using the function setOutputConnection(). As the first parameter the function needs the path, including filename, where the new data should be stored. Furthermore it needs the filetype the output should have e.g. "GTiff", "ESRI Shapefile" or "map". The third an last parameter specifies which connector should be used, so basically "ilwis3" or "gdal".

The last step to store the data is to call the function store(). Now the new data should be available in the destination folder you specified in the output connection.

rc = RasterCoverage("n000302.mpr")

# set output connection
rc.setOutputConnection("file:///D:/xyz/aa_newraster", "map", "ilwis3")
# or
rc.setOutputConnection("file:///D:/xyz/aa_newraster", "GTiff", "gdal")
#etc..

rc.store()

Clone this wiki locally