Skip to main content

New answers tagged

0 votes

Clipping raster image using coordinates from CSV file with Python

You can clip using rasterio.mask and geopandas: import geopandas as gpd import rasterio, os from shapely import box from rasterio.mask import mask raster_file = r"/home/bera/Drives/data1/gisdata/...
Bera's user avatar
  • 74.7k
1 vote

Calculating the Oriented Bounding Box (OBB) of polygon or point set

Currently, there are two great implementations of this for Python and PostGIS. Python The shapely Python library provides the oriented_envelope method. There's the alias named ...
marquesine's user avatar
0 votes
Accepted

PyQGIS - zoom/fit layer extent to map item layout extent

I have solved the issue ensuring my map fit properly within a specific layout on QGIS, here is the following code snippet: canvas_extent = canvas.extent() layout_aspect_ratio = page_width / ...
Marin Marian's user avatar

Top 50 recent answers are included