Skip to main content
5 votes
Accepted

How to extract the integer-based geometry type code from an OGR feature

After poking around a little longer, I found out that while OGR geometries don't have access to the GetGeomType method, they DO have access to the GetGeometryType method, which outputs exactly what I'...
Felipe D.'s user avatar
  • 2,719
2 votes
Accepted

MultiPolygon to Polygon in Python

Explode: Each row containing a multi-part geometry will be split into multiple rows with single geometries, thereby increasing the vertical size of the GeoDataFrame. The first row is a multipolygon ...
Bera's user avatar
  • 76.2k
2 votes

Transforming ortho (.tiff) file from one epsg to other epsg

Re-projected image is typically rotated and somehow stretched exactly because the coordinate systems are different. Is is a common misbelief that the origin that gdalinfo reports for the original ...
user30184's user avatar
  • 68k
2 votes
Accepted

Modify a subset of a raster based on a shapefile

You can use rasterio: from rasterio import features import rasterio, os import geopandas as gpd import numpy as np workspace = r"C:/GIS/data/dem_folder" out_file = os.path.join(workspace, &...
Bera's user avatar
  • 76.2k
2 votes

ModuleNotFoundError: No module named 'matplotlib.backends.backend_qt4agg'

For me on Windows I just changed: from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas to: from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg as ...
jorgealmerio's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible