Commit 7fbc648efbc9039c4bfb83fa37cd14ef6d1978aa

Authored by michel-lepage
1 parent 51a3052a
Exists in master

init2

Showing 157 changed files with 187960 additions and 0 deletions   Show diff stats

Too many changes.

To preserve performance only 100 of 157 files displayed.

DEM_winstral/DEM_ASTER_natif_large_formosat.tif 0 → 100644
No preview for this file type
DEM_winstral/DEM_ASTER_natif_large_formosat.tif.aux.xml 0 → 100644
... ... @@ -0,0 +1,14 @@
  1 +<PAMDataset>
  2 + <PAMRasterBand band="1">
  3 + <Histograms>
  4 + <HistItem>
  5 + <HistMin>640.2505</HistMin>
  6 + <HistMax>4142.7495</HistMax>
  7 + <BucketCount>1000</BucketCount>
  8 + <IncludeOutOfRange>0</IncludeOutOfRange>
  9 + <Approximate>1</Approximate>
  10 + <HistCounts>0|0|0|0|0|5|4|24|6|6|2|10|5|15|10|18|9|24|30|31|16|39|18|36|22|36|36|40|27|38|51|64|44|74|55|79|48|104|58|67|42|55|45|57|48|41|27|33|38|49|34|48|33|26|35|40|27|54|59|60|50|48|38|39|36|37|25|37|21|33|27|19|23|47|18|28|29|47|26|39|43|37|46|81|70|88|72|58|38|78|42|55|50|59|59|80|49|89|50|63|78|55|74|53|62|56|62|60|60|68|65|56|77|57|78|60|68|74|89|69|103|80|116|94|93|70|102|87|118|80|124|91|132|100|136|102|147|108|126|117|131|99|160|121|137|94|111|99|128|96|133|80|115|106|69|72|100|85|111|73|99|86|139|97|109|108|130|121|141|104|124|92|104|91|164|101|192|128|160|131|173|123|148|137|164|122|204|173|265|182|280|213|257|158|186|143|158|125|165|129|201|142|181|136|163|162|221|148|187|114|159|127|193|104|182|124|155|112|139|88|123|79|113|82|102|91|109|80|113|79|120|77|117|74|92|93|105|95|126|74|100|80|99|83|94|83|115|87|141|89|158|96|101|82|126|92|119|107|125|94|121|98|106|55|98|68|106|68|94|91|112|83|107|92|117|107|147|89|141|89|134|93|113|80|102|83|124|107|110|73|125|75|99|89|104|84|95|102|100|108|86|101|79|130|82|138|102|140|106|129|101|125|127|131|135|130|133|165|104|166|109|157|118|177|138|189|147|175|138|192|133|183|126|189|137|162|149|165|115|160|140|178|132|167|124|176|126|136|138|142|106|127|117|165|109|106|103|155|115|188|125|163|113|182|123|181|141|189|148|179|134|167|142|197|140|188|134|188|137|188|165|192|161|215|151|203|134|160|132|183|148|217|141|180|156|214|177|223|161|207|153|184|168|188|172|213|155|202|173|216|140|205|162|200|139|160|139|177|123|166|140|164|126|175|146|193|149|193|133|166|148|185|126|176|147|177|142|203|148|209|174|216|175|234|172|214|144|206|133|178|148|171|131|143|91|144|122|163|125|181|132|175|135|181|136|225|177|215|183|263|186|285|225|295|186|259|180|243|195|216|182|219|160|227|162|205|187|217|153|259|189|219|176|227|186|227|162|211|167|187|232|158|217|155|185|142|169|168|202|148|210|147|222|140|189|119|157|113|171|127|128|115|142|85|128|100|86|82|97|95|91|93|96|75|88|65|111|88|121|84|122|87|126|102|127|94|120|85|108|81|110|89|118|98|127|88|122|91|140|107|145|87|104|103|121|100|117|74|117|82|111|94|111|84|112|90|124|112|128|102|126|103|114|92|137|94|118|81|104|83|111|91|114|87|125|94|115|92|103|78|95|87|116|60|98|70|97|64|96|73|96|76|108|74|92|73|93|85|86|65|100|62|87|64|106|76|100|71|101|64|95|68|91|77|92|64|101|74|83|65|84|81|74|69|95|85|76|73|92|54|86|64|83|62|89|63|76|48|86|59|62|47|60|54|86|50|105|57|71|66|73|52|83|52|78|53|59|50|69|65|73|54|72|40|63|57|64|40|67|63|65|59|64|62|81|52|62|44|77|52|75|73|52|70|52|69|42|74|46|65|66|73|50|76|53|75|61|58|48|67|46|74|41|74|49|65|44|59|60|62|46|71|54|56|46|62|55|70|43|65|52|51|35|66|42|69|44|58|55|67|55|68|59|60|47|82|44|56|65|63|55|73|58|64|50|85|49|66|53|74|48|51|48|68|37|67|47|71|46|63|39|58|55|62|46|50|51|78|50|71|52|60|51|67|34|67|40|61|41|49|38|72|45|57|45|50|41|58|42|62|42|60|58|50|44|59|42|60|52|63|29|50|39|39|41|58|32|47|33|52|28|50|33|44|25|44|35|40|28|42|41|34|33|46|33|50|43|48|31|33|30|42|26|21|21|42|27|35|19|23|31|44|26|35|30|41|25|45|28|34|29|31|11|23|29|29|23|23|29|34|32|31|17|37|18|28|22|30|22|18|13|25|19|19|17|18|11|25|21|20|24|15|23|18|18|12|15|13|20|16|16|9|8|7|10|5|6|3|6|8|3|1|2|3|5|2|2|2|4|3|2|1|3|3|2|2|1|0|1|1|3|4|2|2|2|4|3|2|3|4|2|2|2|1|2|1|4|1|4|2|4|2|2|4|1|4|4|3|5|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0</HistCounts>
  11 + </HistItem>
  12 + </Histograms>
  13 + </PAMRasterBand>
  14 +</PAMDataset>
... ...
DEM_winstral/DEM_ASTER_natif_large_formosat.tif.xml 0 → 100644
... ... @@ -0,0 +1,2 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<metadata xml:lang="fr"><Esri><CreaDate>20140228</CreaDate><CreaTime>10363500</CreaTime><ArcGISFormat>1.0</ArcGISFormat><ArcGISstyle>ISO 19139 Metadata Implementation Specification</ArcGISstyle><SyncOnce>FALSE</SyncOnce><DataProperties><itemProps><itemName Sync="TRUE">DEM_ASTER_natif_large_formosat.tif</itemName><itemLocation><linkage Sync="TRUE">file://E:\Python\DEM\DEM_ASTER_natif_large_formosat.tif</linkage><protocol Sync="TRUE">Local Area Network</protocol></itemLocation><imsContentType Sync="TRUE">002</imsContentType><nativeExtBox><westBL Sync="TRUE">239629.618077</westBL><eastBL Sync="TRUE">284087.980757</eastBL><southBL Sync="TRUE">39547.302646</southBL><northBL Sync="TRUE">84005.665326</northBL><exTypeCode Sync="TRUE">1</exTypeCode></nativeExtBox></itemProps><coordRef><type Sync="TRUE">Projected</type><geogcsn Sync="TRUE">GCS_WGS_1984</geogcsn><csUnits Sync="TRUE">Linear Unit: Meter (1.000000)</csUnits><projcsn Sync="TRUE">Lambert_Conformal_Conic_2SP</projcsn><peXml Sync="TRUE">&lt;ProjectedCoordinateSystem xsi:type='typens:ProjectedCoordinateSystem' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:typens='http://www.esri.com/schemas/ArcGIS/10.1'&gt;&lt;WKT&gt;PROJCS[&amp;quot;Lambert_Conformal_Conic_2SP&amp;quot;,GEOGCS[&amp;quot;GCS_WGS_1984&amp;quot;,DATUM[&amp;quot;D_WGS_1984&amp;quot;,SPHEROID[&amp;quot;WGS_1984&amp;quot;,6378137.0,298.257223563]],PRIMEM[&amp;quot;Greenwich&amp;quot;,0.0],UNIT[&amp;quot;Degree&amp;quot;,0.0174532925199433]],PROJECTION[&amp;quot;Lambert_Conformal_Conic&amp;quot;],PARAMETER[&amp;quot;false_easting&amp;quot;,500000.0],PARAMETER[&amp;quot;false_northing&amp;quot;,300000.0],PARAMETER[&amp;quot;central_meridian&amp;quot;,-5.4],PARAMETER[&amp;quot;standard_parallel_1&amp;quot;,31.727867],PARAMETER[&amp;quot;standard_parallel_2&amp;quot;,34.871728],PARAMETER[&amp;quot;latitude_of_origin&amp;quot;,33.3],UNIT[&amp;quot;Meter&amp;quot;,1.0]]&lt;/WKT&gt;&lt;XOrigin&gt;-37648800&lt;/XOrigin&gt;&lt;YOrigin&gt;-28134000&lt;/YOrigin&gt;&lt;XYScale&gt;118053506.98765086&lt;/XYScale&gt;&lt;ZOrigin&gt;-100000&lt;/ZOrigin&gt;&lt;ZScale&gt;10000&lt;/ZScale&gt;&lt;MOrigin&gt;-100000&lt;/MOrigin&gt;&lt;MScale&gt;10000&lt;/MScale&gt;&lt;XYTolerance&gt;0.001&lt;/XYTolerance&gt;&lt;ZTolerance&gt;0.001&lt;/ZTolerance&gt;&lt;MTolerance&gt;0.001&lt;/MTolerance&gt;&lt;HighPrecision&gt;true&lt;/HighPrecision&gt;&lt;/ProjectedCoordinateSystem&gt;</peXml></coordRef><RasterProperties><General><PixelDepth Sync="TRUE">16</PixelDepth><HasColormap Sync="TRUE">FALSE</HasColormap><CompressionType Sync="TRUE">None</CompressionType><NumBands Sync="TRUE">1</NumBands><Format Sync="TRUE">TIFF</Format><HasPyramids Sync="TRUE">FALSE</HasPyramids><SourceType Sync="TRUE">continuous</SourceType><PixelType Sync="TRUE">signed integer</PixelType><NoDataValue Sync="TRUE">32767</NoDataValue></General></RasterProperties></DataProperties><SyncDate>20140228</SyncDate><SyncTime>10363500</SyncTime><ModDate>20140228</ModDate><ModTime>10363500</ModTime></Esri><dataIdInfo><envirDesc Sync="TRUE">Microsoft Windows 7 Version 6.1 (Build 7601) Service Pack 1; Esri ArcGIS 10.1.0.3035</envirDesc><dataLang><languageCode value="fra" Sync="TRUE"></languageCode><countryCode value="FRA" Sync="TRUE"></countryCode></dataLang><idCitation><resTitle Sync="TRUE">DEM_ASTER_natif_large_formosat.tif</resTitle><presForm><PresFormCd value="005" Sync="TRUE"></PresFormCd></presForm></idCitation><spatRpType><SpatRepTypCd value="002" Sync="TRUE"></SpatRepTypCd></spatRpType><dataExt><geoEle><GeoBndBox esriExtentType="search"><exTypeCode Sync="TRUE">1</exTypeCode><westBL Sync="TRUE">-8.135197</westBL><eastBL Sync="TRUE">-7.658217</eastBL><northBL Sync="TRUE">31.330702</northBL><southBL Sync="TRUE">30.920377</southBL></GeoBndBox></geoEle></dataExt></dataIdInfo><mdLang><languageCode value="fra" Sync="TRUE"></languageCode><countryCode value="FRA" Sync="TRUE"></countryCode></mdLang><mdChar><CharSetCd value="004" Sync="TRUE"></CharSetCd></mdChar><distInfo><distFormat><formatName Sync="TRUE">Jeu de données Raster</formatName></distFormat></distInfo><mdHrLv><ScopeCd value="005" Sync="TRUE"></ScopeCd></mdHrLv><mdHrLvName Sync="TRUE">dataset</mdHrLvName><refSysInfo><RefSystem><refSysID><identCode code="0" Sync="TRUE"></identCode></refSysID></RefSystem></refSysInfo><spatRepInfo><Georect><cellGeo><CellGeoCd Sync="TRUE" value="002"></CellGeoCd></cellGeo><numDims Sync="TRUE">2</numDims><tranParaAv Sync="TRUE">1</tranParaAv><chkPtAv Sync="TRUE">0</chkPtAv><cornerPts><pos Sync="TRUE">239629.618077 39547.302646</pos></cornerPts><cornerPts><pos Sync="TRUE">239629.618077 84005.665326</pos></cornerPts><cornerPts><pos Sync="TRUE">284087.980757 84005.665326</pos></cornerPts><cornerPts><pos Sync="TRUE">284087.980757 39547.302646</pos></cornerPts><centerPt><pos Sync="TRUE">261858.799417 61776.483986</pos></centerPt><axisDimension type="002"><dimSize Sync="TRUE">1517</dimSize><dimResol><value Sync="TRUE" uom="Meter">29.306765</value></dimResol></axisDimension><axisDimension type="001"><dimSize Sync="TRUE">1517</dimSize><dimResol><value Sync="TRUE" uom="Meter">29.306765</value></dimResol></axisDimension><ptInPixel><PixOrientCd Sync="TRUE" value="001"></PixOrientCd></ptInPixel></Georect></spatRepInfo><contInfo><ImgDesc><contentTyp><ContentTypCd Sync="TRUE" value="001"></ContentTypCd></contentTyp><covDim><Band><dimDescrp Sync="TRUE">Band_1</dimDescrp><maxVal Sync="TRUE">4141.000000</maxVal><minVal Sync="TRUE">642.000000</minVal><bitsPerVal Sync="TRUE">16</bitsPerVal><valUnit><UOM type="length"></UOM></valUnit></Band></covDim></ImgDesc></contInfo><mdDateSt Sync="TRUE">20140228</mdDateSt></metadata>
... ...
DEM_winstral/DEM_ASTER_natif_large_formosat_ombrage.tif.aux.xml 0 → 100644
... ... @@ -0,0 +1,20 @@
  1 +<PAMDataset>
  2 + <PAMRasterBand band="1">
  3 + <Histograms>
  4 + <HistItem>
  5 + <HistMin>-0.127498649597168</HistMin>
  6 + <HistMax>255.1247978439331</HistMax>
  7 + <BucketCount>1000</BucketCount>
  8 + <IncludeOutOfRange>0</IncludeOutOfRange>
  9 + <Approximate>1</Approximate>
  10 + <HistCounts>119|1|2|3|3|0|3|0|4|3|1|3|3|1|2|1|2|1|1|1|3|1|5|3|2|1|0|2|2|3|2|4|4|1|3|1|3|4|3|3|5|2|1|2|4|1|1|0|2|3|1|3|4|6|4|2|6|3|2|1|3|8|3|2|1|1|3|5|2|4|5|5|5|2|4|5|5|10|4|6|4|7|4|6|6|9|5|7|5|1|2|6|7|7|4|6|8|6|5|2|2|7|8|5|6|9|3|3|5|4|0|4|4|5|5|4|5|7|3|5|3|9|4|7|3|4|5|6|9|9|11|6|7|5|8|9|8|7|12|3|5|8|8|3|8|8|4|9|10|7|4|6|9|8|9|6|7|9|7|9|5|10|13|8|11|7|7|6|12|15|5|9|10|11|13|10|9|13|11|11|9|14|10|9|13|15|12|11|9|10|12|15|15|4|9|10|15|13|12|16|17|13|10|8|10|10|11|13|13|16|12|8|10|9|13|12|20|11|15|8|12|16|20|14|11|24|14|12|13|18|15|15|19|14|11|15|14|17|19|18|18|13|20|20|15|19|19|21|21|20|18|22|20|21|13|16|12|23|20|21|13|19|16|20|20|30|20|20|21|25|27|29|24|29|20|24|19|24|25|29|24|19|26|23|23|22|19|24|27|34|21|24|17|27|25|18|16|25|27|20|25|24|19|22|23|29|31|33|27|22|18|26|30|25|25|31|31|34|35|31|30|25|16|20|31|45|26|34|29|31|40|32|30|26|28|24|31|29|42|35|30|33|27|34|27|46|25|39|38|42|27|32|56|36|34|28|41|27|40|43|39|32|33|52|29|39|28|28|28|39|32|41|28|34|37|43|39|35|43|29|50|40|33|28|31|45|20|43|49|39|41|48|37|37|38|31|46|41|39|26|51|31|32|30|34|38|40|50|39|39|34|53|49|42|41|42|51|35|63|36|57|42|43|45|44|49|40|51|43|45|47|63|33|43|45|55|32|30|50|54|30|30|45|66|40|52|55|33|35|39|47|51|48|34|49|50|40|40|55|56|51|29|50|54|40|53|47|52|50|36|42|52|47|47|37|54|48|45|43|57|61|38|43|54|65|47|47|49|61|38|31|67|79|50|42|58|51|56|47|55|58|43|61|39|52|67|49|58|66|58|46|49|56|53|70|51|50|64|71|52|55|57|55|47|64|48|83|49|46|52|67|63|46|57|65|42|52|60|64|58|47|47|44|61|55|48|64|50|57|65|47|55|60|56|71|77|67|58|52|58|67|57|52|76|65|83|51|53|56|59|40|58|58|76|61|57|55|63|68|73|60|74|78|52|51|70|64|75|64|54|67|65|55|63|63|57|47|64|69|67|61|72|73|76|71|61|64|75|74|64|67|71|84|65|68|66|80|80|56|53|59|67|73|62|70|105|52|70|68|76|85|74|75|73|79|59|65|81|73|72|75|70|74|56|62|79|79|79|81|55|78|67|73|72|78|103|72|77|59|99|103|74|77|89|79|92|87|76|109|83|81|75|87|83|60|91|111|85|90|87|98|100|80|95|95|88|117|72|111|94|93|84|92|101|87|90|112|104|111|94|85|119|73|98|118|127|85|94|91|143|99|101|105|123|96|100|98|93|110|123|94|104|139|99|101|119|113|98|127|133|94|121|114|131|116|110|124|148|89|101|136|135|103|101|117|143|108|108|126|125|105|107|123|144|121|128|132|140|110|133|107|123|131|124|144|130|126|128|143|115|101|152|153|120|126|105|145|135|126|146|106|135|139|126|141|118|139|139|146|145|159|140|143|138|141|144|140|175|116|133|150|158|131|131|162|129|110|130|154|119|125|151|154|95|134|125|132|125|163|117|131|157|120|114|133|133|144|133|155|115|133|157|126|115|119|136|120|113|123|113|117|131|123|119|158|99|121|130|135|109|146|105|102|105|82|121|129|100|111|130|109|110|134|104|113|125|102|121|118|130|113|123|109|118|133|94|134|120|112|146|122|96|110|125|101|122|93|114|136|101|121|112|102|106|110|142|96|106|113|121|117|106|128|98|98|132|92|111|122|107|113|130|100|115|136|111|104|98|134|114|105|118|113|100|102|115|142|112|113|106|125|110|110|122|122|103|131|115|129|125|128|113|129|115|101|131|135|113|121|107|137|116|115|105|100|146|146|101|115|133|108|101|104|126|130|118|111|111|133|99|120|125|109|121|131|121|110|135|113|124|125|120|123|104|102|107|111|117|114|132|96|104|94|119|86|98|99|107|92|42</HistCounts>
  11 + </HistItem>
  12 + </Histograms>
  13 + <Metadata>
  14 + <MDI key="STATISTICS_MAXIMUM">254.99729919434</MDI>
  15 + <MDI key="STATISTICS_MEAN">179.54435218163</MDI>
  16 + <MDI key="STATISTICS_MINIMUM">0</MDI>
  17 + <MDI key="STATISTICS_STDDEV">53.643591281422</MDI>
  18 + </Metadata>
  19 + </PAMRasterBand>
  20 +</PAMDataset>
... ...
DEM_winstral/DEM_ASTER_natif_large_formosat_winstral.tif.aux.xml 0 → 100644
... ... @@ -0,0 +1,28 @@
  1 +<PAMDataset>
  2 + <PAMRasterBand band="1">
  3 + <Histograms>
  4 + <HistItem>
  5 + <HistMin>-1.149615799367428</HistMin>
  6 + <HistMax>242.2741476644874</HistMax>
  7 + <BucketCount>1000</BucketCount>
  8 + <IncludeOutOfRange>0</IncludeOutOfRange>
  9 + <Approximate>1</Approximate>
  10 + <HistCounts>16|251|1624|5177|15230|16874|10351|5806|2755|1158|479|290|188|98|68|57|41|26|10|26|10|25|3|2|12|5|0|3|13|8|1|4|1|0|12|3|3|0|2|0|0|1|1|0|5|0|2|0|2|0|1|1|0|1|0|0|0|0|1|0|0|0|11|1|0|1|0|0|1|0|2|0|0|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|4|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|2|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|4</HistCounts>
  11 + </HistItem>
  12 + <HistItem>
  13 + <HistMin>-1.502987583866343</HistMin>
  14 + <HistMax>242.6275194489863</HistMax>
  15 + <BucketCount>256</BucketCount>
  16 + <IncludeOutOfRange>0</IncludeOutOfRange>
  17 + <Approximate>1</Approximate>
  18 + <HistCounts>807|42844|15803|850|188|68|22|23|7|18|2|7|4|3|0|1|12|2|2|1|0|0|0|3|0|0|0|0|0|4|0|0|0|0|0|0|0|2|0|0|0|0|0|0|0|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|4</HistCounts>
  19 + </HistItem>
  20 + </Histograms>
  21 + <Metadata>
  22 + <MDI key="STATISTICS_MAXIMUM">242.15255737305</MDI>
  23 + <MDI key="STATISTICS_MEAN">0.28227714737186</MDI>
  24 + <MDI key="STATISTICS_MINIMUM">-1.0280255079269</MDI>
  25 + <MDI key="STATISTICS_STDDEV">2.3050899339155</MDI>
  26 + </Metadata>
  27 + </PAMRasterBand>
  28 +</PAMDataset>
... ...
DEM_winstral/Winstral-2002-Spatial Snow Modeling of Wind-Redistributed Snow Using Terrain-Based Parameters.pdf 0 → 100644
No preview for this file type
DEM_winstral/dem_convert_extract.py 0 → 100644
... ... @@ -0,0 +1,63 @@
  1 +#! /usr/bin/env python
  2 +# -*- coding: iso-8859-1 -*-
  3 +
  4 +# Michel Le Page, 06/04/2013
  5 +
  6 +from math import *
  7 +import numpy as np
  8 +#import scipy as sp
  9 +from osgeo import gdal
  10 +import csv
  11 +from osgeo.gdalconst import *
  12 +
  13 +
  14 +if __name__ == "__main__":
  15 +
  16 + # Fichiers
  17 + infile="D:\DEM\SRTM_500m1"
  18 + outfile1="D:\DEM\srtm_500m_maroc.tif"
  19 +
  20 + xmin=-11.
  21 + ymin=36.
  22 + larg=9.
  23 + haut=8.
  24 +
  25 + inDs = gdal.Open(infile)
  26 + cols = inDs.RasterXSize
  27 + rows = inDs.RasterYSize
  28 + bands = inDs.RasterCount
  29 + driver = inDs.GetDriver()
  30 + geo=inDs.GetGeoTransform()
  31 +
  32 + xoffset=int((xmin-geo[0])/geo[1])
  33 + width=int(larg/geo[1])
  34 + yoffset=int((geo[3]-ymin)/(-geo[5]))
  35 + height=int(haut/(-geo[5]))
  36 +
  37 + print "Input Cols:", cols, "Ligs:", rows,driver
  38 + print "Output Cols:", width, "Ligs:", height
  39 +
  40 + band=inDs.GetRasterBand(1)
  41 +
  42 + mnt=band.ReadAsArray(xoffset,yoffset,width,height)
  43 +
  44 + format = "GTiff"
  45 + driver = gdal.GetDriverByName( format )
  46 + outDs=driver.Create(outfile1,width,height,bands,GDT_UInt16)
  47 + geo=inDs.GetGeoTransform()
  48 + # changement des coordonées
  49 + lgeo=list(geo)
  50 + lgeo[0]=geo[0]+(xoffset*geo[1])
  51 + lgeo[3]=geo[3]+(yoffset*geo[5])
  52 + tgeo=tuple(lgeo)
  53 + print tgeo
  54 + outDs.SetGeoTransform(tgeo)
  55 + outDs.SetProjection(inDs.GetProjection())
  56 + print inDs.GetProjection()
  57 + bando=outDs.GetRasterBand(1)
  58 + bando.WriteArray(mnt)
  59 + outDs=None
  60 +
  61 + inDs=None
  62 +
  63 +
