Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
transform_map [2017/01/24 04:18] hermann [Group] |
transform_map [2026/08/28 03:35] (current) hermann Sync from local documentation review |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Transform Map ====== | + | ====== Transform Map ====== |
| ===== Description ===== | ===== Description ===== | ||
| - | This functor re-projects the given map according to a set of parameters. It can also crop and re-project a map based on a given format map. | + | Reprojects a map file according to a set of parameters. It can also crop and reproject a map based on the projection, extents, and cell size of a given format map. This functor is also known by the alias ''ReprojectMap'' in EGO Script. |
| ===== Inputs ===== | ===== Inputs ===== | ||
| ^ Name ^ Type ^ Description ^ | ^ Name ^ Type ^ Description ^ | ||
| - | | Input Map Filename | [[Map Filename Type]] | The filename of the input map that will be re-projected. | | + | | Input Map Filename | [[Map Filename Type]] | Filename of the input map to reproject. | |
| - | | Output Map Filename | [[Map Filename Type]] | The filename of the resulting re-projected map. | | + | | Output Map Filename | [[Map Filename Type]] | Filename of the resulting reprojected map. Its format is selected from the file extension. | |
| ===== Optional Inputs ===== | ===== Optional Inputs ===== | ||
| ^ Name ^ Type ^ Description ^ Default Value ^ | ^ Name ^ Type ^ Description ^ Default Value ^ | ||
| - | | Output Format Map Filename | [[Map Filename Type]] | The filename of the format map. If the format map is provided, its projection, extents and cell size is used as the default attributes of the resulting re-projected map. This filename can not be used together with the "Output Map Projection". | null | | + | | Output Format Map Filename | [[Map Filename Type]] | Filename of a format map whose projection, extents, and cell size become the default attributes of the output. Mutually exclusive with Output Map Projection. | .none | |
| - | | Output Map Projection | [[Projection Type]] | If provided, this projection is used to re-project the input map and generate the resulting re-projected map. In this case, the extents and cell size of the resulting map are calculated automatically (their definitions can be overridden using the appropriate settings). The output projection can not be used together with the "Output Format Filename". | null | | + | | Output Map Projection | [[Projection Type]] | Projection to reproject the input map into; the output's extents and cell size are then computed automatically (either can still be overridden by the relevant ports). Mutually exclusive with Output Format Map Filename. | .none | |
| - | | Output Map Cell Type | [[Cell Type Type]] | Data cell type of the resulting re-projected map. For this functor, the cell types Unsigned 1-Bit Integer and Signed 8-Bit Integer are just an alias for cell type Unsigned 8-Bit Integer. | Signed 32-Bit Integer | | + | | Output Map Cell Type | [[Cell Type Type]] | Cell type of the output map. Unsigned 1-Bit Integer and Signed 8-Bit Integer are both treated as Unsigned 8-Bit Integer for this functor. | Signed 32 Bit Integer | |
| - | | Output Map Null Value | [[Null Value Type]] | Null value of the resulting re-projected map. | .default | | + | | Output Map Null Value | [[Null Value Type]] | Null value of the output map. | .default | |
| - | | Resampling Method | [[Enum Type]] | Resampling method to use. Valid values are .nearest, .bilinear, .cubic, .spline, .lanzo, .average, .mode, .maximum, .minimum, .median, .1quartile and .3quartile | .nearest | | + | | Resampling Method | [[Enum Type]] | Resampling method used to compute output values from the input map: Nearest, Bilinear, Cubic, Cubic Spline, Lanzos, Average, Mode, Maximum, Minimum, Median, 1st Quartile, or 3rd Quartile. This is an advanced port. | Nearest | |
| - | | Additional Input Map Null Value | [[Null Value Type]] | Additional value representing null values in the input map that will be re-projected. Cells with such value are also treated as null cells. This is particularly useful for defining a null value for an image file that does not have this definition. | null | | + | | Additional Input Map Null Value | [[Null Value Type]] | Additional value to treat as null in the input map, alongside its own null value if it has one. This is an advanced port. | .none | |
| - | | Input Map Projection | [[Projection Type]] | If defined, the input map is assumed to have this projection. Otherwise, the projection provided by the input map itself is used. | null | | + | | Input Map Projection | [[Projection Type]] | Projection to assume for the input map, overriding its own. When not given, the input map's own projection is used. This is an advanced port. | .none | |
| - | | Output Map Lines | [[Positive Integer Value Type]] | The number of lines expected in the resulting re-projected map. Must be defined together with the number of columns. However, the definition of expected number of lines/columns and cell height/width are mutually exclusive. | null | | + | | Output Map Lines | [[Positive Integer Value Type]] | Number of lines of the output map. Must be given together with Output Map Columns; mutually exclusive with Output Map Cell Width/Height. This is an advanced port. | .none | |
| - | | Output Map Columns | [[Positive Integer Value Type]] | The number of columns expected in the resulting re-projected map. Must be defined together with the number of lines. However, the definition of expected number of lines/columns and cell height/width are mutually exclusive. | null | | + | | Output Map Columns | [[Positive Integer Value Type]] | Number of columns of the output map. Must be given together with Output Map Lines; mutually exclusive with Output Map Cell Width/Height. This is an advanced port. | .none | |
| - | | Output Map Cell Width | [[Real Value Type]] | The cell width in the resulting re-projected map. Must be defined together with the cell height. However, the definition of expected cell height/width and number of lines/columns are mutually exclusive. The cell width must be expressed in unit compatible with the projection of the resulting re-projected map. | null | | + | | Output Map Cell Width | [[Real Value Type]] | Cell width of the output map, in units compatible with its projection. Must be given together with Output Map Cell Height; mutually exclusive with Output Map Lines/Columns. This is an advanced port. | .none | |
| - | | Output Map Cell Height | [[Real Value Type]] | The cell height in the resulting re-projected map. Must be defined together with the cell width. However, the definition of expected cell height/width and number of lines/columns are mutually exclusive. The cell height must be expressed in unit compatible with the projection of the resulting re-projected map. | null | | + | | Output Map Cell Height | [[Real Value Type]] | Cell height of the output map, in units compatible with its projection. Must be given together with Output Map Cell Width/Height; mutually exclusive with Output Map Lines/Columns. This is an advanced port. | .none | |
| - | | Use Compression | [[Boolean Value Type]] | If true, the resulting re-projected map is compressed. The map compression option only works for GeoTiff (.tif) and HFA (.img) file formats. For other file formats this option is ignored. | true | | + | | Use Compression | [[Boolean Value Type]] | If true, the output map is compressed, for formats that support it (GeoTiff and HFA; ignored for other formats). This is an advanced port. | Yes | |
| + | | Additional GDAL Warp Arguments | [[String Type]] | Additional arguments passed to the underlying ''gdalwarp'' invocation, appended after every other argument. This is an advanced port. | "" | | ||
| + | | Additional GDAL Translate Arguments | [[String Type]] | Additional arguments passed to the underlying ''gdal_translate'' invocation, appended after every other argument. This is an advanced port. | "" | | ||
| ===== Outputs ===== | ===== Outputs ===== | ||
| ^ Name ^ Type ^ Description ^ | ^ Name ^ Type ^ Description ^ | ||
| - | | Output Map Filename | [[Map Filename Type]] | The filename of the resulting re-projected map. This is the same filename assigned to the corresponding input port. | | + | | Output Map Filename | [[Map Filename Type]] | Same filename given to the Output Map Filename input port. | |
| ===== Group ===== | ===== Group ===== | ||
| - | [[Functor List#GDAL / OGR|GDAL / OGR]] | + | [[Functor List#GDAL / OGR | GDAL / OGR]] |
| ===== Notes ===== | ===== Notes ===== | ||
| - | This functor is basically a wrap around the [[http://gdal.org/|GDAL library]] utilities [[http://www.gdal.org/gdalwarp.html|GDAL Warp]] and [[http://www.gdal.org/gdal_translate.html|GDAL Translate]]. GDAL Warp is used to re-project the map and GDAL Translate is used to clip the map according to the boundaries of a given mask. | + | This functor wraps the [[https://gdal.org/|GDAL library]] utilities [[https://gdal.org/programs/gdalwarp.html|GDAL Warp]] and [[https://gdal.org/programs/gdal_translate.html|GDAL Translate]]: GDAL Warp is used to reproject the map, and GDAL Translate is used to clip the reprojected map to the boundaries of a given mask. |
| - | The information about the categories present in the input map are not preserved by the re-projection. | + | Categorization information present in the input map is not preserved by the reprojection. |
| - | <note important>It is worth noting that, unlike most functors, this functor can not be bound to maps produced by other functors, unless they are saved to the disk first (by using [[Save Map]]). Unfortunately, the use of [[http://www.gdal.org|GDAL]] does not allow us to the use the maps produced by Dinamica EGO while they are still in memory, unless they are re-arranged in a way defined by their API, and such re-arrangement would heavily impact the execution performance and the amount of memory required to perform the re-projection of a map.</note> | + | Only the GeoTiff (.tif) and HFA (.img) formats support Use Compression; it is ignored for other formats. |
| + | Unlike most functors, this functor cannot be connected directly to a map produced by another functor while it is still in memory — that map must first be saved to disk with [[Save Map]] — because the underlying GDAL utility can only operate on maps already written to a file. Re-arranging an in-memory map into the form GDAL's API expects would heavily impact execution performance and the amount of memory required, which is why this restriction is not worked around internally. | ||
| ===== Internal Name ===== | ===== Internal Name ===== | ||