You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When analyzing glacier velocity with itslivetools several errors appeared and many methods were tried with no solution. The errors were "module 'itslivetools' has no attribute 'find_granule_by_point'" and "module 'itslivetools' has no attribute 'find_granule_by_point'". I wonder if there could be a better solution.
The text was updated successfully, but these errors were encountered:
hi @00000321 ! Thanks for raising this issue and sorry for the troubles you encountered. This package is undergoing significant changes at the moment and that function has been rewritten and is in a new location. The new version should be pushed soon, in the meantime you could use this version:
def find_granule_by_point(input_point, label='single_point'):
'''returns url for the granule (zarr datacube) containing a specified point. point must be passed in epsg:4326
'''
catalog = gpd.read_file('https://its-live-data.s3.amazonaws.com/datacubes/catalog_v02.json')
#make shapely point of input point
p = gpd.GeoSeries([Point(input_point[0], input_point[1])],crs='EPSG:4326')
#make gdf of point
gdf = gdf = gpd.GeoDataFrame({'label': f'{label}',
'geometry':p})
#find row of granule
granule = catalog.sjoin(gdf, how='inner')
url = granule['zarr_url'].values[0]
return url
When analyzing glacier velocity with itslivetools several errors appeared and many methods were tried with no solution. The errors were "module 'itslivetools' has no attribute 'find_granule_by_point'" and "module 'itslivetools' has no attribute 'find_granule_by_point'". I wonder if there could be a better solution.
The text was updated successfully, but these errors were encountered: