-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat(rasters.py): Add raster intersection and resampling features to …
…flopy.utils (#634) * Feat(rasters.py): Added raster intersection capability and an example notebook (Notebooks/flopy3_raster_intersection.ipynb) * Update requirements for travis to include SciPy for raster unit tests * Removed Scipy from python27 requirements * Update flopy3_raster_intersection.ipynb for running on travis * Update flopy3_raster_intersection.ipynb for travis * revert flopy3_lake_example.ipynb * update(rasters.py): codacy updates * update(rasters.py): codacy fixes * update(rasters.py): _point_in_polygon changed to static method
- Loading branch information
1 parent
ac38a1e
commit 0f8007c
Showing
18 changed files
with
1,888 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<PAMDataset> | ||
<Metadata> | ||
<MDI key="DataType">Generic</MDI> | ||
</Metadata> | ||
<Metadata domain="Esri"> | ||
<MDI key="PyramidResamplingType">NEAREST</MDI> | ||
</Metadata> | ||
<PAMRasterBand band="1"> | ||
<Description>Layer_1</Description> | ||
<Histograms> | ||
<HistItem> | ||
<HistMin>1920.546752929688</HistMin> | ||
<HistMax>2663.162109375</HistMax> | ||
<BucketCount>256</BucketCount> | ||
<IncludeOutOfRange>1</IncludeOutOfRange> | ||
<Approximate>0</Approximate> | ||
<HistCounts>134|325|397|465|560|738|795|788|834|858|950|819|791|953|973|883|933|1206|1766|1540|1483|1461|1789|1987|1950|1847|2074|2260|2240|2130|2414|2741|3205|2829|3080|3565|3518|3373|3543|4214|4294|3621|3424|3940|4128|3819|4117|4430|3958|3729|3208|3599|3915|3870|3599|3621|3763|3992|3597|3658|4233|4680|4572|4695|5549|5802|6150|29362|10180|9782|7344|6358|6630|6571|6265|5675|6457|7049|6732|6270|5502|5644|5135|4659|4283|4429|4117|3369|3205|3382|3696|3228|2760|2672|2858|2734|2611|2676|2778|2566|2301|2249|2428|2368|2216|2126|2258|2281|2088|2102|2202|2154|2052|1973|2002|2079|2012|1813|1885|1921|2004|1885|1896|1872|1964|1817|1695|1727|1715|1753|1756|1775|1730|1644|1645|1687|1798|1881|1773|1785|1747|1819|1751|1888|2018|1795|1522|1329|1196|1012|942|909|965|980|929|837|800|799|829|695|730|735|698|662|653|641|607|590|568|587|591|570|559|595|579|559|539|543|559|548|552|614|611|568|555|535|599|630|567|582|564|547|556|579|565|587|536|529|511|510|472|476|521|527|526|521|586|629|632|611|652|774|601|500|472|497|539|545|470|376|394|394|394|389|455|493|379|295|288|297|290|344|317|314|286|235|239|279|260|206|174|205|188|173|84|86|97|66|53|40|37|28|23|21|28|1</HistCounts> | ||
</HistItem> | ||
</Histograms> | ||
<Metadata domain="IMAGE_STRUCTURE"> | ||
<MDI key="COMPRESSION">RLE</MDI> | ||
</Metadata> | ||
<Metadata> | ||
<MDI key="LAYER_TYPE">athematic</MDI> | ||
<MDI key="RepresentationType">ATHEMATIC</MDI> | ||
<MDI key="STATISTICS_COVARIANCES">18624.56042831697</MDI> | ||
<MDI key="STATISTICS_EXCLUDEDVALUES"></MDI> | ||
<MDI key="STATISTICS_MAXIMUM">2663.162109375</MDI> | ||
<MDI key="STATISTICS_MEAN">2169.7721716653</MDI> | ||
<MDI key="STATISTICS_MEDIAN">0</MDI> | ||
<MDI key="STATISTICS_MINIMUM">1920.5467529297</MDI> | ||
<MDI key="STATISTICS_MODE">0</MDI> | ||
<MDI key="STATISTICS_SKIPFACTORX">1</MDI> | ||
<MDI key="STATISTICS_SKIPFACTORY">1</MDI> | ||
<MDI key="STATISTICS_STDDEV">136.47183016402</MDI> | ||
</Metadata> | ||
</PAMRasterBand> | ||
</PAMDataset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<metadata xml:lang="en"><Esri><CreaDate>20181204</CreaDate><CreaTime>08092900</CreaTime><ArcGISFormat>1.0</ArcGISFormat><SyncOnce>FALSE</SyncOnce><DataProperties><itemProps><itemName Sync="TRUE">dem.img</itemName><itemLocation><linkage Sync="TRUE">file://C:\Users\jlarsen\Desktop\GSFLOW_class\trunk\exercises\saghen_prms\examples\sagehen\hru_params\dem_rasters\dem.img</linkage><protocol Sync="TRUE">Local Area Network</protocol></itemLocation><imsContentType Sync="TRUE">002</imsContentType><nativeExtBox><westBL Sync="TRUE">214270.000000</westBL><eastBL Sync="TRUE">221720.000000</eastBL><southBL Sync="TRUE">4366610.000000</southBL><northBL Sync="TRUE">4373510.000000</northBL><exTypeCode Sync="TRUE">1</exTypeCode></nativeExtBox></itemProps><coordRef><type Sync="TRUE">Projected</type><geogcsn Sync="TRUE">GCS_North_American_1983</geogcsn><csUnits Sync="TRUE">Linear Unit: Meter (1.000000)</csUnits><projcsn Sync="TRUE">NAD_1983_UTM_Zone_11N</projcsn><peXml Sync="TRUE"><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.5'><WKT>PROJCS[&quot;NAD_1983_UTM_Zone_11N&quot;,GEOGCS[&quot;GCS_North_American_1983&quot;,DATUM[&quot;D_North_American_1983&quot;,SPHEROID[&quot;GRS_1980&quot;,6378137.0,298.257222101]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433]],PROJECTION[&quot;Transverse_Mercator&quot;],PARAMETER[&quot;False_Easting&quot;,500000.0],PARAMETER[&quot;False_Northing&quot;,0.0],PARAMETER[&quot;Central_Meridian&quot;,-117.0],PARAMETER[&quot;Scale_Factor&quot;,0.9996],PARAMETER[&quot;Latitude_Of_Origin&quot;,0.0],UNIT[&quot;Meter&quot;,1.0],AUTHORITY[&quot;EPSG&quot;,26911]]</WKT><XOrigin>-5120900</XOrigin><YOrigin>-9998100</YOrigin><XYScale>450445547.3910538</XYScale><ZOrigin>-100000</ZOrigin><ZScale>10000</ZScale><MOrigin>-100000</MOrigin><MScale>10000</MScale><XYTolerance>0.001</XYTolerance><ZTolerance>0.001</ZTolerance><MTolerance>0.001</MTolerance><HighPrecision>true</HighPrecision><WKID>26911</WKID><LatestWKID>26911</LatestWKID></ProjectedCoordinateSystem></peXml></coordRef><RasterProperties><General><PixelDepth Sync="TRUE">32</PixelDepth><HasColormap Sync="TRUE">FALSE</HasColormap><CompressionType Sync="TRUE">RLE</CompressionType><NumBands Sync="TRUE">1</NumBands><Format Sync="TRUE">IMAGINE Image</Format><HasPyramids Sync="TRUE">TRUE</HasPyramids><SourceType Sync="TRUE">continuous</SourceType><PixelType Sync="TRUE">floating point</PixelType><NoDataValue Sync="TRUE">-3.4028235e+038</NoDataValue></General></RasterProperties><lineage><Process ToolSource="c:\arcgis\desktop10.5\ArcToolbox\Toolboxes\Data Management Tools.tbx\Clip" Date="20181204" Time="080929">Clip ..\examples\sagehen\dem\imgn40w121_13_filled.img "214063.834030762 4366573.51459876 221714.946388238 4373594.09248124" ..\examples\sagehen\hru_params\dem_rasters\dem_clip.img # # NONE NO_MAINTAIN_EXTENT</Process><Process ToolSource="c:\arcgis\desktop10.5\ArcToolbox\Toolboxes\Data Management Tools.tbx\ProjectRaster" Date="20181204" Time="080933">ProjectRaster ..\examples\sagehen\hru_params\dem_rasters\dem_clip.img ..\examples\sagehen\hru_params\dem_rasters\dem.img PROJCS['NAD_1983_UTM_Zone_11N',GEOGCS['GCS_North_American_1983',DATUM['D_North_American_1983',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-117.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]] BILINEAR "10 10" # "214110 4366620" PROJCS['NAD_1983_UTM_Zone_11N',GEOGCS['GCS_North_American_1983',DATUM['D_North_American_1983',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-117.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]</Process></lineage></DataProperties><SyncDate>20181204</SyncDate><SyncTime>08093300</SyncTime><ModDate>20181204</ModDate><ModTime>08093300</ModTime></Esri><dataIdInfo><envirDesc Sync="TRUE"> Version 6.2 (Build 9200) ; Esri ArcGIS 10.5.1.7333</envirDesc><dataLang><languageCode value="eng" Sync="TRUE"></languageCode><countryCode value="USA" Sync="TRUE"></countryCode></dataLang><idCitation><resTitle Sync="TRUE">dem.img</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">-120.321168</westBL><eastBL Sync="TRUE">-120.231832</eastBL><northBL Sync="TRUE">39.466206</northBL><southBL Sync="TRUE">39.401697</southBL></GeoBndBox></geoEle></dataExt></dataIdInfo><mdLang><languageCode value="eng" Sync="TRUE"></languageCode><countryCode value="USA" Sync="TRUE"></countryCode></mdLang><mdChar><CharSetCd value="004" Sync="TRUE"></CharSetCd></mdChar><distInfo><distFormat><formatName Sync="TRUE">Raster Dataset</formatName></distFormat></distInfo><mdHrLv><ScopeCd value="005" Sync="TRUE"></ScopeCd></mdHrLv><mdHrLvName Sync="TRUE">dataset</mdHrLvName><refSysInfo><RefSystem><refSysID><identCode code="26911" Sync="TRUE"></identCode><idCodeSpace Sync="TRUE">EPSG</idCodeSpace><idVersion Sync="TRUE">6.13(3.0.1)</idVersion></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">214270.000000 4366610.000000</pos></cornerPts><cornerPts><pos Sync="TRUE">214270.000000 4373510.000000</pos></cornerPts><cornerPts><pos Sync="TRUE">221720.000000 4373510.000000</pos></cornerPts><cornerPts><pos Sync="TRUE">221720.000000 4366610.000000</pos></cornerPts><centerPt><pos Sync="TRUE">217995.000000 4370060.000000</pos></centerPt><axisDimension type="002"><dimSize Sync="TRUE">745</dimSize><dimResol><value Sync="TRUE" uom="m">10.000000</value></dimResol></axisDimension><axisDimension type="001"><dimSize Sync="TRUE">690</dimSize><dimResol><value Sync="TRUE" uom="m">10.000000</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">Layer_1</dimDescrp><maxVal Sync="TRUE">2663.162109</maxVal><minVal Sync="TRUE">1920.546753</minVal><bitsPerVal Sync="TRUE">32</bitsPerVal><valUnit><UOM type="length"></UOM></valUnit></Band></covDim></ImgDesc></contInfo><mdDateSt Sync="TRUE">20181204</mdDateSt></metadata> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
UTF-8 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PROJCS["NAD_1983_UTM_Zone_11N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-117.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<metadata xml:lang="en"><Esri><CreaDate>20190816</CreaDate><CreaTime>10383000</CreaTime><ArcGISFormat>1.0</ArcGISFormat><SyncOnce>TRUE</SyncOnce><DataProperties><itemProps><itemLocation><linkage Sync="TRUE">file://\\IGSWCGWWLT4175\C$\Users\jlarsen\Desktop\dev-geospatial\dem\model_boundary</linkage><protocol Sync="TRUE">Local Area Network</protocol></itemLocation></itemProps><copyHistory><copy source="C:\Users\jlarsen\Desktop\dev-geospatial\model_boundary" dest="\\IGSWCGWWLT4175\C$\Users\jlarsen\Desktop\dev-geospatial\dem\model_boundary" date="20190816" time="10383000"></copy></copyHistory></DataProperties></Esri></metadata> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.