New answers tagged

1 vote

Artificially extend a DEM to clip it

I found a way to do it on Python: (PS: I USED A DIFFERENT DEM FOR THE EXAMPLE, TO DEMONSTRATE HOW TO DEAL WITH BORDERS) # Open the DEM and extract all the info about it src = rio.open('IfSAR_merged....
user avatar
  • 107
3 votes
Accepted

Converting extent to int is changing value

Rounding before integer worked. print int(round(extent.YMin)), int(round(extent.XMin)), int(round(extent.YMax)), int(round(extent.XMax)) -46 -90 -45 -89
user avatar
  • 53
1 vote

Filter by bounding box in GeoPandas

A quick solution to this if the shape you want to clip by is a box: from shapely.geometry import box bbox = box(*df_sussex.total_bounds) df_clipped = gpd.mask(df, mask=bbox) It uses the shapely....
user avatar

Top 50 recent answers are included