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

Invalid time values #448

Closed
olafveerman opened this issue Nov 11, 2020 · 4 comments
Closed

Invalid time values #448

olafveerman opened this issue Nov 11, 2020 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@olafveerman
Copy link
Contributor

olafveerman commented Nov 11, 2020

https://earthdata.nasa.gov/covid19/explore/sf?map=-122.3218%2C37.7334%2C11.63&layers=no2-diff&lState=nightlights-hd%7C0%7C0%2Cdetections-ship%7C0%7C0%2Cno2-diff%7C0%7C0

results in:

image

  • NO2 Diff
  • Agriculture
@olafveerman olafveerman added the bug Something isn't working label Nov 11, 2020
@olafveerman olafveerman changed the title NO2 diff map Invalid time values Nov 11, 2020
@olafveerman
Copy link
Contributor Author

olafveerman commented Nov 11, 2020

For agriculture, the API returns an empty array for the date domain.

For NO2 Diff, the tile url gives a 500 internal server error. The legend is of type gradient, the tile url has a gamma value. These are incompatible. Change tile url to remove gamma.

@olafveerman
Copy link
Contributor Author

Tracking NO2 in a separate issue.

Config for agriculture returned from the API:

{
    "id": "agriculture",
    "name": "Agriculture",
    "type": "raster-timeseries",
    "isPeriodic": true,
    "timeUnit": "month",
    "domain": [],
    "source": {
      "type": "raster",
      "tiles": [
        "https://8ib71h0627.execute-api.us-east-1.amazonaws.com/v1/{z}/{x}/{y}@1x?url=s3://covid-eo-data/agriculture-cropmonitor/CropMonitor_{date}.tif&resampling_method=nearest&bidx=1&color_map=custom_cropmonitor"
      ]
    },
    ...
}

Originally I thought this was due to the date formatting of the COG, which does not follow the convention of the other monthly datasets. But even after changing all the filenames on S3, the domain is still empty.

CropMonitor_2020_10_28.tif -> CropMonitor_202010.tif

@olafveerman olafveerman self-assigned this Nov 11, 2020
@leothomas
Copy link
Collaborator

Agriculture looks for data in s3 subfolder s3://covid-eo-data/agriculture-cropmonitor (as opposed to s3://covid-eo-data/agriculture). The reason for this was because originally, the s3://covid-eo-data/agriculture/ folder had a bunch of different files (other can Cropmonitor* which were causing invalid dates to be returned, so I moved all agriculture/Cropmonitor* files to agriculture-cropmonitor. See covid-api, issue 53

Two possible fixes:

  1. Now that the agriculture/ folder has been cleaned up to contain only Cropmonitor* files, we update the s3_location of the dataset's metadata to point to agriculture instead of agriculture-cropmonitor
  • Requires no moving of files in S3
  • Requires a re-deploy of the API
  1. Copy all files in agriculture to agriculture-cropmonitor as a temp fix
  • Requires no redeploy of API
  • Requires duplicating (temporarily) files in S3

@olafveerman
Copy link
Contributor Author

🤦 I missed the -cropmonitor. Files are moved and renamed. The agriculture layer is working again.

Thanks @leothomas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants