Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeoTIFF Support #134

Open
holmbergius opened this issue Dec 22, 2024 · 3 comments
Open

GeoTIFF Support #134

holmbergius opened this issue Dec 22, 2024 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@holmbergius
Copy link
Contributor

Feature description and context

Wild Me is preparing to use satellite-sourced data in Scout, with GeoTIFF as the download standard from imagery providers. We would like to get GeoTIFF fully supported, including access to the metadata stored in the GeoTIFF image, to ensure that satellite data can be easily imported into Scout.

Feature sign-off requirements

-GeoTIFF imagery can be fully imported into Scout.
-GeoTIFF metadata is stored along with the image in Scout
-GeoTIFF metadata can be programatically accessed during image-related manipulation in the Scout UI, such as reconciling whether GPS points of interest occur within the frame of a GeoTIFF image.
-GeoTIFF metadta can be displayed with an image displayed in Scout.

Design

  • Figma link (static or prototype; specify)
  • Component list/reference
  • Navigation sitemap
  • Product theme references and any known in-line customization that may be needed
  • Are there images needed for design? (attach below in zip)
@holmbergius holmbergius added this to the 2.5.0 milestone Jan 2, 2025
@LashaO
Copy link
Contributor

LashaO commented Jan 4, 2025

An example geotiff sample from Sentinel-2:

https://cthulhu.dyn.wildme.io/public/datasets/scout-geotiff-samples/sentinel2.tif

GeoTIFF is a TIFF image with additional geospatial metadata embedded.

Python code to peek at metadata:

import rasterio

file_path = "geotiff-samples/sample.tif"

with rasterio.open(file_path) as src:
    print("CRS (Coordinate Reference System):")
    print(src.crs)

    print("\nTransform (Affine Transform):")
    print(src.transform)

    print("\nBounds (Spatial Extent):")
    print(src.bounds)

    print("\nMetadata:")
    print(src.meta)

    print("\nTags:")
    print(src.tags())

And expected output:

CRS (Coordinate Reference System):
EPSG:32631

Transform (Affine Transform):
| 10.00, 0.00, 590520.00|
| 0.00,-10.00, 5790630.00|
| 0.00, 0.00, 1.00|

Bounds (Spatial Extent):
BoundingBox(left=590520.0, bottom=5780620.0, right=600530.0, top=5790630.0)

Metadata:
{'driver': 'GTiff', 'dtype': 'uint16', 'nodata': None, 'width': 1001, 'height': 1001, 'count': 3, 'crs': CRS.from_wkt('PROJCS["WGS 84 / UTM zone 31N",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",3],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","32631"]]'), 'transform': Affine(10.0, 0.0, 590520.0,
       0.0, -10.0, 5790630.0)}

Tags:
{'AREA_OR_POINT': 'Area'}

@holmbergius
Copy link
Contributor Author

@LashaO Is this representative of what we might get from Planet?

@LashaO
Copy link
Contributor

LashaO commented Jan 4, 2025

Yes, this should be very close to what we might get from Planet. I will update this thread with Planet samples as soon as I have access to them. Current samples I have from Planet are non-ortho so they include different type of metadata.

@holmbergius holmbergius added the enhancement New feature or request label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants