Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
load_map [2012/09/03 23:18]
admin [GDAL Limitations]
load_map [2025/10/01 16:01] (current)
admin
Line 1: Line 1:
-====== Load Map ====== ​+Here's the updated documentation for Load Map with the missing ports added based on the Portuguese source: 
 + 
 +====== Load Map ======
  
 ===== Description ===== ===== Description =====
Line 8: Line 10:
  
 ^ Name  ^ Type  ^ Description ​ ^ ^ Name  ^ Type  ^ Description ​ ^
-| Filename | [[Map Filename Type|Map Filename  ​]] | Name and path of input map file. File format is automatically selected based on the filename extension. If path is not specified, file location is the same of model script. ​ |+| Filename | [[Map Filename Type]] ​ | Name and path of input map file. File format is automatically selected based on the filename extension. If path is not specified, file location is the same of model script. ​ |
  
 ===== Optional Inputs ===== ===== Optional Inputs =====
  
 ^ Name  ^ Type  ^ Description ​ ^ Default Value  ^ ^ Name  ^ Type  ^ Description ​ ^ Default Value  ^
-| Load As Sparse ​ | [[Bool Type|Bool]]  | If true, the map is loaded as a sparse image. Sparse images have the advantage of storing only the cells containing non-null values, but they have worse access time.                          | False  | +| Null Value  | [[Null Value Type]] ​ | Additional value used to represent null cells. Cells with such value are also treated as null cells. This is particularly useful for assigning a null value to image files that do not have this definition. ​ | None  | 
-Define Null Value  | [[Bool Type|Bool]]  | This flag forces ​the cells with the same value of the "​Null ​Value" parameter to be treated as a null cellsThis is particularly useful for assigning a missing null value to a GeoTiff data.  | False  | +| Storage Mode  | [[Enum Type]] ​ | Flag suggesting how the map should be loaded. It is possible that the value defined by this flag may be ignored and have no effect. This is an advanced port.  | Default ​ | 
-Null Value  | [[Int Type|Int]]  | Value used to represent null cell. The "​Define Null Value" flag must be set in order to define a null value. ​This is particularly useful for assigning a missing ​null value to a GeoTiff data.  |  | +| Load As Sparse ​ | [[Boolean Value Type]] ​ | If true, the map is loaded as a sparse image. Sparse images have the advantage of storing only the cells containing non-null values, but they have worse access time.  | False  | 
-Suffix Digits ​ | [[Non Negative Int Type|Non Negative Int]]  | Number ​of digits used to represent ​the image file name suffix. If the "​step"​ input is unbound, this options is ignored.  |  | +Suffix Digits ​ | [[Non Negative Integer Value Type]] ​ | Number of digits in the suffix that will be used to represent ​the step to which the file corresponds. If a greater number of digits is needed than this value, the step itself is used without modifications. If the number ​of digits is zero, no suffix is added to the file name. This is an advanced port.  | 0  | 
-| Step  | [[Non Negative ​Int Type|Non Negative Int]]  | Current step or model iteration. Files with the same name and numbered suffixes will be loaded sequentially according to the model step.  | None  | +| First Window Coordinate X  | [[Real ​Value Type]] ​ | X coordinate of the upper-left corner of the clipping window, expressed in the map projection units. The value must be within the map extent, otherwise the operation will fail. If null, the clipping window will not be defined and the map must be loaded in its entiretyThe defined clipping ​is applied ​to all layers of the map.  | None  | 
-| Workdir ​ | [[Workdir Type|Workdir]]  | Workdir folder path.  | None  |+First Window Coordinate Y  | [[Real Value Type]] ​ | Y coordinate of the upper-left corner of the clipping window, expressed in the map projection units. The value must be within the map extent, otherwise the operation will fail. If null, the clipping window will not be defined and the map must be loaded ​in its entirety. The defined clipping is applied ​to all layers of the map.  | None  | 
 +| Second Window Coordinate X  | [[Real Value Type]] ​ | X coordinate of the lower-right corner of the clipping window, expressed in the map projection units. The value must be within the map extent, otherwise the operation will failIf null, the clipping window will not be defined and the map must be loaded in its entirety. The defined clipping is applied ​to all layers of the map.  | None  | 
 +Second Window Coordinate Y  | [[Real Value Type]] ​ | Y coordinate ​of the lower-right corner of the clipping window, expressed in the map projection units. The value must be within the map extent, otherwise the operation will fail. If null, the clipping window will not be defined and the map must be loaded in its entirety. The defined clipping ​is applied to all layers of the map.  | None  | 
 +| Step  | [[Non Negative ​Integer Value Type]] ​ | Current step or model iteration. Files with the same name and numbered suffixes will be loaded sequentially according to the model step. This port automatically associates with the innermost compatible container. This is an advanced port.  | None  | 
 +| Workdir ​ | [[Workdir Type]] ​ | Workdir folder path. Can be a folder or Zip file. If not associated, the working directory is considered to be the location where the script is saved. This is an advanced port.  | None  |
  
 ===== Output ===== ===== Output =====
  
 ^ Name  ^ Type  ^ Description ​ ^ ^ Name  ^ Type  ^ Description ​ ^
-| Map  | [[Map Type|Map]]  | The map loaded by this functor. ​ |+| Map  | [[Map Type]] ​ | The map loaded by this functor, or if defined, only the window specified by the clipping window parameters.  |
  
 ===== Group ===== ===== Group =====
  
 [[Functor List#​Input/​Output | Input/​Output]] [[Functor List#​Input/​Output | Input/​Output]]
- 
-===== Notes ===== 
  
 ===== Notes ===== ===== Notes =====
Line 35: Line 39:
 See also [[Load Categorical Map]] for loading maps whose cells represent categories. See also [[Load Categorical Map]] for loading maps whose cells represent categories.
  
-**Dinamica 1.9 and above** uses the GDAL library [[http://​www.gdal.org|GDAL]] to read and write maps. More information about each GDAL file format can be found consulting the [[http://​www.gdal.org/​formats_list.html|GDAL format list]] in the GDAL website. +If the "Null Value" parameter ​is specifiedany cell corresponding ​to the original null value of the map, if provided, is converted ​to the new null value. This ensures that values originally represented ​by null value still representing null valueseven if the null value definition ​changesAny non-null value corresponding ​to the newly defined ​null value is also promoted to new null value.
- +
-==== Input File Formats ==== +
- +
-Using GDAL, Dinamica EGO can read maps in the file formats below. +
- +
-It is worth noting that only the most common file formats are listed in the Open Map dialog file filters. Howeverit is possible ​to open any of the formats below choosing "All files" in the dialog. +
- +
-^ Description ^ Extension ^ +
-| AIRSAR Polarimetric [AirSAR] |  | +
-| ASCII Gridded [XYZ] | .xyz | +
-| Arc/Info ASCII Grid [AAIGrid] | .asc | +
-| Arc/Info Binary Grid [AIG] |  | +
-| BIGGIF | .gif | +
-| BSB Nautical Chart Format [BSB] |  | +
-| CEOS |  | +
-| Convair PolGASP data  [CPG] |  | +
-| DRDC COASP SAR Processor Raster [COASP] | .hdr | +
-| Daylon Leveller Heightfield [Leveller] | .ter | +
-| ELAS DIPEx [DIPEx] |  | +
-| ELAS DIPEx [ELAS] |  | +
-| ENVI Labelled Raster [ENVI] |  | +
-| EOSAT FAST Format [FAST] |  | +
-| ERMapper [ERS] |  | +
-| ESRI Labelled [EHdr] |  | +
-| EUMETSAT Archive native [MSGN] | .nat | +
-| EarthWatch/​DigitalGlobe [TIL] |  | +
-| Envisat Image Product [ESAT] | .n1 | +
-| Erdas 7.x [LAN] |  | +
-| Erdas Imagine Raw [EIR] |  | +
-| Erdas Imagine [HFA] | .img | +
-| FARSITE v.4 LCP Format [LCP] | .lcp | +
-| First Generation USGS DOQ [DOQ1] |  | +
-| Fuji BAS Scanner Image [FujiBAS] |  | +
-| GDAL Virtual [VRT] | .vrt |  +
-| GSC Geogrid [GSC] |  | +
-| GSat File Format [GFF] | .gff | +
-| Generic Binary [GenBin] |  | +
-| Geospatial PDF [PDF] | .pdf | +
-| Golden Software ASCII Grid [GSAG] | .grd | +
-| Golden Software Binary Grid [GSBG] | .grd | +
-| Golden Software Surfer 7 Binary Grid [GS7BG] | .grd | +
-| Graphics Interchange Format [GIF] | .gif | +
-| Grid eXchange File [GXF] | .gxf | +
-| HF2/HFZ heightfield raster [HF2] | .hf2 | +
-| ILWIS Raster Map [ILWIS] | .mpr/mpl | +
-| Idrisi Raster [RST] | .rst | +
-| Image Display and Analysis [IDA] |  | +
-| In Memory Raster [MEM] |  | +
-| JAXA PALSAR Product Reader [JAXAPALSAR] |  | +
-| JPEG JFIF [JPEG] | .jpg | +
-| JPEG2000 [JP2OpenJPEG] | .jp2 | +
-| Japanese DEM [JDEM] | .mem | +
-| KMLSUPEROVERLAY |  | +
-| Magellan Topo [BLX] | .blx | +
-| Microsoft Windows Device Independent Bitmap [BMP] | .bmp | +
-| Military Elevation Data [DTED] |  | +
-| NADCON Datum Grid Shift [LOSLAS] |  | +
-| NASA Planetary Data System [PDS] |  | +
-| NITF | .ntf | +
-| NLAPS Data Format [NDF] |  | +
-| NOAA Polar Orbiter Level 1b Data Set [L1B] |  | +
-| NOAA vertical datum shift [GTX] | .gtx | +
-| NTv2 Datum Grid Shift [NTv2] | .gsb | +
-| Netpbm [PNM] | .pnm | +
-| New Labelled USGS DOQ [DOQ2] |  | +
-| Northwood/​VerticalMapper Classified Grid Format [NWT_GRC] | .grc | +
-| Northwood/​VerticalMapper Numeric Grid Format [NWT_GRD] | .grd | +
-| OGC Web Coverage Service [WCS] |  | +
-| OGC Web Map Service [WMS] |  | +
-| OZI OZF2/OZFX3 [OZI] |  | +
-| PCI Geomatics Database File [PCIDSK] | .pix | +
-| PCI Labelled [PAux] |  | +
-| PCRaster | .map +
-| Portable Network Graphics [PNG] | .png | +
-| PostGIS Raster [PostGISRaster] |  | +
-| R Object Data Store [R] | .rda | +
-| RadarSat2 XML [RS2] |  | +
-| Raster Matrix Format [RMF] | .rsw | +
-| Raster Product Format/RPF [ADRG] | .gen | +
-| Raster Product Format/RPF [RPFTOC] | .toc | +
-| SAGA GIS Binary format [SAGA] | .sdat | +
-| SAR_CEOS |  | +
-| SGI Image Format [SGI] | .rgb | +
-| SRTM HGT Format [SRTMHGT] | .hgt | +
-| Spot DIMAP [DIMAP] |  | +
-| Standard Raster Product [SRP] | .img | +
-| Swedish Grid RIK [RIK] | .rik | +
-| TIFF / BigTIFF / GeoTIFF [GTiff] | .tif | +
-| TerraSAR-X Complex SAR Data Product [COSAR] |  | +
-| TerraSAR-X Product [TSX] |  | +
-| Terragen Heightfield [Terragen] | .ter | +
-| USGS ASCII DEM / CDED [USGSDEM] | .dem | +
-| USGS Astrogeology ISIS cube (Version 2) [ISIS2] |  | +
-| USGS Astrogeology ISIS cube (Version 3) [ISIS3] |  | +
-| USGS SDTS DEM [SDTS] | .ddf | +
-| VTP Binary Terrain Format [BT] | .bt | +
-| Vexcel MFF [MFF] | .hdr | +
-| Vexcel MFF2 [MFF2] |  | +
-| WMO GRIB1/GRIB2 [GRIB] | .grb | +
-| X11 Pixmap [XPM] | .xpm | +
- +
-==== Output File Formats ==== +
- +
-Using GDALDinamica EGO can write maps in the file formats below. File formats whose descriptions are marked with a star (*) do not define an extension. To workaround this limitationDinamica EGO invents the corresponding extension using the file format description. +
- +
-It is worth noting that only the most common file formats are listed in the Save Map dialog file filters. However, it is possible ​to open any of the formats below choosing "All files" in the dialog. +
- +
-^ Description ^ Extension ^ +
-| Daylon Leveller Heightfield [Leveller] | .ter | +
-| ELAS DIPEx [ELAS]* | .elas | +
-| ENVI Labelled Raster [ENVI]* | .envi | +
-| ERMapper [ERS]* | .ers | +
-| ESRI Labelled [EHdr]* | .ehdr | +
-| Erdas Imagine [HFA] | .img | +
-| GDAL Virtual [VRT] | .vrt | +
-| Golden Software Binary Grid [GSBG] | .grd | +
-| ILWIS Raster Map [ILWIS] | .mpr/mpl | +
-| Idrisi Raster [RST] | .rst | +
-| Image Display and Analysis [IDA]* | .ida | +
-| In Memory Raster [MEM]* | .mem | +
-| Microsoft Windows Device Independent Bitmap [BMP] | .bmp | +
-| NITF | .ntf | +
-| NOAA vertical datum shift [GTX] | .gtx | +
-| NTv2 Datum Grid Shift [NTv2] | .gsb | +
-| Netpbm [PNM] | .pnm | +
-| PCI Geomatics Database File [PCIDSK] | .pix | +
-| PCI Labelled* | .paux | +
-| Raster Matrix Format [RMF] | .rsw | +
-| Raster Product Format/RPF [ADRG] | .gen | +
-| SAGA GIS Binary format [SAGA] | .sdat | +
-| SGI Image Format [SGI] | .rgb | +
-| TIFF / BigTIFF / GeoTIFF [GTiff] | .tif | +
-| Terragen Heightfield [Terragen] | .ter | +
-| VTP Binary Terrain Format [BT] | .bt | +
-| Vexcel MFF [MFF] | .hdr | +
-| Vexcel MFF2 [MFF2]* | .mff2 | +
- +
-  * The support to AAIGrid (.asc) in GDAL is read only. So, Dinamica EGO provides the writing capability itself. This format can read images using [[:Cell Type Type|cell types]] "​Signed 32 Bit Integer"​ and "IEEE 754 32 Bit Real". All cell types can be written, but they are automatically converted back to one of those formats next time Dinamica reads the image again. +
- +
-  * The support to ERMapper (.ers) in GDAL ignores class names. To workaround this limitation, support to reading and writing this file format is provided ​by Dinamica EGO itself. +
- +
-==== GDAL Limitations ==== +
- +
-GDAL (and some times the underlying file format) imposes limitations on the representation of projectionslayer names, category names and their corresponding colors. The limitations and their corresponding workaround are listed in the table below: +
- +
-^ Limitation ^ Workaround ^  +
-| Some file formats do not support storing projections. ​ | Use a VRT file or an auxiliary PAM XML file to keep this information. ​ | +
-| Several file formats do not support storing category names. ​ | Use a VRT file or an auxiliary PAM XML file to keep this information. The ERMapper file format has the best support to category names and colors. ​ | +
-| Several file formats do not support storing category colors. ​ | Use a VRT file or an auxiliary PAM XML file to keep this information. The ERMapper file format has the best support to category names and colors. ​ | +
-| Several file formats do not support the storage of layer names. ​ | Use a VRT file or an auxiliary PAM XML file to keep this information. The ERMapper file format also has support to layer names. ​ | +
-| The categories must start from 0 and their definition ​must be contiguous | Unfortunately,​ the only way to workaround this limitation is defining dummy categories (Dinamica does this when representing ​non-contiguous categories in a GDAL supported format) or using the ERMapper file format. ​ | +
- +
-Because the ERMapper file format is handled by Dinamica itself, the PAM XML file can not be used with this format. +
-==== Dinamica Limitation ==== +
- +
-Dinamica only retrieves and uses category names and colors from the first layer/band when using GDAL. All the other layers/​bands are supposed ​to use the same category names and colors. +
- +
-==== Additional Notes ==== +
- +
-  * When the map projection is not found, the map projection is left undefined. This differs from previous Dinamica versions (Dinamica 1.8) that assumes a LOCAL projection in these cases. +
- +
-  * When the cell dimension is not defined, a one meter resolution [or one degree, depending on the map projection used] is assumed.+
  
-  * It is only possible to load maps represented by 816 or 32 bits per cell. Other cell types are not supported.+For a list of file formats that Load Map can load, the supported ​[[wp>​Map_projection|projections]] and [[wp>​Datum_(geodesy)|datums]],​ check the [[supported map formats#​map_formats_supported_for_reading|supported map formats]].
  
-==== Virtual Format ====+It is possible to load maps from [[wp>​zip_(file_format)|Zip]] archives. See [[useful_tips#​loading_files_from_zip_files|this useful tip]] to know how to do it.
  
-GDAL support ​virtual file format called [[http://​www.gdal.org/​gdal_vrttut.html|VRT]]. This format can be used to transform an image defining a different registration infodifferent classe names and a different color tableIt can also be use to create mosaics from several different images. A example of a VRT file defined from a two unrelated image files can be found below.+The clipping window parameters allow loading only specific rectangular region of the map instead of the entire mapWhen all four window coordinate parameters are null (default), the entire map is loadedTo use the clipping window feature, all four coordinates (First Window Coordinate X, First Window Coordinate Y, Second Window Coordinate X, and Second Window Coordinate Y) must be defined togetherIf the clipping window parameters are provided, only the area corresponding ​to the clipping window is loaded.
  
-<file xml test.vrt>​ +If the value of "Step" ​is nullthe file read will not have a suffix.
-<​VRTDataset rasterXSize="2512" ​rasterYSize="​2512">​ +
-  <​GeoTransform>​-440720.060.0, 30.0, 3751320.0, 0.0, -60.0</​GeoTransform>​ +
-  <​VRTRasterBand dataType="​Byte"​ band="​teste">​ +
-    <​ColorInterp>​Palette</​ColorInterp>​ +
-    <​ColorTable>​ +
-      <Entry c1="​255"​ c2="​0"​ c3="​0"​ c4="​255"/>​ +
-      <Entry c1="​145"​ c2="​78"​ c3="​224"​ c4="​255"/>​ +
-      <Entry c1="​145"​ c2="​230"​ c3="​0"​ c4="​255"/>​ +
-      <Entry c1="​145"​ c2="​145"​ c3="​145"​ c4="​255"/>​ +
-      <Entry c1="​100"​ c2="​200"​ c3="​30"​ c4="​255"/>​ +
-      <Entry c1="​10"​ c2="​20"​ c3="​30"​ c4="​255"/>​ +
-    </​ColorTable>​ +
-    <​SimpleSource>​ +
-      <​SourceFilename relativeToVRT="​teste">​myband.bmp</​SourceFilename>​ +
-      <​SourceBand>​1</​SourceBand>​ +
-      <SrcRect xOff="​0"​ yOff="​0"​ xSize="​512"​ ySize="​512"/>​ +
-      <DstRect xOff="​100"​ yOff="​100"​ xSize="​512"​ ySize="​512"/>​ +
-    </​SimpleSource>​ +
-  <​CategoryNames>​ +
-    <​Category>​Missing</​Category>​ +
-    <​Category>​Non-Crop</​Category>​ +
-    <​Category>​Wheat</​Category>​ +
-    <​Category>​Corn</​Category>​ +
-    <​Category>​Soybeans</​Category>​ +
-  </​CategoryNames>​  +
-  </​VRTRasterBand>​ +
-</​VRTDataset>​ +
-</​file>  ​+
  
 ===== Internal Name ===== ===== Internal Name =====