... ...
DEM_winstral/dem_derivates.py 0 → 100644
... ... @@ -0,0 +1,237 @@
  1 +#! /usr/bin/env python
  2 +# -*- coding: iso-8859-1 -*-
  3 +
  4 +# Michel Le Page, 06/04/2013
  5 +
  6 +import os
  7 +from math import *
  8 +import numpy as np
  9 +from osgeo import gdal
  10 +import csv
  11 +from osgeo.gdalconst import *
  12 +from osgeo import gdal, gdal_array
  13 +import sys
  14 +
  15 +# =============================================================================
  16 +# rgb_to_hsv()
  17 +#
  18 +# rgb comes in as [r,g,b] with values in the range [0,255]. The returned
  19 +# hsv values will be with hue and saturation in the range [0,1] and value
  20 +# in the range [0,255]
  21 +#
  22 +def rgb_to_hsv( r,g,b ):
  23 +
  24 + maxc = np.maximum(r,np.maximum(g,b))
  25 + minc = np.minimum(r,np.minimum(g,b))
  26 +
  27 + v = maxc
  28 +
  29 + minc_eq_maxc = np.equal(minc,maxc)
  30 +
  31 + # compute the difference, but reset zeros to ones to avoid divide by zeros later.
  32 + ones = np.ones((r.shape[0],r.shape[1]))
  33 + maxc_minus_minc = np.choose( minc_eq_maxc, (maxc-minc,ones) )
  34 +
  35 + s = (maxc-minc) / np.maximum(ones,maxc)
  36 + rc = (maxc-r) / maxc_minus_minc
  37 + gc = (maxc-g) / maxc_minus_minc
  38 + bc = (maxc-b) / maxc_minus_minc
  39 +
  40 + maxc_is_r = np.equal(maxc,r)
  41 + maxc_is_g = np.equal(maxc,g)
  42 + maxc_is_b = np.equal(maxc,b)
  43 +
  44 + h = np.zeros((r.shape[0],r.shape[1]))
  45 + h = np.choose( maxc_is_b, (h,4.0+gc-rc) )
  46 + h = np.choose( maxc_is_g, (h,2.0+rc-bc) )
  47 + h = np.choose( maxc_is_r, (h,bc-gc) )
  48 +
  49 + h = np.mod(h/6.0,1.0)
  50 +
  51 + hsv = np.asarray([h,s,v])
  52 +
  53 + return hsv
  54 +
  55 +# =============================================================================
  56 +# hsv_to_rgb()
  57 +#
  58 +# hsv comes in as [h,s,v] with hue and saturation in the range [0,1],
  59 +# but value in the range [0,255].
  60 +
  61 +def hsv_to_rgb( hsv ):
  62 +
  63 + h = hsv[0]
  64 + s = hsv[1]
  65 + v = hsv[2]
  66 +
  67 + #if s == 0.0: return v, v, v
  68 + i = (h*6.0).astype(int)
  69 + f = (h*6.0) - i
  70 + p = v*(1.0 - s)
  71 + q = v*(1.0 - s*f)
  72 + t = v*(1.0 - s*(1.0-f))
  73 +
  74 + r = i.choose( v, q, p, p, t, v )
  75 + g = i.choose( t, v, v, q, p, p )
  76 + b = i.choose( p, p, t, v, v, q )
  77 +
  78 + rgb = np.asarray([r,g,b]).astype(np.uint8)
  79 +
  80 + return rgb
  81 +
  82 +# =============================================================================
  83 +# Usage()
  84 +
  85 +def Usage():
  86 + print("""Usage: hsv_merge.py [-q] [-of format] src_color src_greyscale dst_color
  87 +
  88 +where src_color is a RGB or RGBA dataset,
  89 + src_greyscale is a greyscale dataset (e.g. the result of gdaldem hillshade)
  90 + dst_color will be a RGB or RGBA dataset using the greyscale as the
  91 + intensity for the color dataset.
  92 +""")
  93 + sys.exit(1)
  94 +
  95 +# =============================================================================
  96 +# Mainline
  97 +# =============================================================================
  98 +def hsv_merge(src_color_filename,src_greyscale_filename,dst_color_filename):
  99 +
  100 + datatype = GDT_Byte
  101 + format = 'GTiff'
  102 +
  103 + hilldataset = gdal.Open( src_greyscale_filename, GA_ReadOnly )
  104 + colordataset = gdal.Open( src_color_filename, GA_ReadOnly )
  105 +
  106 + #check for 3 or 4 bands in the color file
  107 + if (colordataset.RasterCount != 3 and colordataset.RasterCount != 4):
  108 + print('Source image does not appear to have three or four bands as required.')
  109 + sys.exit(1)
  110 +
  111 + #define output format, name, size, type and set projection
  112 + out_driver = gdal.GetDriverByName(format)
  113 + outdataset = out_driver.Create(dst_color_filename, colordataset.RasterXSize, \
  114 + colordataset.RasterYSize, colordataset.RasterCount, datatype)
  115 + outdataset.SetProjection(hilldataset.GetProjection())
  116 + outdataset.SetGeoTransform(hilldataset.GetGeoTransform())
  117 +
  118 + #assign RGB and hillshade bands
  119 + rBand = colordataset.GetRasterBand(1)
  120 + gBand = colordataset.GetRasterBand(2)
  121 + bBand = colordataset.GetRasterBand(3)
  122 + if colordataset.RasterCount == 4:
  123 + aBand = colordataset.GetRasterBand(4)
  124 + else:
  125 + aBand = None
  126 +
  127 + hillband = hilldataset.GetRasterBand(1)
  128 + hillbandnodatavalue = hillband.GetNoDataValue()
  129 +
  130 + #check for same file size
  131 + if ((rBand.YSize != hillband.YSize) or (rBand.XSize != hillband.XSize)):
  132 + print('Color and hilshade must be the same size in pixels.')
  133 + sys.exit(1)
  134 +
  135 + #loop over lines to apply hillshade
  136 + for i in range(hillband.YSize):
  137 + #load RGB and Hillshade arrays
  138 + rScanline = rBand.ReadAsArray(0, i, hillband.XSize, 1, hillband.XSize, 1)
  139 + gScanline = gBand.ReadAsArray(0, i, hillband.XSize, 1, hillband.XSize, 1)
  140 + bScanline = bBand.ReadAsArray(0, i, hillband.XSize, 1, hillband.XSize, 1)
  141 + hillScanline = hillband.ReadAsArray(0, i, hillband.XSize, 1, hillband.XSize, 1)
  142 +
  143 + #convert to HSV
  144 + hsv = rgb_to_hsv( rScanline, gScanline, bScanline )
  145 +
  146 + # if there's nodata on the hillband, use the v value from the color
  147 + # dataset instead of the hillshade value.
  148 + if hillbandnodatavalue is not None:
  149 + equal_to_nodata = np.equal(hillScanline, hillbandnodatavalue)
  150 + v = np.choose(equal_to_nodata,(hillScanline,hsv[2]))
  151 + else:
  152 + v = hillScanline
  153 +
  154 + #replace v with hillshade
  155 + hsv_adjusted = np.asarray( [hsv[0], hsv[1], v] )
  156 +
  157 + #convert back to RGB
  158 + dst_color = hsv_to_rgb( hsv_adjusted )
  159 +
  160 + #write out new RGB bands to output one band at a time
  161 + outband = outdataset.GetRasterBand(1)
  162 + outband.WriteArray(dst_color[0], 0, i)
  163 + outband = outdataset.GetRasterBand(2)
  164 + outband.WriteArray(dst_color[1], 0, i)
  165 + outband = outdataset.GetRasterBand(3)
  166 + outband.WriteArray(dst_color[2], 0, i)
  167 + if aBand is not None:
  168 + aScanline = aBand.ReadAsArray(0, i, hillband.XSize, 1, hillband.XSize, 1)
  169 + outband = outdataset.GetRasterBand(4)
  170 + outband.WriteArray(aScanline, 0, i)
  171 +
  172 + #update progress line
  173 + #if not quiet:
  174 + # gdal.TermProgress_nocb( (float(i+1) / hillband.YSize) )
  175 +
  176 +
  177 +
  178 +
  179 +if __name__ == '__main__':
  180 +
  181 + gdaldem="C:\\OSGeo4W\\bin\\gdaldem"
  182 +
  183 + repert="D:\\DEM\\500m_SRTM (CGIAR_2008) Global et Maroc"
  184 + infile="srtm_500m_maroc.tif"
  185 +
  186 +
  187 + os.chdir(repert)
  188 +
  189 + inDs = gdal.Open(infile)
  190 + cols = inDs.RasterXSize
  191 + rows = inDs.RasterYSize
  192 + bands = inDs.RasterCount
  193 + driver = inDs.GetDriver()
  194 + geo=inDs.GetGeoTransform()
  195 + band=inDs.GetRasterBand(1)
  196 + maxi=band.GetMaximum()
  197 + mini=band.GetMinimum()
  198 + inDs=0
  199 + #mnt=band.ReadAsArray(xoffset,yoffset,width,height)
  200 +
  201 + # ----- Hillshade ------------
  202 + commande1=gdaldem+" hillshade "+infile+" shade.tif -z 5 -s 111120 -az 90"
  203 +
  204 + # ------- coloriage -----------
  205 + colors=["65535,255,255,255"]
  206 + val=str(maxi)+",254,254,254"
  207 + colors.append(val)
  208 + colors.append("2500, 121, 117 ,10")
  209 + colors.append("1200, 151, 106 ,47")
  210 + colors.append("800, 127, 166 ,122")
  211 + colors.append("400, 213, 213 ,149")
  212 + colors.append("1, 218, 179 ,122")
  213 + colors.append("0, 20, 120 ,200")
  214 + f = open('ramp.txt', 'w')
  215 + for i in range(0,8):
  216 + val=colors[i]+'\n'
  217 + f.write(val)
  218 + f.close()
  219 + commande2=gdaldem+" color-relief "+infile+" ramp.txt relief.tif"
  220 +
  221 + # -------- slope et aspect----------
  222 +
  223 + commande4=gdaldem+" slope "+infile+" slope.tif -p use percent"
  224 + commande5=gdaldem+" aspect "+infile+" aspect.tif"
  225 +
  226 + # -------- os calls...
  227 + print "Calcul du Hillshade : ",commande1
  228 + os.system(commande1)
  229 + print "Coloriage du Hillshade : ",commande2
  230 + os.system(commande2)
  231 + print "Melange des deux : hsvmerge"
  232 + hsv_merge("relief.tif","shade.tif","colour_shade.tif")
  233 + print "Pentes: ",commande4
  234 + os.system(commande4)
  235 + print "Aspects : ",commande5
  236 + os.system(commande5)
  237 + os.system("del ramp.txt")
