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'...
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 ...
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 ...
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, &...
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
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
osgeo × 244python × 130
gdal × 128
ogr × 43
qgis × 30
installation × 19
coordinate-system × 17
osgeo4w × 14
geotiff-tiff × 13
shapefile × 12
raster × 11
gdalwarp × 9
pyqgis × 8
postgis × 7
geojson × 6
geopandas × 6
arcpy × 5
openstreetmap × 5
ogr2ogr × 5
open-source-gis × 5
gdal-translate × 5
python-3 × 5
qgis-3 × 4
geometry × 4
c# × 4