- See also
- python.workflows.preTiling
Aim of module
Tesselates a (flight) block into tiles of equal size.
General description
preTiling tesselates a (flight) block into tiles of equal size potentially considering a tile overlap. Tiles can either be set quadratic or rectangular.
The block extents can either be found from ODM or Raster files or can also be defined manually by giving the union bounding box.
Output is a Shape file containing the extents of the resulting tiles. In case of overlaps two Shape files are provided - one regarding the overlaps, one without them.
- See also
- Script documentation
Parameter description
-skipIfExists Skip processing if result already exists.
Type : Boolean
Remark : optional, default: True
possible input | evaluates to |
1, true, yes, Boolean(True), True | Boolean(True) |
0, false, no, Boolean(False), False | Boolean(False) |
Example for -e flag usage (Each part -path, name or '.shp'- can be left out)
U:\results\block\tesselation\myTiles.shp
Example for an input path (-vector or -raster flag)
U:\FirstInputs\*.tif;U:\OtherInputs\;U:\LastFolder\poly*.tif
Input Options
Settings concerning the input ODM files or the extents of the flight block.
-vector Path(s) to ODM files.
Type : Path
Remark : optional
Description: Path(s), where the ODM vector files to tesselate are located [mandatory if no bounding box/Raster path is specified]
-raster Path(s) to raster files.
Type : Path
Remark : optional
Description: Path(s), where GDAL supported raster files to tesselate are located [mandatory if no bounding box/Vector path is specified]
-bbox Bounding Box
Type : Floating-point number
Remark : optional
Description: Instead of ODM files, the block extents can also be described giving their bounding box [mandatory if no Raster/Vector path is specified].Expected Order: [xmin,ymin,xmax,ymax]
Output Options
Settings concerning the output Shapefile.
-export Export path and filename
Type : Path
Remark : optional
Description: Export [path]\[filename] for the resulting Shape file [path: estimable\ name: default = "Tiles.shp"].
-attribute Name of the attribute containing the tile name.
Type : String
Remark : optional, default: id
-corner Corner for tile naming.
Type : String
Remark : optional, default: LL
Description: Specification of the corner that is responsible for the tile name ["LL"|"UL"|"UR"|"LR"|"Index"|"Numbered"]. "Index" uses a numbering of rows and columns for the tile names. "Numbered" assigns numbers from 1 to n (total number of tiles).
-nDigits Number of digits in tile name (default: 6 for coordinates; default: 4 for indices)
Type : Integer
Remark : optional
Description: Number of digits of one coordinate/index in the tile name
-delimiter Delimiter for tile names.
Type : String
Remark : optional, default: _
Description: Delimiter symbol for the two coordinates/indices in the tile name
Tiling Options
Settings concerning the tile extents.
-tileSize Tile size; Rectangular or x, y.
Type : Floating-point number
Remark : optional, default: 1000
Description: Wanted tile size in meters. With one input, quadratic tiles are created.For rectangular tiles, the x- and y-extent has to be specified.
-overlap Overlap of tiles
Type : Floating-point number
Remark : optional, default: 0
Description: Overlap of adjacent tiles in meters. Same as for tile size, either one value for all directions or two seperate values for x and y can be specified.
-pointOrigin Point of origin for the tesselation.
Type : String
Remark : optional, default: 0;0
Description: Point of origin for the tesselation. Either X- and Y-coordinate separated by semicolon or a corner of the block ["LL"|"UL"|"UR"|"LR"] can be specified. The X- and Y-coordinates of all corners will differ from (X,Y) of p0 by multiples of the x/y-tile size. So the point of origin defines an actual tile corner if it lies within the area of interest or a virtual one if it lies outside.
-areaOfInterest Path to a shapefile with area of Interest
Type : Path
Remark : optional
Description: Path of a shapefile containing polygons that mark the area of interest. Only the overlapping areas will be tesselated.
Logging Options
Settings concerning the verbosity level of logging.
-fileLogLevel Log level in the logfile
Type : LogLevel
Remark : optional, default: info
-screenLogLevel Log level on screen
Type : LogLevel
Remark : optional, default: info
-logger Logger
Type : Logger
Remark : optional
Description: Logger is usually provided by the opals framework.The user may provide their own logger object, but it has to function in the same way as the opals Logger.
To be written.
Examples
As a prerequisite for the subsequent examples, please import the data using the following commands:
Example 1
This example creates a square tiling with a side length of 100.
preTiling -
vector G111.odm -tilesize 100 -skip False
Example 2
This example uses a wildcard to read all three input files and creates a rectangular tiling with 100 by 150 tiles and a 10% overlap in each direction. The origin of the tiling is set to the upper left corner and the naming of the tiles is set to the upper left corner with 8 digits and a '-' as delimiter.
preTiling -
vector G11*.odm -tilesize 100 150 -
overlap 10 15 -pointOrigin UL -corner UL -nDigits 8 -delimiter - -skip False