Python script preTiling
See also
python.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
Python script preTiling

Parameter description

Input Options
Settings concerning the input ODM files or the extents of the flight block.
-vector Path(s) to ODM files.
Type : PathArgument
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 : PathArgument
Remark : Optional
Description: Path(s), where GDAL supported raster files to tesselate are located [mandatory if no bounding box/Vector path is specified]
-bbox Instead of ODM files, the block extents can also be described giving their bounding box [mandatory if no Raster/Vector path is specified] Bounding Box
Type : Floating-point number
Remark : Optional
Description:
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 : PathArgument
Remark : Optional
Description: Path of a shapefile containing polygons that mark the area of interest. Only the overlapping areas will be tesselated.
Output Options
Settings concerning the output Shapefile.
-export Export path and filename
Type : PathArgument
Remark : Optional
Description: Export [path]\[filename] for the resulting Shape file [path: estimable\ name: default = "Tiles.shp"].
-skipIfExists Skip processing if result already exists.
Type : Boolean
Remark : Optional, default: Boolean(True)
Description:
Possible values:
11
00
truetrue
falsefalse
yesyes
nono
Boolean(True)Boolean(True)
Boolean(False)Boolean(False)
TrueTrue
FalseFalse
-attribute -
Type : String
Remark : Optional, default: 'id'
Description: Name of the attribute containing the tile name.
-corner Corner for tile naming.
Type : String
Remark : Optional, default: 'LL'
Description: Specification of the corner that is responsible for the tile name ["LL" (default)|"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
Type : Integer
Remark : Optional
Description: Number of digits of one coordinate/index in the tile name [default = 6 for coordinates; default = 4 for indices]
-delimiter Delimiter for tile names.
Type : String
Remark : Optional, default: '_'
Description: Delimiter symbol for the two coordinates/indices in the tile name
Logging Options
Settings concerning the verbosity level of logging..
-screenLogLevel verbosity level of screen output
Type : fromStr
Remark : Optional, default: info
Description: The minimum level of log message importance to print on the screen
-fileLogLevel verbosity level of log file output
Type : fromStr
Remark : Optional, default: info
Description: The minimum level of log message importance to export to the xml-log
Example for an input path (-vector or -raster flag)
U:\FirstInputs\*.tif;U:\OtherInputs\;U:\LastFolder\poly*.tif
Example for -e flag usage (Each part -path, name or '.shp'- can be left out)
U:\results\block\tesselation\myTiles.shp

To be written.

Examples

As a prerequisite for the subsequent examples, please import the data using the following commands:

opalsImport -inf G111.las
opalsImport -inf G112.las
opalsImport -inf G113.las

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
opalsImport is the executable file of Module Import
Definition: ModuleExecutables.hpp:113
@ overlap
specifies the overlap for sequential operations
@ vector
General vector data file (las, shp, ..)