Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pyotb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Orfeo ToolBox
pyotb
Commits
1e2330cd
Commit
1e2330cd
authored
1 year ago
by
Remi Cresson
Browse files
Options
Downloads
Patches
Plain Diff
DOC: add metadata, get_statistics(), get_info()
parent
0221a9e3
No related branches found
Branches containing commit
No related tags found
2 merge requests
!108
Release 2.0.0
,
!107
Catchy README
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/features.md
+90
-0
90 additions, 0 deletions
doc/features.md
with
90 additions
and
0 deletions
doc/features.md
+
90
−
0
View file @
1e2330cd
...
...
@@ -92,4 +92,94 @@ attribute:
```
python
inp
.
transform
# (6.0, 0.0, 760056.0, 0.0, -6.0, 6946092.0)
```
### Metadata
Images metadata can be retrieved with the
`metadata`
attribute:
```
python
print
(
inp
.
metadata
)
```
Gives:
```
{
'DataType': 1.0,
'DriverLongName': 'GeoTIFF',
'DriverShortName': 'GTiff',
'GeoTransform': (760056.0, 6.0, 0.0, 6946092.0, 0.0, -6.0),
'LowerLeftCorner': (760056.0, 6944268.0),
'LowerRightCorner': (761562.0, 6944268.0),
'AREA_OR_POINT': 'Area',
'TIFFTAG_SOFTWARE': 'CSinG - 13 SEPTEMBRE 2012',
'ProjectionRef': 'PROJCS["RGF93 v1 / Lambert-93",\n...',
'ResolutionFactor': 0,
'SubDatasetIndex': 0,
'UpperLeftCorner': (760056.0, 6946092.0),
'UpperRightCorner': (761562.0, 6946092.0),
'TileHintX': 251.0,
'TileHintY': 8.0
}
```
## Information
The information fetched by the
`ReadImageInfo`
OTB application is available
through
`get_info()`
:
```
python
print
(
inp
.
get_info
())
```
Gives:
```
json lines
{
'indexx': 0,
'indexy': 0,
'sizex': 251,
'sizey': 304,
'spacingx': 6.0,
'spacingy': -6.0,
'originx': 760059.0,
'originy': 6946089.0,
'estimatedgroundspacingx': 5.978403091430664,
'estimatedgroundspacingy': 5.996793270111084,
'numberbands': 4,
'datatype': 'unsigned_char',
'ullat': 0.0,
'ullon': 0.0,
'urlat': 0.0,
'urlon': 0.0,
'lrlat': 0.0,
'lrlon': 0.0,
'lllat': 0.0,
'lllon': 0.0,
'rgb.r': 0,
'rgb.g': 1,
'rgb.b': 2,
'projectionref': 'PROJCS["RGF93 v1 ..."EPSG","2154"]]',
'gcp.count': 0
}
```
## Statistics
Image statistics can be computed on-the-fly using
`get_statistics()`
:
```
python
print
(
inp
.
get_statistics
())
```
Gives:
```
json lines
{
'out.mean': [79.5505, 109.225, 115.456, 249.349],
'out.min': [33, 64, 91, 47],
'out.max': [255, 255, 230, 255],
'out.std': [51.0754, 35.3152, 23.4514, 20.3827]
}
```
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment