Commit 0a08addc authored by Daniel Scheffler's avatar Daniel Scheffler

Added some readme files.

parent 27e90a23
Pipeline #3102 passed with stages
in 1 minute and 24 seconds
## create a GeoArray instance from a file on disk
```python
from geoarray import GeoArray
gA = GeoArray('/home/gfz-fe/scheffler/temp/Landsat-8__OLI_TIRS__LC81940242014072LGN00_L2B__250x250.bsq')
```
## OR create a GeoArray instance from a numpy array
```python
from geoarray import GeoArray
import numpy as np
testarray = np.random.randint(1,10, (250, 250, 8))
gA = GeoArray(testarray,
geotransform=[640605.0, 30.0, -0.0, 5754285.0, -0.0, -30.0],
projection='PROJCS["WGS 84 / UTM zone 32N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32632"]]')
```
## get some relevant metadata directly from the attributes of the GeoArray instance
```python
gA.shape
```
(250, 250, 8)
```python
gA.geotransform
```
[640605.0, 30.0, -0.0, 5754285.0, -0.0, -30.0]
```python
gA.projection
```
'PROJCS["WGS 84 / UTM zone 32N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32632"]]'
```python
gA.metadata
```
Metadata:
{'band_names': ['Band 1',
'Band 2',
'Band 3',
'Band 4',
'Band 5',
'Band 6',
'Band 7',
'Band 8'],
'description': '/home/gfz-fe/scheffler/temp/Landsat-8__OLI_TIRS__LC81940242014072LGN00_L2B__250x250.bsq',
'map_info': 'UTM, 1, 1, 640605, 5754285, 30, 30, 32, North,WGS-84'}
```python
gA.box.boxMapXY
```
((640605.0, 5754285.0),
(648105.0, 5754285.0),
(648105.0, 5746785.0),
(640605.0, 5746785.0))
```python
gA.footprint_poly
```
![svg](output_10_0.svg)
## index the GeoArray instance just like a numpy array
```python
gA[:10, :10, 0]
```
array([[1465, 1473, 1501, 1485, 1494, 1496, 1480, 1494, 1459, 1440],
[1421, 1448, 1469, 1467, 1476, 1470, 1495, 1515, 1487, 1474],
[1402, 1408, 1399, 1397, 1417, 1420, 1439, 1439, 1443, 1464],
[1419, 1407, 1394, 1398, 1421, 1406, 1392, 1402, 1430, 1435],
[1415, 1409, 1405, 1414, 1415, 1403, 1395, 1413, 1426, 1424],
[1414, 1411, 1412, 1410, 1416, 1411, 1409, 1416, 1416, 1425],
[1415, 1426, 1433, 1433, 1430, 1424, 1413, 1419, 1429, 1438],
[1434, 1445, 1450, 1437, 1439, 1436, 1427, 1417, 1437, 1454],
[1441, 1437, 1442, 1435, 1425, 1439, 1436, 1417, 1433, 1431],
[1418, 1435, 1437, 1439, 1437, 1433, 1427, 1413, 1415, 1405]], dtype=int16)
## visualize the data
```python
# non-interactively:
gA.show()
```
![png](output_14_0.png)
```python
# interactively (adds a slider for the band to be visualized)
gA.show(interactive=True)
```
<link rel="stylesheet" href="https://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<style>div.hololayout {
display: flex;
align-items: center;
margin: 0;
}
div.holoframe {
width: 75%;
}
div.holowell {
display: flex;
align-items: center;
}
form.holoform {
background-color: #fafafa;
border-radius: 5px;
overflow: hidden;
padding-left: 0.8em;
padding-right: 0.8em;
padding-top: 0.4em;
padding-bottom: 0.4em;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
margin-bottom: 20px;
border: 1px solid #e3e3e3;
}
div.holowidgets {
padding-right: 0;
width: 25%;
}
div.holoslider {
min-height: 0 !important;
height: 0.8em;
width: 100%;
}
div.holoformgroup {
padding-top: 0.5em;
margin-bottom: 0.5em;
}
div.hologroup {
padding-left: 0;
padding-right: 0.8em;
width: 100%;
}
.holoselect {
width: 92%;
margin-left: 0;
margin-right: 0;
}
.holotext {
padding-left: 0.5em;
padding-right: 0;
width: 100%;
}
.holowidgets .ui-resizable-se {
visibility: hidden
}
.holoframe > .ui-resizable-se {
visibility: hidden
}
.holowidgets .ui-resizable-s {
visibility: hidden
}
/* CSS rules for noUISlider based slider used by JupyterLab extension */
.noUi-handle {
width: 20px !important;
height: 20px !important;
left: -5px !important;
top: -5px !important;
}
.noUi-handle:before, .noUi-handle:after {
visibility: hidden;
height: 0px;
}
.noUi-target {
margin-left: 0.5em;
margin-right: 0.5em;
}
</style>
<div class="logo-block">
<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz
AAAB+wAAAfsBxc2miwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAA6zSURB
VHic7ZtpeFRVmsf/5966taWqUlUJ2UioBBJiIBAwCZtog9IOgjqACsogKtqirT2ttt069nQ/zDzt
tI4+CrJIREFaFgWhBXpUNhHZQoKBkIUASchWla1S+3ar7r1nPkDaCAnZKoQP/D7mnPOe9/xy76n3
nFSAW9ziFoPFNED2LLK5wcyBDObkb8ZkxuaoSYlI6ZcOKq1eWFdedqNzGHQBk9RMEwFAASkk0Xw3
ETacDNi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tacfvwhWvIwMi
oKEBtm0H7W+UVfkc/Y1V0BhoPlDr/w1w/eu1vjIgAgDg22OtX6/eYfnEz/focrZTHAFR+PSs56/7
q32nwpjazxgwAQCwcU/T62t3WL7r6/jVRa6/byp1rei+Z98ZUAEAhEPHPc8fKnTU9nbgtnOe8h0l
9hcGIqmODLQAHCy2Xti6v/XNRivf43f4fFvIteu854+VHnR7q9tfBlwAAGz+pnndB9vM26UebAe8
SLHujPOTPVW+rwY+sxskAAC2HrA8t2Vvc7ffP1r9o+vwR2dcr92InIAbKKC1FZ5tB1tf+/G8p8sv
N/9Q5zd/XR34LYCwV5JdccMEAMDBk45DH243r/X4xGvqxFa/GNpS7n6rwOwNWwHVE26oAADYurf1
zx/utOzt+DMKYM0p17YtZZ5VNzqfsB2HewG1WXE8PoZ7gOclbTIvynZf9JV+fqZtfgs/8F/Nu5rB
EIBmJ+8QRMmpU7EzGRsf2FzuePqYRbzh/zE26EwdrT10f6r6o8HOYzCJB9Dpff8tbnGLG8L/A/WE
roTBs2RqAAAAAElFTkSuQmCC'
style='height:25px; border-radius:12px; display: inline-block; float: left; vertical-align: middle'></img>
<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz
AAAFMAAABTABZarKtgAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAArNSURB
VFiFnVd5VFNXGv/ee0kgGyQhbFoXIKCFYEXEDVErTucMoKUOWA/VLsNSLPQgFTOdyrHPiIp1lFIQ
OlaPShEG3EpPcQmISCuV1bQ1CLKIULeQhJA9JO+9+UMT0x5aPfOdc895373f/e7v/t537/ddBF5Q
JBIJl81mJwCACEVRQBCEQhAEAQCgnghCURRCkmS7Wq2+WlJSYn0Rv8jzDHAcD0EQJIVGo5mFQuGF
jIyMu39kq1KpkOrq6gU6nS6aIAiGzWY7VVBQ0P9/AcjNzWXy+fxcOp2uiY+Przm0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O3fufECS5GHXnf8pAAAAHMfdURTdimGYPjExsTo0NHTyj2ynEplMxurs7HyHIAiKJMlSHMct
U9k9N2vl5+cH0en0TRiGWX18fC65vnh+LxqNBq2oqFhgMpmi7XY7arVaj+zdu/fxn/l/4bSZl5fH
5nK5CQAQMtXznCRJePpEbwOAZhzHX4ix/wHzzC/tu64gcwAAAABJRU5ErkJggg=='
style='height:15px; border-radius:12px; display: inline-block; float: left'></img>
</div>
<div class="hololayout row row-fluid">
<div class="holoframe" id="display_area46305c5d388e4b91bcbaad4e6b678dea">
<div id="_anim_img46305c5d388e4b91bcbaad4e6b678dea">
</div>
</div>
<div class="holowidgets" id="widget_area46305c5d388e4b91bcbaad4e6b678dea">
<form class="holoform well" id="form46305c5d388e4b91bcbaad4e6b678dea">
<div class="form-group control-group holoformgroup" style=''>
<label for="textInput46305c5d388e4b91bcbaad4e6b678dea_band">
<strong>band:</strong>
</label>
<div class="holowell">
<div class="hologroup">
<input type="text" class="holotext form-control input-small"
id="textInput46305c5d388e4b91bcbaad4e6b678dea_band" value="" readonly>
</div>
<div class="holoslider"
id="_anim_widget46305c5d388e4b91bcbaad4e6b678dea_band"></div>
</div>
</div>
</form>
</div>
</div>
```python
gA.show_histogram(band=0)
```
![png](output_16_0.png)
STD: 103.690543564
MEAN: 1301.152864
2 % percentile: 1186.0
98 % percentile: 1585.0
```python
gA.show_footprint()
```
<div style="width:100%;"><div style="position:relative;width:100%;height:0;padding-bottom:60%;"><iframe src="data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgPHNjcmlwdD5MX1BSRUZFUl9DQU5WQVMgPSBmYWxzZTsgTF9OT19UT1VDSCA9IGZhbHNlOyBMX0RJU0FCTEVfM0QgPSBmYWxzZTs8L3NjcmlwdD4KICAgIDxzY3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gICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKCiAgICAgICAgICAgIAogICAgICAgICAgICAgICAgdmFyIGJvdW5kcyA9IG51bGw7CiAgICAgICAgICAgIAoKICAgICAgICAgICAgdmFyIG1hcF9jMjgzNjc0ZjcwZDI0OTM0OWE1NDNlZDk4YmI3YWZlZiA9IEwubWFwKAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ21hcF9jMjgzNjc0ZjcwZDI0OTM0OWE1NDNlZDk4YmI3YWZlZicsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Y2VudGVyOiBbNTEuODg2ODY0NTg3LDExLjA5NzU3OTEyMDNdLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgem9vbTogMTAsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhCb3VuZHM6IGJvdW5kcywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxheWVyczogW10sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3b3JsZENvcHlKdW1wOiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyczogTC5DUlMuRVBTRzM4NTcKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIAogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciB0aWxlX2xheWVyXzI1ZTBlMTVkN2U1YzQ0NmU5MjU1YTg0ZmNlM2ZhN2VjID0gTC50aWxlTGF5ZXIoCiAgICAgICAgICAgICAgICAnaHR0cHM6Ly97c30udGlsZS5vcGVuc3RyZWV0bWFwLm9yZy97en0ve3h9L3t5fS5wbmcnLAogICAgICAgICAgICAgICAgewogICJhdHRyaWJ1dGlvbiI6IG51bGwsCiAgImRldGVjdFJldGluYSI6IGZhbHNlLAogICJtYXhab29tIjogMTgsCiAgIm1pblpvb20iOiAxLAogICJub1dyYXAiOiBmYWxzZSwKICAic3ViZG9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%;height:100%;left:0;top:0;border:none !important;" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>
## use some geo functions
### subsetting
```python
gA_subset = gA.get_subset(xslice=slice(0,50), yslice=slice(0,50), zslice=slice(0,2)) # return a subset GeoArray instance of the upper left corner (first 2 bands)
print(gA_subset.shape)
gA_subset.show()
```
(50, 50, 2)
![png](output_20_1.png)
### get a geographic position
```python
gA.box.boundsMap
```
(640605.0, 648105.0, 5746785.0, 5754285.0)
```python
# define target bounds
xmin=641000.0
ymin=5750000.0
xmax=642000.0
ymax=5752000
nparr, gt, prj = gA.get_mapPos(mapBounds=(xmin, ymin, xmax, ymax), mapBounds_prj=gA.projection)
gA_map_subset = GeoArray(nparr, geotransform=gt, projection=prj)
print(gA_map_subset.shape)
gA_map_subset.show()
```
(67, 34, 8)
![png](output_23_1.png)
### warp the GeoArray
```python
gA_map_subset.epsg # EPSG code so far
```
32632
```python
gA_map_subset.reproject_to_new_grid(tgt_prj=32631, # EPSG code of target projection (also takes WKT strings, etc.)
tgt_xygrid=[[0,30], [30, 0]] # characteristics of target pixel grid (defines pixel origin and pixel size)
)
```
Warping progress |==================================================| 100.0% Complete => 0:00:00
```python
gA_map_subset.show()
```
Automatically detected nodata value for GeoArray 'IN_MEM': 0.0
![png](output_27_1.png)
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="300" height="300" viewBox="640305.0 5746485.0 8100.0 8100.0" preserveAspectRatio="xMinYMin meet"><g transform="matrix(1,0,0,-1,0,11501070.0)"><path fill-rule="evenodd" fill="#66cc99" stroke="#555555" stroke-width="54.0" opacity="0.6" d="M 648105.0,5754285.0 L 648105.0,5746785.0 L 640605.0,5746785.0 L 640605.0,5754285.0 L 648105.0,5754285.0 z" /></g></svg>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment