In this step we want to create a regular grid to our model. To do this we will need to define the extend of the grid and the reference location (X and Y offset). These dimensions are declared in the coordinate system a the model.
The first step is to define the coordinate system of the model. For this we need the following lines of code:
import Libraries.MapFunctions as mf fmModel.CoordinateSystem = mf.CreateCoordinateSystem(3857) # WGS 84 / Pseudo-Mercator
In the first line we declare the MapFunctions library as the variable "mf". The next line sets the coordinate system of our model to WGS 84 / Pseudo-Mercator. To create the coordinate system we use the EPSG code (3857). To view the list of coordinate systems and there EPSG code visit : http://www.geotoolkit.org/modules/referencing/supported-codes.html
gridWidth = 200000 gridHeigth = 170000 xOffset = -50000 yOffset = 6400000 GenerateRegularGridForModelUsingExtend(fmModel, gridWidth, gridHeigth, 50, 60, xOffset, yOffset)