... ...
DEM_winstral/dem_modcou.py 0 → 100644
... ... @@ -0,0 +1,94 @@
  1 +#! /usr/bin/env python
  2 +# -*- coding: iso-8859-1 -*-
  3 +
  4 +# Michel Le Page, 06/04/2013
  5 +#
  6 +# Create a unregular matrix from a DEM file for Modcou model
  7 +# Input: A DEM file with a pixel size wihch is multiple of 1000 meters (eg 500, 250, 125, 100...)
  8 +# Outputs: Two filse. One is an index file that can be used within a GIS app' to be vectorize. The second one if the average height of each new grid.
  9 +
  10 +from math import *
  11 +import numpy as np
  12 +#import scipy as sp
  13 +from osgeo import gdal
  14 +import csv
  15 +from osgeo.gdalconst import *
  16 +
  17 +
  18 +if __name__ == "__main__":
  19 +
  20 + # Fichiers
  21 + infile="D:\DEM\GMTED2010\Gmted_250m_maroc.tif"
  22 + outfile1="D:\DEM\GMTED2010\Gmted_250m_maroc_surfexind.tif"
  23 + outfile2="D:\DEM\GMTED2010\Gmted_250m_maroc_surfexval.tif"
  24 +
  25 + resol=250 #resolution en metres du DEM d'entree, attention, doit etre un multiple de 1000m (500, 250, 125, 100...)
  26 +
  27 + pasmax=8000/resol # pas en pixel pour 8km
  28 + pasmin=1000/resol # pas en pixel pour 1km
  29 + stdevmin=30 # min stdev pour regrouper des pixels
  30 + resols=(pasmax/8,pasmax/4,pasmax/2,pasmax) # résolutions intermediaires à 1, 2, 4 et 8 km, attention l'ordre du + petit au + grand est important
  31 +
  32 + inDs = gdal.Open(infile)
  33 + cols = inDs.RasterXSize
  34 + rows = inDs.RasterYSize
  35 + bands = inDs.RasterCount
  36 + driver = inDs.GetDriver()
  37 +
  38 + print "Cols:", cols, "Ligs:", rows, "Bands:", bands,driver
  39 +
  40 +
  41 + band=inDs.GetRasterBand(1)
  42 +
  43 + mnt=band.ReadAsArray()
  44 +
  45 + matout=np.zeros([rows,cols], np.uint32)
  46 + mntout=np.zeros([rows/pasmin,cols/pasmin], np.float32)
  47 +
  48 + val=1L
  49 +
  50 + for i in range(0,rows,pasmax):
  51 + if i%256==0: print i
  52 + i1=i/pasmin
  53 + for j in range(0,cols,pasmax):
  54 + j1=j/pasmin
  55 + # pour les 4 résolutions intermédiaires, on teste de la plus petite à la plus grande resol
  56 + for k in resols:
  57 + k1=k/pasmin
  58 + for ii in range(0,pasmax,k):
  59 + ii1=ii/pasmin
  60 + for jj in range(0,pasmax, k):
  61 + stdev=np.std(mnt[i+ii:i+ii+k,j+jj:j+jj+k])
  62 + if stdev<stdevmin or (k==pasmin and stdev>=stdevmin):
  63 + #print "ok:", (i*pasmax)+ii,(i*pasmax)+ii+k,(j*pasmax)+jj,(j*pasmax)+jj+k, val
  64 + matout[i+ii:i+ii+k,j+jj:j+jj+k]=val
  65 + mean=np.mean(mnt[i+ii:i+ii+k,j+jj:j+jj+k])
  66 + mntout[i1+ii1:i1+ii1+k1,j1+jj/pasmin:j1+jj/pasmin+k1]=mean
  67 + val=val+1
  68 + #else:
  69 + # print i,j,stdev, mnt[i+ii:i+ii+k,j+jj:j+jj+k]
  70 +
  71 +
  72 + outDs=driver.Create(outfile1,cols,rows,bands,GDT_UInt32)
  73 + outDs.SetGeoTransform(inDs.GetGeoTransform())
  74 + outDs.SetProjection(inDs.GetProjection())
  75 + bando=outDs.GetRasterBand(1)
  76 + bando.WriteArray(matout)
  77 + outDs=None
  78 +
  79 + outDs=driver.Create(outfile2,cols/pasmin,rows/pasmin,bands,GDT_Float32)
  80 + geo=inDs.GetGeoTransform()
  81 + # changement de la résolution de sortie à 1km
  82 + lgeo=list(geo)
  83 + lgeo[1]*=pasmin
  84 + lgeo[5]*=pasmin
  85 + tgeo=tuple(lgeo)
  86 + outDs.SetGeoTransform(tgeo)
  87 + outDs.SetProjection(inDs.GetProjection())
  88 + bando=outDs.GetRasterBand(1)
  89 + bando.WriteArray(mntout)
  90 + outDs=None
  91 +
  92 + inDs=None
  93 +
  94 +
