Git Product home page Git Product logo

Comments (2)

jdries avatar jdries commented on July 17, 2024

I indeed see some things which look like different warping, so we need to check some details:

  • you reference a product with tile id 05QKB, but then use 04QHG as filter in openEO
  • you specify the bounds in the CRS of UTM zone 5

Can you pick a utm zone/tile id, and make sure to use it consistently? This can make a difference for these very small artifacts.
In the result metadata of openEO, you should also see a 'canonical link'. That allows you to share the result with metadata here, and gives us more insight in which source products was used in openEO.
If you can share this info, we might be able to tell where the difference is coming from.

from openeo-python-client.

sebbelese avatar sebbelese commented on July 17, 2024

Thanks for your answer. Indeed, if the tile is in the same CRS as the one used to determine the bounds (as in the code below), the alignment is correct.

These product names, tile ids and bounds come from an external database of labelled images to be used for training, and I am not sure why there are these inconsistencies in the CRS.

With the tile id below, I have well-aligned images.

import openeo
from shapely import wkt
import datetime
from openeo.processes import eq

connection = openeo.connect("https://openeo.dataspace.copernicus.eu/openeo/1.2")
connection.authenticate_oidc()

TILE_ID = "05QKB"
CRS = "EPSG:32605"
sensing_time = "20190116T210921"

poly = wkt.loads("POLYGON ((222380 2123230, 227480 2123230, 227480 2128330, 222380 2128330, 222380 2123230))")
bounds = poly.bounds

date_start = datetime.datetime.strptime(sensing_time,'%Y%m%dT%H%M%S')
date_end = date_start + datetime.timedelta(seconds=1)
cube = connection.load_collection(
    "SENTINEL2_L1C",
    temporal_extent=[date_start, date_end],
    bands= ['B02', 'B03', 'B04'],
    spatial_extent = {
        "west": bounds[0],
        "south": bounds[1],
        "east": bounds[2],
        "north": bounds[3],
        "crs" : CRS
    },
    properties = {"tileId": lambda x: eq(x,TILE_ID)}
)

DN_reflectance_factor = 0.0001
cube = cube * DN_reflectance_factor

result = cube.save_result("GTiff")
job = result.create_job()
job.start_and_wait(lambda a : None)
job.get_results().download_file("test_openEO.tif")

The canonical link found with job.get_results().get_metadata()["links"][2]["href"] for this working trial is
https://openeo.dataspace.copernicus.eu/openeo/1.2/jobs/j-240613cd92b84e5488fa8d2f4147a21c/results/Njk5MDRhOGItOTJlZi00YTc0LTg4NTMtODI2Zjc3MzhlY2Y3/161678e8e9ae3d33d76e713dad05397e?expires=1718884270

Here is the canonical link for the first run with issues
https://openeo.dataspace.copernicus.eu/openeo/1.2/jobs/j-240613e551994e45ac63868be9dab1ac/results/Njk5MDRhOGItOTJlZi00YTc0LTg4NTMtODI2Zjc3MzhlY2Y3/78308338b53f3a91a1b00b9174577706?expires=1718884660

from openeo-python-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.