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:11]
admin
load_map [2015/10/12 16:32] (current)
admin
Line 8: Line 8:
  
 ^ 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 null cells. This is particularly useful for assigning a missing ​null value to a GeoTiff data.  | False  | +Load As Sparse ​ | [[Boolean Value Type]] ​ | If true, the map is loaded as sparse imageSparse images have the advantage of storing only the cells containing non-null values, but they have worse access time.  | False  | 
-Null Value  | [[Int Type|Int]]  | Value used to represent null cell. The "​Define Null Value" flag must be set in order to define ​null valueThis is particularly useful for assigning a missing ​null value to a GeoTiff data.  |  | +| Suffix Digits ​ | [[Non Negative ​Integer Value Type]] ​ | Number of digits used to represent the image file name suffix. ​ | 0  | 
-| 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.  | 0  | +| 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.  | None  | 
-| 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  | +| Workdir ​ | [[Workdir Type]] ​ | Workdir folder path.  | None  |
-| Workdir ​ | [[Workdir Type|Workdir]]  | Workdir folder path.  | 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. ​ |
  
 ===== Group ===== ===== Group =====
  
 [[Functor List#​Input/​Output | Input/​Output]] [[Functor List#​Input/​Output | Input/​Output]]
- 
-===== Notes ===== 
  
 ===== Notes ===== ===== Notes =====
Line 35: Line 32:
 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 specified, any cell corresponding ​to the original null value of the mapif provided, is converted ​to the new null valueThis 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. However, it 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 GDAL, Dinamica 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 limitation, Dinamica 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. Howeverit 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 limitationsupport 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 the storage of projections ​ | Use a VRT file or an auxiliary PAM XML file to keep this information. ​ | +
-| Several file formats do not support the storage of category names. ​ | To workaround this limitations,​ it is possible ​to 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 category colors. ​ | To workaround this limitationsit is possible to 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. ​ | To workaround this limitations,​ it is possible to 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. ​ | +
- +
-==== 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 8, 16 or 32 bits per cell. Other cell types are not supported. +
- +
-==== Virtual Format ====+
  
-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 info, different classe names and a different color table. It 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.+For 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]].
  
-<file xml test.vrt> +It is possible to load maps from [[wp>zip_(file_format)|Zip]] archivesSee [[useful_tips#​loading_files_from_zip_files|this useful tip]] to know how to do it.
-<​VRTDataset rasterXSize="​2512"​ rasterYSize="​2512">​ +
-  <​GeoTransform>​-440720.0, 60.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 =====