我在jupyter notebook中使用python从sentienl1 rtc获取数据

ldxq2e6h  于 2023-03-21  发布在  Python
关注(0)|答案(1)|浏览(180)

在jupyter环境中的代码,所以我能够运行它在jupyter笔记本电脑在本地环境和它采取的年龄做,但仍显示在进行中,当我试图做同样的colab或sage-maker其抛出的问题,如
ValueError:无法自动猜测CRS/解析。以下是错误

ValueError
    Cell In[20], line 3
    1 ## Get Sentinel-1-RTC Data
    Traceback (most recent call last)
    2 assests = ['vh', 'vv']
    ----> 3 train_band_values=crop_yield_data.progress_apply (lambda x: get_sentinel_data(x['Longitude'], x['Latitude'],x['Season (SA = Summer Autumn, WS= Winter Spring)'], assests), axis=1)
    4 vh = [x[0] for x in train_band_values]
    5 vv = [x[1] for x in train_band_values]
    ---> 3 train_band_values=crop_yield_data.progress_apply (lambda x: get_sentinel_data(x['Longitude'], x['Latitude'],x['Season (SA = Summer Autumn, WS= Winter Spring)'], assests), axis=1)
    4 vh = [x[e] for x in train_band_values] 5 vv = [x[1] for x in train_band_values]
    Cell In[19], line 32, in get_sentinel_data(longitude, latitude, season, assests)
    29 item items[0] =
    30 items.reverse()
    ---> 32 data = stac_load([items [1]], bands-bands_of_interest, patch_url=pc.sign, bbox-bbox_of_interest).isel (time=0)
    34 for item in items:
    35 data = stac_load( [item], bands-bands_of_interest, patch_url=pc.sign, bbox=bbox_of_interest).isel (time=0)
    File/anaconda3/envs/python3/lib/python3.18/site-packages/odc/stac/_load.py:494, in load(items, bands, groupby, resampling, dtype, chunks, pool, crs, resolution, anchor, geobox, bbox, lon, lat, x, y, like, geopolygon, progress, fail_on_error, stac_cfg, patch_url, preserve_original_order, **kw)
    476 gbox = output_geobox(
    477     _parsed,
    478     bands=bands,
    (...)
    490     y=y,
    491 )
    493 if gbox is None:
    --> 494 raise ValueError("Failed to auto-guess CRS/resolution.")
    496 if chunks is not None:
    497     chunk_shape = resolve_chunk_shape(gbox, chunks)
    ValueError: Failed to auto-guess CRS/resolution.

我已经试过在当地跑步了,但要花很长时间

46scxncf

46scxncf1#

在stack_load方法中提供crs和resolution参数。请参见下面的示例:xx = odc. stack.load(...crs=“EPSG:3857”,resolution=10)yy = odc. stack.load(...crs=“EPSG:4326”,resolution=0.00009009)

相关问题