You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/core_inheritance.md
+7-37Lines changed: 7 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ kernelspec:
11
11
name: geoutils
12
12
---
13
13
(core-inheritance)=
14
-
# Inheritance to geo-images and beyond
14
+
# Inheritance to DEMs and beyond
15
15
16
16
Inheritance is practical to naturally pass down parent methods and attributes to child classes.
17
17
@@ -20,12 +20,13 @@ implemented in GeoUtils.
20
20
21
21
## Overview of {class}`~geoutils.Raster` inheritance
22
22
23
-
24
-
Below is a diagram showing current {class}`~geoutils.Raster` inheritance, which extends into other packages such as [xDEM](https://xdem.readthedocs.io/)
23
+
Current {class}`~geoutils.Raster` inheritance extends into other packages, such as [xDEM](https://xdem.readthedocs.io/)
25
24
for analyzing digital elevation models.
25
+
Within GeoUtils, inheritance extends only to {class}`~geoutils.Mask` that implements overloaded methods specific to binary raster masks,
@@ -37,42 +38,11 @@ Among others, it also adds a {attr}`~xdem.DEM.vcrs` property to consistently man
37
38
If you are DEM-enthusiastic, **[check-out our sister package xDEM](https://xdem.readthedocs.io/) for digital elevation models.**
38
39
```
39
40
40
-
## The internal {class}`~geoutils.SatelliteImage` subclass
41
-
42
-
GeoUtils subclasses {class}`Rasters<geoutils.Raster>` to {class}`SatelliteImages<geoutils.SatelliteImage>` for remote sensing users interested in parsing
43
-
metadata from space- or airborne imagery.
44
-
45
-
Based on the filename, or auxiliary files, the {class}`~geoutils.SatelliteImage` class attempts to automatically parse a
Along these additional attributes, the {class}`~geoutils.SatelliteImage` possesses the same main attributes as a {class}`~geoutils.Raster`.
64
-
65
-
```{code-cell} ipython3
66
-
67
-
# The geo-image main attributes
68
-
geoimg
69
-
```
70
-
71
41
## And beyond
72
42
73
43
Many types of geospatial data can be viewed as a subclass of {class}`Rasters<geoutils.Raster>`, which have more attributes and require their own methods:
If you are interested to build your own subclass of {class}`~geoutils.Raster`, you can take example of the structure of {class}`geoutils.SatelliteImage` and
77
-
{class}`xdem.DEM`. Then, just add any of your own attributes and methods, and overload parent methods if necessary! Don't hesitate to reach out on our
46
+
If you are interested to build your own subclass of {class}`~geoutils.Raster`, you can take example of the structure of {class}`xdem.DEM`.
47
+
Then, just add any of your own attributes and methods, and overload parent methods if necessary! Don't hesitate to reach out on our
Copy file name to clipboardExpand all lines: doc/source/feature_overview.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -241,10 +241,10 @@ import os
241
241
os.remove("myaoi.gpkg")
242
242
```
243
243
244
-
## Parsing metadata with {class}`~geoutils.SatelliteImage`
244
+
## Parsing sensor metadata
245
245
246
-
In our case, `rast` would be better opened using the {class}`~geoutils.Raster` object {class}`~geoutils.SatelliteImage` instead, which tentatively parses
247
-
metadata recognized from the filename or auxiliary files.
246
+
In our case, `rast` would be better opened using the ``parse_sensor_metadata`` argument of a `{class}`~geoutils.Raster`
247
+
, which tentatively parses metadata recognized from the filename or auxiliary files.
0 commit comments