... ...
DEM_winstral/dem_shp.py 0 → 100644
... ... @@ -0,0 +1,94 @@
  1 +#! /usr/bin/env python
  2 +# -*- coding: iso-8859-1 -*-
  3 +
  4 +# Michel Le Page, 08/04/2013
  5 +#
  6 +# This code calculate some simple stats from an image file (in this case a DEM) related to a shapefile
  7 +# input: a rasterfile (repert and infile) and a shapefile (shapefile) with its ID column (attribut)
  8 +# output: a text file with, id,number,average,stdev,min,max
  9 +#
  10 +
  11 +
  12 +import os
  13 +from math import *
  14 +import numpy as np
  15 +from osgeo import gdal
  16 +import csv
  17 +from osgeo.gdalconst import *
  18 +from osgeo import gdal, gdal_array
  19 +import sys
  20 +
  21 +if __name__ == '__main__':
  22 +
  23 + gdaldem="C:\\OSGeo4W\\bin\\gdaldem"
  24 + gdal_rasterize="C:\\OSGeo4W\\bin\\gdal_rasterize"
  25 +
  26 + repert="D:\\DEM\\500m_SRTM (CGIAR_2008) Global et Maroc"
  27 + infile="srtm_500m_maroc.tif"
  28 +
  29 + shapefile="d:\\shp\\communes_maroc_geo.shp"
  30 + attribut="COMMUNE_ID"
  31 + layer="communes_maroc_geo"
  32 +
  33 + os.chdir(repert)
  34 +
  35 + inDs = gdal.Open(infile)
  36 + cols = inDs.RasterXSize
  37 + rows = inDs.RasterYSize
  38 + bands = inDs.RasterCount
  39 + driver = inDs.GetDriver()
  40 + geo=inDs.GetGeoTransform()
  41 + print geo
  42 + proj=inDs.GetProjection()
  43 + print proj
  44 + band=inDs.GetRasterBand(1)
  45 + maxi=band.GetMaximum()
  46 + mini=band.GetMinimum()
  47 + inDs=0
  48 +
  49 +
  50 + # sauvergarder la projection
  51 + #f = open('proj.txt', 'w')
  52 + #f.write(proj)
  53 + #f.close()
  54 + # rasteriser le fichier shape
  55 + commande=gdal_rasterize+" -a "+attribut+" -ts "+str(cols)+" "+str(rows)
  56 + commande+=" -l "+layer+" "+shapefile+" tmp.tif -ot Int16"
  57 + #commande+=" -a_srs proj.txt "
  58 + commande+=" -te "+str(geo[0])+" "+str(geo[3]+geo[5]*rows)+" "+str(geo[0]+geo[1]*cols)+" "+str(geo[3])
  59 +
  60 + print commande
  61 +
  62 + #os.system(commande)
  63 +
  64 + inDs = gdal.Open(infile)
  65 + band=inDs.GetRasterBand(1)
  66 + mnt=band.ReadAsArray()
  67 +
  68 + inDs2 = gdal.Open("tmp.tif")
  69 + driver2 = inDs2.GetDriver()
  70 + band2=inDs2.GetRasterBand(1)
  71 + shp=band2.ReadAsArray()
  72 + maxishp=shp.max()
  73 + minishp=shp.min()
  74 + print minishp,maxishp
  75 +
  76 + f = open('stats.txt', 'w')
  77 + out= "i,n,moy,std,min,max\n"
  78 + f.write(out)
  79 +
  80 + aa=np.unique(shp)
  81 +
  82 + for i in aa:
  83 + a=np.where(shp==i)
  84 + if mnt[a].size>0:
  85 + moy=mnt[a].mean()
  86 + std=mnt[a].std()
  87 + min=mnt[a].min()
  88 + max=mnt[a].max()
  89 + out= str(i)+","+str(mnt[a].size)+","+str(moy)+","+str(std)+","+str(min)+","+str(max)+"\n"
  90 + f.write(out)
  91 + if (i%100)==0:print(i)
  92 +
  93 + f.close()
  94 +
... ...
DEM_winstral/dem_winstral.py 0 → 100644
... ... @@ -0,0 +1,119 @@
  1 +#! /usr/bin/env python
  2 +# -*- coding: iso-8859-1 -*-
  3 +
  4 +# Michel Le Page, 20/04/2013
  5 +# Winstral, Spatial Snow Modeling of Wind-Redistributed Snow Using Terrain-Based Parameters
  6 +# Journal of Hydrometeorology, 2002
  7 +# seules les eq 1 et 2 sont calculées.
  8 +# Input : un DEM
  9 +# Output: average of n maximum upwind slopes relative to seasonally averaged winds (TIF Float16)
  10 +#
  11 +# Python 3.3
  12 +
  13 +
  14 +from math import *
  15 +import numpy as np
  16 +from osgeo import gdal
  17 +from osgeo.gdalconst import *
  18 +import sys
  19 +
  20 +
  21 +if __name__ == "__main__":
  22 +
  23 + # ======= DEBUT CONFIG ==============
  24 + # Fichiers
  25 + infile="testDEM.tif"
  26 + outfile1="testDEM_winstral.tif"
  27 +
  28 + resol=30. #resolution en metres du DEM d'entree
  29 +
  30 + azimuth_vent=90. # azimuth du vent dominant en degrés
  31 + az1=azimuth_vent-15. #azimuth dominant - un certain angle (-15° par défaut)
  32 + az2=azimuth_vent+15. #azimuth dominant + un certain angle (+15° par défaut)
  33 + inc=5. # incrément de calcul des droites de Vent (5° par défaut)
  34 + dmax=500 # distance dmax
  35 +
  36 + # ======= FIN CONFIG ==============
  37 +
  38 + nbvect=int(((az2-az1)/inc)+1) # Nombre de vecteurs= nombre de directions de calcul (fig3, p528)
  39 + longvect=int(dmax/resol) # Longueur des vecteurs en fonction du param dmax.
  40 +
  41 + # lecture du fichier d'entree
  42 + inDs = gdal.Open(infile)
  43 + cols = inDs.RasterXSize
  44 + rows = inDs.RasterYSize
  45 + bands = inDs.RasterCount
  46 + driver = inDs.GetDriver()
  47 + print("Cols:", cols, "Ligs:", rows, "Bands:", bands,driver)
  48 + band=inDs.GetRasterBand(1)
  49 + mnt=band.ReadAsArray()
  50 + mnt=np.float32(mnt)
  51 +
  52 + # on passe tout en radians
  53 + azimuth_vent=azimuth_vent/180*pi
  54 + az1=az1/180.*pi
  55 + az2=az2/180.*pi
  56 + inc=inc/180.*pi
  57 +
  58 + # vect[][0]: les x, vect[][1]=mles y, vect[][2]=les dists
  59 + vects=np.zeros((nbvect,3,longvect),np.float32)
  60 +
  61 + # Calcul des coordonnées pixel des droites.
  62 +
  63 + for n in range(0,nbvect):
  64 + az=az1+(n*inc)
  65 + print("Azimuth=",az/pi*180)
  66 + x=dmax*cos(az)
  67 + y=dmax*sin(az)
  68 + pixx=x/dmax
  69 + pixy=y/dmax
  70 + print(x,y,pixx,pixy)
  71 +
  72 + for xx in range(1,longvect+1):
  73 + vects[n][0][xx-1]=round(xx*pixx)
  74 + vects[n][1][xx-1]=round(xx*pixy)
  75 + vects[n][2][xx-1]=sqrt(pow(float(vects[n][0][xx-1])*resol,2)+pow(float(vects[n][1][xx-1])*resol,2))
  76 + print(vects[n][0][xx-1],vects[n][1][xx-1],vects[n][2][xx-1])
  77 +
  78 + maxx=max(0,int(np.max(vects[:,0,:]))+1)
  79 + maxy=max(0,int(np.max(vects[:,1,:]))+1)
  80 + minx=max(0,(int(np.min(vects[:,0,:]))-1)*-1)
  81 + miny=max(0,(int(np.min(vects[:,1,:]))-1)*-1)
  82 + print(minx,miny,maxx,maxy)
  83 +
  84 + # matrice de sortie
  85 + mntout=np.zeros((rows,cols),np.float32)
  86 +
  87 + # stockage temporaire des pentes
  88 + sx=np.zeros(nbvect)
  89 +
  90 + #calculs pour chaque pixel
  91 + hash10=range(0,rows,int(rows/10))
  92 + hash100=range(0,rows,int(rows/100))
  93 + maxyy=rows-maxy-1
  94 + maxxx=cols-maxx-1
  95 + for j in range(miny,maxyy,1):
  96 + if j in hash10: print(hash10.index(j)*10,'%',end="")
  97 + if j in hash100: print('.',end="")
  98 + sys.stdout.flush()
  99 + sx=sx*0.
  100 + for i in range(minx,maxxx,1):
  101 + z=mnt[j,i]
  102 + # calcule les sx pour les 7 (nbvect) droites.
  103 + for n in range(0,nbvect):
  104 + alt=mnt[np.int32(vects[n][1]+j),np.int32(vects[n][0]+i)] # numérateur de eq1 p528
  105 + sx[n]=np.max(np.tan((alt-z)/vects[n][2])) # eq 1 p528
  106 + mntout[j,i]=np.average(sx) # eq 2 p 529 (ou comment écrire quelque chose de simple de manière compliquée!)
  107 +
  108 + mntout=np.arctan(mntout)/pi*180
  109 + #ecriture de mnt out
  110 + outDs=driver.Create(outfile1,cols,rows,bands,GDT_Float32)
  111 + outDs.SetGeoTransform(inDs.GetGeoTransform())
  112 + outDs.SetProjection(inDs.GetProjection())
  113 + bando=outDs.GetRasterBand(1)
  114 + bando.WriteArray(mntout)
  115 + outDs=None
  116 +
  117 + # done! print "done!"
  118 +
  119 +
... ...
DEM_winstral/hsv_merge.py 0 → 100644
... ... @@ -0,0 +1,233 @@
  1 +#!/usr/bin/env python
  2 +#******************************************************************************
  3 +# $Id$
  4 +#
  5 +# Project: GDAL Python Interface
  6 +# Purpose: Script to merge greyscale as intensity into an RGB(A) image, for
  7 +# instance to apply hillshading to a dem colour relief.
  8 +# Author: Frank Warmerdam, warmerdam@pobox.com
  9 +# Trent Hare (USGS)
  10 +#
  11 +#******************************************************************************
  12 +# Copyright (c) 2009, Frank Warmerdam
  13 +#
  14 +# Permission is hereby granted, free of charge, to any person obtaining a
  15 +# copy of this software and associated documentation files (the "Software"),
  16 +# to deal in the Software without restriction, including without limitation
  17 +# the rights to use, copy, modify, merge, publish, distribute, sublicense,
  18 +# and/or sell copies of the Software, and to permit persons to whom the
  19 +# Software is furnished to do so, subject to the following conditions:
  20 +#
  21 +# The above copyright notice and this permission notice shall be included
  22 +# in all copies or substantial portions of the Software.
  23 +#
  24 +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  25 +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  26 +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  27 +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  28 +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  29 +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  30 +# DEALINGS IN THE SOFTWARE.
  31 +#******************************************************************************
  32 +
  33 +from osgeo import gdal, gdal_array
  34 +from osgeo.gdalconst import *
  35 +import numpy
  36 +import sys
  37 +
  38 +# =============================================================================
  39 +# rgb_to_hsv()
  40 +#
  41 +# rgb comes in as [r,g,b] with values in the range [0,255]. The returned
  42 +# hsv values will be with hue and saturation in the range [0,1] and value
  43 +# in the range [0,255]
  44 +#
  45 +def rgb_to_hsv( r,g,b ):
  46 +
  47 + maxc = numpy.maximum(r,numpy.maximum(g,b))
  48 + minc = numpy.minimum(r,numpy.minimum(g,b))
  49 +
  50 + v = maxc
  51 +
  52 + minc_eq_maxc = numpy.equal(minc,maxc)
  53 +
  54 + # compute the difference, but reset zeros to ones to avoid divide by zeros later.
  55 + ones = numpy.ones((r.shape[0],r.shape[1]))
  56 + maxc_minus_minc = numpy.choose( minc_eq_maxc, (maxc-minc,ones) )
  57 +
  58 + s = (maxc-minc) / numpy.maximum(ones,maxc)
  59 + rc = (maxc-r) / maxc_minus_minc
  60 + gc = (maxc-g) / maxc_minus_minc
  61 + bc = (maxc-b) / maxc_minus_minc
  62 +
  63 + maxc_is_r = numpy.equal(maxc,r)
  64 + maxc_is_g = numpy.equal(maxc,g)
  65 + maxc_is_b = numpy.equal(maxc,b)
  66 +
  67 + h = numpy.zeros((r.shape[0],r.shape[1]))
  68 + h = numpy.choose( maxc_is_b, (h,4.0+gc-rc) )
  69 + h = numpy.choose( maxc_is_g, (h,2.0+rc-bc) )
  70 + h = numpy.choose( maxc_is_r, (h,bc-gc) )
  71 +
  72 + h = numpy.mod(h/6.0,1.0)
  73 +
  74 + hsv = numpy.asarray([h,s,v])
  75 +
  76 + return hsv
  77 +
  78 +# =============================================================================
  79 +# hsv_to_rgb()
  80 +#
  81 +# hsv comes in as [h,s,v] with hue and saturation in the range [0,1],
  82 +# but value in the range [0,255].
  83 +
  84 +def hsv_to_rgb( hsv ):
  85 +
  86 + h = hsv[0]
  87 + s = hsv[1]
  88 + v = hsv[2]
  89 +
  90 + #if s == 0.0: return v, v, v
  91 + i = (h*6.0).astype(int)
  92 + f = (h*6.0) - i
  93 + p = v*(1.0 - s)
  94 + q = v*(1.0 - s*f)
  95 + t = v*(1.0 - s*(1.0-f))
  96 +
  97 + r = i.choose( v, q, p, p, t, v )
  98 + g = i.choose( t, v, v, q, p, p )
  99 + b = i.choose( p, p, t, v, v, q )
  100 +
  101 + rgb = numpy.asarray([r,g,b]).astype(numpy.uint8)
  102 +
  103 + return rgb
  104 +
  105 +# =============================================================================
  106 +# Usage()
  107 +
  108 +def Usage():
  109 + print("""Usage: hsv_merge.py [-q] [-of format] src_color src_greyscale dst_color
  110 +
  111 +where src_color is a RGB or RGBA dataset,
  112 + src_greyscale is a greyscale dataset (e.g. the result of gdaldem hillshade)
  113 + dst_color will be a RGB or RGBA dataset using the greyscale as the
  114 + intensity for the color dataset.
  115 +""")
  116 + sys.exit(1)
  117 +
  118 +# =============================================================================
  119 +# Mainline
  120 +# =============================================================================
  121 +
  122 +argv = gdal.GeneralCmdLineProcessor( sys.argv )
  123 +if argv is None:
  124 + sys.exit( 0 )
  125 +
  126 +format = 'GTiff'
  127 +src_color_filename = None
  128 +src_greyscale_filename = None
  129 +dst_color_filename = None
  130 +quiet = False
  131 +
  132 +# Parse command line arguments.
  133 +i = 1
  134 +while i < len(argv):
  135 + arg = argv[i]
  136 +
  137 + if arg == '-of':
  138 + i = i + 1
  139 + format = argv[i]
  140 +
  141 + elif arg == '-q' or arg == '-quiet':
  142 + quiet = True
  143 +
  144 + elif src_color_filename is None:
  145 + src_color_filename = argv[i]
  146 +
  147 + elif src_greyscale_filename is None:
  148 + src_greyscale_filename = argv[i]
  149 +
  150 + elif dst_color_filename is None:
  151 + dst_color_filename = argv[i]
  152 + else:
  153 + Usage()
  154 +
  155 + i = i + 1
  156 +
  157 +if dst_color_filename is None:
  158 + Usage()
  159 +
  160 +datatype = GDT_Byte
  161 +
  162 +hilldataset = gdal.Open( src_greyscale_filename, GA_ReadOnly )
  163 +colordataset = gdal.Open( src_color_filename, GA_ReadOnly )
  164 +
  165 +#check for 3 or 4 bands in the color file
  166 +if (colordataset.RasterCount != 3 and colordataset.RasterCount != 4):
  167 + print('Source image does not appear to have three or four bands as required.')
  168 + sys.exit(1)
  169 +
  170 +#define output format, name, size, type and set projection
  171 +out_driver = gdal.GetDriverByName(format)
  172 +outdataset = out_driver.Create(dst_color_filename, colordataset.RasterXSize, \
  173 + colordataset.RasterYSize, colordataset.RasterCount, datatype)
  174 +outdataset.SetProjection(hilldataset.GetProjection())
  175 +outdataset.SetGeoTransform(hilldataset.GetGeoTransform())
  176 +
  177 +#assign RGB and hillshade bands
  178 +rBand = colordataset.GetRasterBand(1)
  179 +gBand = colordataset.GetRasterBand(2)
  180 +bBand = colordataset.GetRasterBand(3)
  181 +if colordataset.RasterCount == 4:
  182 + aBand = colordataset.GetRasterBand(4)
  183 +else:
  184 + aBand = None
  185 +
  186 +hillband = hilldataset.GetRasterBand(1)
  187 +hillbandnodatavalue = hillband.GetNoDataValue()
  188 +
  189 +#check for same file size
  190 +if ((rBand.YSize != hillband.YSize) or (rBand.XSize != hillband.XSize)):
  191 + print('Color and hilshade must be the same size in pixels.')
  192 + sys.exit(1)
  193 +
  194 +#loop over lines to apply hillshade
  195 +for i in range(hillband.YSize):
  196 + #load RGB and Hillshade arrays
  197 + rScanline = rBand.ReadAsArray(0, i, hillband.XSize, 1, hillband.XSize, 1)
  198 + gScanline = gBand.ReadAsArray(0, i, hillband.XSize, 1, hillband.XSize, 1)
  199 + bScanline = bBand.ReadAsArray(0, i, hillband.XSize, 1, hillband.XSize, 1)
  200 + hillScanline = hillband.ReadAsArray(0, i, hillband.XSize, 1, hillband.XSize, 1)
  201 +
  202 + #convert to HSV
  203 + hsv = rgb_to_hsv( rScanline, gScanline, bScanline )
  204 +
  205 + # if there's nodata on the hillband, use the v value from the color
  206 + # dataset instead of the hillshade value.
  207 + if hillbandnodatavalue is not None:
  208 + equal_to_nodata = numpy.equal(hillScanline, hillbandnodatavalue)
  209 + v = numpy.choose(equal_to_nodata,(hillScanline,hsv[2]))
  210 + else:
  211 + v = hillScanline
  212 +
  213 + #replace v with hillshade
  214 + hsv_adjusted = numpy.asarray( [hsv[0], hsv[1], v] )
  215 +
  216 + #convert back to RGB
  217 + dst_color = hsv_to_rgb( hsv_adjusted )
  218 +
  219 + #write out new RGB bands to output one band at a time
  220 + outband = outdataset.GetRasterBand(1)
  221 + outband.WriteArray(dst_color[0], 0, i)
  222 + outband = outdataset.GetRasterBand(2)
  223 + outband.WriteArray(dst_color[1], 0, i)
  224 + outband = outdataset.GetRasterBand(3)
  225 + outband.WriteArray(dst_color[2], 0, i)
  226 + if aBand is not None:
  227 + aScanline = aBand.ReadAsArray(0, i, hillband.XSize, 1, hillband.XSize, 1)
  228 + outband = outdataset.GetRasterBand(4)
  229 + outband.WriteArray(aScanline, 0, i)
  230 +
  231 + #update progress line
  232 + if not quiet:
  233 + gdal.TermProgress_nocb( (float(i+1) / hillband.YSize) )
