creare-com / podpacdatalib

PODPAC library of encapsulated, publically-available data sources
Apache License 2.0
0 stars 0 forks source link

TerrainTiles Node returns nan's for edges of a domain--sometimes #3

Open mpu-creare opened 3 years ago

mpu-creare commented 3 years ago

Description Terrain tiles node returns nan's on some of the edges of some tiles some of the time.

Steps to Reproduce

>>> import podpac
>>> url = "https://mobility-devel.crearecomputing.com/geowatch?&SERVICE=WMS&REQUEST=GetMap&VERSION=1.3.0&LAYERS=datalib.terraintiles.TerrainTiles&STYLES=&FORMAT=image%2Fpng&TRANSPARENT=true&HEIGHT=256&WIDTH=256&TIME=2021-03-01T12%3A00%3A00.000Z&CRS=EPSG%3A3857&BBOX=-17532819.799940586,-2504688.542848655,-15028131.257091932,-7.081154551613622e-10&PARAMS=%7B%22style%22%3A%7B%22colormap%22%3A%22terrain%22%2C%22clim%22%3A%5B0%2C5000%5D%7D%7D"
>>> node = podpac.Node.from_url(url)
>>> coords = podpac.Coordinates.from_url(url)
>>> node.eval(coords)
INFO:podpac.core.data.file_source:Loading AWS resource: s3://elevation-tiles-prod/geotiff/4/1/8.tif
INFO:podpac.core.data.file_source:Loading AWS resource: s3://elevation-tiles-prod/geotiff/4/2/8.tif
INFO:podpac.core.data.file_source:Loading AWS resource: s3://elevation-tiles-prod/geotiff/4/1/9.tif
INFO:podpac.core.data.file_source:Loading AWS resource: s3://elevation-tiles-prod/geotiff/4/2/9.tif
<xarray.UnitsDataArray (lat: 256, lon: 256)>
array([[   nan, -5046., -4847., ..., -2726., -2738., -2630.],
       [   nan, -5041., -4938., ..., -2763., -2941., -1723.],
       [   nan, -5020., -5032., ..., -2056., -2558., -2256.],
       ...,
       [   nan, -3901., -3653., ..., -4235., -4237., -4226.],
       [   nan, -4281., -4173., ..., -4267., -4247., -4258.],
       [   nan, -4240., -4330., ..., -4358., -4327., -4392.]])
Coordinates:
  * lat      (lat) float64 -2.505e+06 -2.495e+06 ... -9.822e+03 -9.313e-10
  * lon      (lon) float64 -1.753e+07 -1.752e+07 ... -1.504e+07 -1.503e+07
Attributes:
    layer_style:   <podpac.core.style.Style object at 0x7f500cdbd8e0>
    crs:           EPSG:3857
    geotransform:  (-17537730.953946173, 9822.308011171193, 0.0, -2509599.696...

Expected Behavior There should be data there.

Observed Behavior There are Nans.

mpu-creare commented 2 years ago

This might have been fixed -- so it just needs testing?

jmilloy commented 2 years ago

No, seems worse.

<xarray.UnitsDataArray (lat: 256, lon: 256)>
array([[   nan,    nan,    nan, ...,    nan,    nan,    nan],
       [   nan, -4281., -4173., ..., -4267., -4247., -4258.],
       [   nan, -3901., -3653., ..., -4235., -4237., -4226.],
       ...,
       [   nan, -5020., -5032., ..., -2056., -2558., -2256.],
       [   nan, -5041., -4938., ..., -2763., -2941., -1723.],
       [   nan, -4994., -4862., ..., -2653., -2575., -2836.]])
Coordinates:
  * lat      (lat) float64 -7.081e-10 -9.822e+03 ... -2.495e+06 -2.505e+06
  * lon      (lon) float64 -1.753e+07 -1.752e+07 ... -1.504e+07 -1.503e+07
Attributes:
    layer_style:   <podpac.core.style.Style object at 0x7f66bf4b0a90>
    crs:           EPSG:3857
    geotransform:  (-17537730.953946173, 9822.308011171193, 0.0, 4911.1540055...