Skip to main content

Questions tagged [python]

Python is an open source interpreted programming language used in many GIS programs.

1 vote
0 answers
28 views

Loading shapefile data in to Python notebook

I am using Python Jupyter Notbook library in earth observation sandbox. I tried to import a shapefile using the code aoi = "../data/ETH_AW_Boundary.shp" # Load geographic area of interest ...
Henok Gebrehiwot's user avatar
0 votes
1 answer
32 views

QGIS Processing script to join two layers by two attributes

Since I work a lot with routing and trip matrices I have a daily need for joining two layers by two attributes (origin and destination). I have had AI to support me in writing a Processing Script for ...
Morten's user avatar
  • 371
0 votes
0 answers
48 views

VectorTranslateOptions() got an unexpected keyword argument 'clipSrc' [closed]

I am working with 2 vector layers, file type .GEOjson. Using the Python GDAL API, I want to build a set of VectorTranslateOptions() to pass to the VectorTranslate method. from osgeo import ogr, gdal #...
tds's user avatar
  • 304
2 votes
0 answers
37 views

Efficient spatial join with OvertureMaps GeoParquet in SedonaDB

I want to check if points is contained in buildings and if so, join the buildings' attributes to them. I looked through: https://sedona.apache.org/sedonadb/latest/quickstart-python/ https://sedona....
bugmenot123's user avatar
  • 12.4k
3 votes
1 answer
96 views

Creating Mapbox Vector Tiles from GeoJSON without unnecessarily filling holes of the input geometry

I use geopandas/pyogrio to create a Mapbox Vector Tile from a GeoJSON. The shape in the vector tile ends up being wrong: some holes are filled. Here is an example GeoJSON demonstrating the issue I am ...
zabop's user avatar
  • 3,276
0 votes
1 answer
25 views

Why is fiona.open causing a PermissionError?

I'm working on a flask app that takes a geojson file and returns a shapefile. Currently it is giving me the error PermissionError: [Errno 13] Permission denied: 'C:\\Users\\john\\Desktop\\...
John's user avatar
  • 161
1 vote
0 answers
44 views

GDAL Python bindings crash when calling gdal.Translate/gdal.Warp synchronously in PyQt5 GUI [closed]

I’m experiencing a hard crash (process terminates immediately, no Python exception) whenever I run GDAL operations like gdal.Translate or gdal.Warp synchronously in the main thread of a PyQt5 ...
dirac16's user avatar
  • 119
0 votes
0 answers
67 views

What criteria could be used to automatically identify lakes in a DEM?

I have elevation data as a DEM PNG image and would like to automatically detect lakes. I have tried to use the following criteria: Lakes are areas of adjacent pixels of equal grayscale color. Pixels ...
Noodle's user avatar
  • 179
2 votes
1 answer
51 views

How to use virtual environments within Docker images to access dependencies without having to reinstall GDAL?

I am trying to have a Docker container running an externally accessible JupyterLab, with the from osgeo import gdal Python command not failing. I hope to achieve this without reinstalling gdal ...
zabop's user avatar
  • 3,276
5 votes
1 answer
188 views

Skeletonize or extract lines from segmentation image

I have this raster: which I'd like to convert to vector data (linestring) (e.g. a Shapefile). To this end, I'm using this Python code: import rasterio import geopandas as gpd from skimage.morphology ...
swiss_knight's user avatar
  • 11.4k
0 votes
1 answer
52 views

Python error: Couldn't load plugin 'Geo-SAM'

I have installed GeoSAM plugin on my QGIS LTS 3.40.11 on windows 11, according to the instruction here. All steps of python dependencies passed and I installed required packages there after. Now I am ...
Sina NAKHOSTIN's user avatar
0 votes
1 answer
49 views

Windows 11 pytorch installation error

I am following this tutorial to install GeoSAM plugin for QGIS. As I removed my old QGIS and installed the latest LTS version through OSGeo4W installer it seems that at some point the old installation ...
Sina NAKHOSTIN's user avatar
1 vote
1 answer
81 views

Reduce memory-footprint of point-in-polygon lookups in GeoPandas

Context: I’m using a polygon layer as a makeshift gazetteer to find approximate addresses for point locations. My current workflow uses geopandas to: Load the polygon dataset into memory Use the ...
christoph's user avatar
  • 615
2 votes
1 answer
91 views

Overcoming temporary file writing error in GDAL

I am trying to use a Python package called hydrosar to apply a water mapping algorithm to a Sentinel-1 image. I am getting the following error: Attempt to create new TIFF file C:\gdal_temp\tmp_xxxxx ...
Micky Maganini's user avatar
1 vote
1 answer
170 views

How to create a COG using gdal.Warp without turning transparent pixels to black pixels?

I am trying to create a COG from a TIF file from OpenAerialMap. The initial file appears in QGIS nicely: areas which do not have data are transparent. However, when viewing the COG, some of the no ...
zabop's user avatar
  • 3,276

15 30 50 per page
1
2 3 4 5
817