... ...
DEM_winstral/hsv_merge.pyc 0 → 100644
No preview for this file type
DEM_winstral/readme.txt 0 → 100644
... ... @@ -0,0 +1,12 @@
  1 +Michel Le Page, 06/04/2013
  2 +==========================
  3 +
  4 +dem_convert_extract.py: lecture d'un DEM, extraction d'une fenetre et ecriture en TIF UInt16
  5 +dem_surfex.py: analyse du pixel à 4 echelle pour créer grille surfex
  6 +
  7 +biblios necessaires: GDAL et NUMPY: http://www.lfd.uci.edu/~gohlke/pythonlibs
  8 +
  9 +GMTED_2010 (250, 500, 1000m):http://topotools.cr.usgs.gov/GMTED_viewer/gmted2010_global_grids.php
  10 +CGIAR :Resampled SRTM data to 250m resolutions for the entire globe are available https://hc.box.net/shared/1yidaheouv (Password: ThanksCSI!)
  11 +SRTM 90m : http://srtm.csi.cgiar.org/SELECTION/inputCoord.asp
  12 +
... ...
DEM_winstral/srtm_winstral.tif.aux.xml 0 → 100644
... ... @@ -0,0 +1,42 @@
  1 +<PAMDataset>
  2 + <Metadata domain="IMAGE_STRUCTURE">
  3 + <MDI key="INTERLEAVE">BAND</MDI>
  4 + </Metadata>
  5 + <Metadata>
  6 + <MDI key="Band_1">Band 1</MDI>
  7 + </Metadata>
  8 + <Metadata domain="ENVI">
  9 + <MDI key="band_names">{Band 1}</MDI>
  10 + <MDI key="bands">1</MDI>
  11 + <MDI key="byte_order">0</MDI>
  12 + <MDI key="coordinate_system_string">{PROJCS["Lambert_Conformal_Conic",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["standard_parallel_1",31.727867],PARAMETER["standard_parallel_2",34.871728],PARAMETER["latitude_of_origin",33.3],PARAMETER["central_meridian",-5.4],PARAMETER["false_easting",500000],PARAMETER["false_northing",300000],UNIT["Meter",1]]}</MDI>
  13 + <MDI key="data_type">4</MDI>
  14 + <MDI key="description">{srtm_winstral.tif}</MDI>
  15 + <MDI key="file_type">ENVI Standard</MDI>
  16 + <MDI key="header_offset">0</MDI>
  17 + <MDI key="interleave">bsq</MDI>
  18 + <MDI key="lines">151</MDI>
  19 + <MDI key="map_info">{Lambert Conformal Conic, 1, 1, 268907.0764, 63520.2365, 29.306765115, 29.306765115,WGS-84}</MDI>
  20 + <MDI key="projection_info">{4, 6378137, 6356752.314245179, 33.3, -5.4, 500000, 300000, 31.727867, 34.871728,WGS-84, Lambert Conformal Conic}</MDI>
  21 + <MDI key="samples">201</MDI>
  22 + </Metadata>
  23 + <PAMRasterBand band="1">
  24 + <Description>Band 1</Description>
  25 + <Histograms>
  26 + <HistItem>
  27 + <HistMin>-1.126562314808369</HistMin>
  28 + <HistMax>242.2741361435056</HistMax>
  29 + <BucketCount>1000</BucketCount>
  30 + <IncludeOutOfRange>0</IncludeOutOfRange>
  31 + <Approximate>0</Approximate>
  32 + <HistCounts>11|412|1924|4002|10087|4599|3956|2949|1317|506|203|112|68|22|15|18|21|10|3|8|2|4|5|2|6|5|1|0|4|6|2|0|0|2|6|2|5|0|0|0|0|0|1|3|0|1|0|4|0|0|0|3|0|0|2|0|0|0|1|0|0|0|4|1|1|0|0|0|0|0|7|0|1|0|0|0|1|0|0|0|0|1|0|0|0|0|0|0|2|1|0|0|0|0|0|0|0|0|0|0|1|0|0|0|0|0|1|0|0|0|1|0|1|0|0|1|2|0|0|0|0|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|0|5|0|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|3</HistCounts>
  33 + </HistItem>
  34 + </Histograms>
  35 + <Metadata>
  36 + <MDI key="STATISTICS_MAXIMUM">242.15255737305</MDI>
  37 + <MDI key="STATISTICS_MEAN">0.23914763534896</MDI>
  38 + <MDI key="STATISTICS_MINIMUM">-1.0049835443497</MDI>
  39 + <MDI key="STATISTICS_STDDEV">2.8294153986165</MDI>
  40 + </Metadata>
  41 + </PAMRasterBand>
  42 +</PAMDataset>
... ...
DEM_winstral/testDEM.hdr 0 → 100644
... ... @@ -0,0 +1,20 @@
  1 +ENVI
  2 +description = {
  3 + File Resize Result, x resize factor: 1.000000, y resize factor: 1.000000.
  4 + [Fri Sep 20 19:26:42 2013]}
  5 +samples = 201
  6 +lines = 151
  7 +bands = 1