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
Last revision Both sides next revision
dev:gdal [2011/12/05 20:07]
hermann [GDAL]
dev:gdal [2011/12/16 14:03]
admin [GDAL Limitations]
Line 1: Line 1:
 ====== GDAL ====== ====== GDAL ======
 +
 +FIXME Dinamica version: 1.9.0
  
 Below, the influence of the library [[http://​www.gdal.org|GDAL]] in the Dinamica EGO operation is presented. Below, the influence of the library [[http://​www.gdal.org|GDAL]] in the Dinamica EGO operation is presented.
 +
 +===== File Formats =====
  
 <note tip> <note tip>
-More information about each GDAL file format can be found consulting the [[http://​www.gdal.org/​formats_list.html|GDAL format list]].+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.
 </​note>​ </​note>​
  
-===== Supported ​Input Formats ​=====+==== Input Formats ====
  
 Using GDAL, Dinamica EGO can read maps in the following file formats. ​ Using GDAL, Dinamica EGO can read maps in the following file formats. ​
  
-^ GDAL Supported Input Formats ^^ 
 ^ Description ^ Extension ^ ^ Description ^ Extension ^
 | VRT | .vrt | | VRT | .vrt |
Line 110: Line 113:
 | OZI |  | | OZI |  |
  
-===== Supported ​Output Formats ​=====+==== Output Formats ====
  
 Using GDAL, Dinamica EGO can write maps in the following file formats. ​ Using GDAL, Dinamica EGO can write maps in the following file formats. ​
  
-^ GDAL Supported Output Formats ^^ +^ Description ​((File formats marked with a star (*) do not define an extension. To workaround this limitation, Dinamica EGO invents the corresponding extension using the file format description)) ​^ Extension ^
-^ Description ^ Extension ^+
 | VRT | .vrt | | VRT | .vrt |
 | GTiff | .tif | | GTiff | .tif |
Line 146: Line 148:
 | SAGA | .sdat | | SAGA | .sdat |
  
-File formats marked with a star (*) do not define an extension. To workaround this limitation, Dinamica EGO invents the corresponding extension using the file format description.+Some important notes:
  
-<​note>​ +  ​* 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 AAIGrid (.asc) in GDAL is read only. So, Dinamica EGO provides the writing capability itself. This format can read and write images using [[:Cell Type Type|cell types]] "​Signed 32 Bit Integer"​ and "IEEE 754 32 Bit Real"​. ​The cell type is detected ​automatically.+
  
   * 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.   * 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.
-</note>+ 
 +==== GDAL Limitations ==== 
 + 
 +GDAL (and some times the underlying file format) imposes limitations on the representation of projections,​ category names, their corresponding colors and layer names. 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 ((include link to file format description)) or an auxiliary PAM XML file ((include link to file format description)) 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 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 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.
  
 ===== Workdir/​folder Names ===== ===== Workdir/​folder Names =====
  
-The use of workdir ​+!!!FIXME 
 + 
 + 
 +===== Virtual Format ===== 
 + 
 +GDAL support a 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. 
 + 
 +<file xml test.vrt>​ 
 +<​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> ​  
 + 
 +===== PAM XML Auxiliary File ===== 
 + 
 +!!!FIXME