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

No extent field in YAML file for Sentinel-1 and Sentinel-2 data/images #1072

Open
earthtech23 opened this issue Sep 6, 2024 · 4 comments
Open

Comments

@earthtech23
Copy link

Dear contributors,

When running this command:
datacube-ows-update --schema --role admin
We have this error:

Traceback (most recent call last):
  File "/usr/local/bin/datacube-ows-update", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/datacube_ows/update_ranges_impl.py", line 85, in main
    create_views(dc)
  File "/usr/local/lib/python3.10/dist-packages/datacube_ows/update_ranges_impl.py", line 126, in create_views
    run_sql(dc, "extent_views/create", database=dbname)
  File "/usr/local/lib/python3.10/dist-packages/datacube_ows/update_ranges_impl.py", line 183, in run_sql
    psycopg2connection.execute(q)
psycopg2.errors.InternalError_: parse error - invalid geometry
HINT:  "POLYGON((  , " <-- parse error at position 13 within geometry

The "solution" was to include the missing "extent" object in the YAML:

  "extent": {
    "lat": {
      "end": 35.9706782020955,
      "begin": 34.38661224451259
    },
    "lon": {
      "end": 35.024825846865966,
      "begin": 31.702062652092778
    }
  },

Why extent object is missing? Any ideas on fixing it?

Thanks in advance,
Stelios

@SpacemanPaul
Copy link
Contributor

How was your data indexed? Did you use stac-to-dc? If so from which STAC collection? Are you using a custom metadata type?

@earthtech23
Copy link
Author

Our data are not indexed with stac-to-dc. I am using the "old" way by preparing dataset definitions according to the documentations and eo3 metadata type. With the same way i did it for 10 different MODIS products and i faced zero issues.

@SpacemanPaul
Copy link
Contributor

SpacemanPaul commented Sep 7, 2024

See https://github.com/opendatacube/eo3/blob/develop/SPECIFICATION.md

Perhaps you are missing the $schema=https://schemas.opendatacube.org/dataset line?

@earthtech23
Copy link
Author

earthtech23 commented Sep 8, 2024

Hey Paul, this was the first thing we thought about as an issue, but it's not missing!

Of course i have read the documentation, this is why, the missing extent made me curious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants