Skip to main content

Questions tagged [python]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

I'm using Planetary Computer STAC catalog to download MODIS emissivity data (modis-11A1-061 collection, although the same problem appears with the modis-11A2-061 and modis-21A2-061 collections). It ...
ArMoraer's user avatar
  • 5,769
0 votes
0 answers
26 views

In ArcGIS Pro, to activate the default python conda environment in your terminal, you can run the proenv.bat script (copied below). I don't speak bat, so I don't know how it works. What I don't want ...
a different ben's user avatar
0 votes
0 answers
22 views

I'm trying to do zonal statistics in Python API when I encounter error message: EEException: Computation timed out while running this cell of code to convert feature collection into data frame: ...
Garenza R. Nugraha's user avatar
1 vote
1 answer
55 views

I am classifying a PlanetScope Imagery into 3 classes (water, non-water and mixed) using NDWI. Natural breaks (Jenks)​​ worked the best for me when I tried different data classification methods in ...
Sandhya Dhakal's user avatar
2 votes
2 answers
171 views

I have a workflow with QGIS, where I open an entire gdb, filter all layers by a common column and save all the filtered layers in a gpkg. I'm trying to make those steps with geopandas, so I don't ...
Eric Verschoor's user avatar
0 votes
1 answer
21 views

I am trying to upload a layer using the GeoServer (2.28) REST API using the Importer extension in python. I ak not not what I am doing wrong.If I use the PUT method when the sld does not exists in an ...
GforGIS's user avatar
  • 3,415
2 votes
1 answer
184 views

I'm trying to figure out why this shows a white region instead of color. I tried playing around with the min/max values and I cannot seem to find a solution to get true RBG color. import ee import ...
Brian Bergstrom's user avatar
4 votes
1 answer
90 views

I have a JPEG of a red square, example.jpeg. I use it as webmercator tile 6/36/16. I georeference it accordingly, using the bounds of 6/36/16 (I calculated them like this – details are irrelevant to ...
zabop's user avatar
  • 3,380
2 votes
1 answer
59 views

I have large .tif file, and would like to reproject it and then create COG. But as a final result I have interrupted pixels on edges. How can i remove them? Furthermore, the values are not only 0, ...
Manap Shymyr's user avatar
3 votes
1 answer
83 views

I'm trying to delete all features in a layer hosted in ArcGIS Online. from arcgis.gis import GIS from arcgis.features import FeatureLayer #Login AGOL gis = GIS("https://www.arcgis.com", &...
Bera's user avatar
  • 82.4k
0 votes
1 answer
48 views

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
2 votes
0 answers
40 views

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
112 views

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,380
0 votes
1 answer
31 views

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
48 views

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
73 views

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
67 views

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,380
5 votes
1 answer
200 views

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
59 views

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
61 views

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
87 views

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
98 views

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
190 views

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,380
3 votes
1 answer
87 views

I'm getting an issue plotting countries in an orthographic projection with GeoPandas. It can be seen as a cut through Russia at the top of the image (white in the country and green in the ocean). I ...
WTB's user avatar
  • 33
1 vote
1 answer
61 views

Issue presented using GDAL called from Python I have a TIFF file, src.tiff. I want to reproject it and create a COG, dst.tiff. To achieve that, I do the following: from osgeo import gdal warp_opts = ...
zabop's user avatar
  • 3,380
1 vote
0 answers
67 views

I'm working with PostgreSQL in QGIS and have a Python script that runs when the QGIS session starts. Right now, the PostgreSQL connection requires authentication first, and only after that, the Python ...
Giene's user avatar
  • 1,027
0 votes
0 answers
68 views

I am using the centerlines tool on a complex polygon shapefile. The data are projected in EPSG:27700 (British National Grid). Each time I use the plugin it causes QGIS to crash with the following ...
Tom Edwards's user avatar
1 vote
0 answers
57 views

I try to open a file from Google Cloud Storage (a cloud-optimised geotiff) using rasterio directly without downloading the whole blob manually. In this example, I simply want to download the number of ...
Pierrick Rambaud's user avatar
3 votes
1 answer
89 views

I get WARNING:fiona.ogrext:Skipping field t: invalid type (2, 3) errors when reading a geopackage which has t FLOAT field. The reason seems to be that the subtype of the field is 3 (Single precision (...
Ari Jolma's user avatar
  • 149
0 votes
1 answer
53 views

I currently have a working console command, which translates an ArcGIS Feature Service to a geopackage. The command line is as follows (where ive just replaced the full with the word 'url': ogr2ogr -f ...
nr_aus's user avatar
  • 3,870
1 vote
1 answer
83 views

I have an elevation model in UTM Z13N, it has a single band representing EGM2008 height (EPSG:32613+3855). I want to create an array with the same shape, but each pixel contains the 3 components of ...
DBS4261's user avatar
  • 141
0 votes
1 answer
48 views

I have a situation where the arcpy tool PointsToLine silently fails. Ie, it produces no output and no errors. My script runs the following code: arcpy.PointsToLine_management(position_history_lyr, ...
Son of a Beach's user avatar
2 votes
1 answer
120 views

I am working with GeoTIFF file which is 2 byte 2 channel image. I am trying to create third derived channel which is ratio of first band and second band and trying to save this band in Float32 format ...
Pratiksha Dhavane's user avatar
2 votes
1 answer
86 views

I am working with imagery from Pleides Neo3. I have some raster data in geotiffs and a vector mask as a .GML file. When i open these files in QGIS, the raster and vector data are aligned. The ...
TeeArr's user avatar
  • 23
3 votes
2 answers
267 views

With GDAL 3.12.0dev-c93ac7701e7c5b3b5537598f2dea1e8a382cc81a, released 2025/08/08 I can extract some invalid unclosed rings in a shapefile, but I cannot get GeoPandas to extract them. In order to play ...
swiss_knight's user avatar
  • 11.4k
2 votes
1 answer
92 views

Is it possible to embed custom properties or custom variables on a layer/geopackage file to be used on different projects ? I tried layer.setCustomProperty('key', 'value') but this is only visible on ...
zhifir's user avatar
  • 31
1 vote
0 answers
77 views

I am trying to get the overlap from polygon layers as new polygons. Classifying new polygons based on their overlap with other layers is the goal. I am using union to achieve this. I am getting weird ...
LVMeteo's user avatar
  • 11
2 votes
1 answer
150 views

I've come across both geopandas.GeoSeries.is_valid_reason and shapely.validation.explain_validity, and I'm wondering if they are the same (i.e. if the same checks / the same code is executed under the ...
swiss_knight's user avatar
  • 11.4k
1 vote
1 answer
45 views

I am creating a GET endpoint(FastAPI) which will take the local geojson and raster files and perform the stats and return. But the mentioned error is being thrown. I even upgraded the rasterstats. ...
Balamurugan S's user avatar
0 votes
1 answer
89 views

I have the error: Traceback (most recent call last): File "_________ (removed personal data) default/python/plugins\SDEllipse\SDEllipse.py", line 127, in run self.dlg.progressBar.setValue(0....
Monserrat Torres Ortiz's user avatar
0 votes
0 answers
69 views

I have png file and several ground control points for him (points with pixel and geo coordinates). From reading documentation for rasterio I've got some understanding about how to georeference an ...
Dmitry Malugin's user avatar
1 vote
1 answer
60 views

I'm working with two inputs: a 10-band raster and a shapefile with polygons constructed over this raster. To create a mask of regions in the raster overlapped by the polygons, I use the following: ...
Pryce Houck's user avatar
1 vote
0 answers
73 views

In FME (2025.1.0.1, build 25609 at the time of writing), according to the official documentation, one can install Python packages using this command, e.g. on Windows: C:\<install_dir>\FME> ...
swiss_knight's user avatar
  • 11.4k
1 vote
1 answer
153 views

I have a huge dataset of about 1 million+ features, of which many are overlapping. I would like to remove all the overlaps in each instance of overlap, but keep to top-most polygon. This is for a ...
Hesanka's user avatar
  • 13
3 votes
3 answers
141 views

When opening an ESRI shapefile in QGIS, it shows field names with more than 10 characters: But when trying to load that same Shapefile using fiona (1.9.6): import fiona src = fiona.open(filepath) ...
swiss_knight's user avatar
  • 11.4k
0 votes
3 answers
88 views

I am doing a viewshed analysis on a DEM .tiff file. I would like to convert the viewshed raster into vector geometry in the format of .geojson, which i have achieved, although, the result is not good. ...
Ólavur Nón's user avatar
0 votes
0 answers
39 views

i am fairly new to Moran's I and am currently trying to find out if it's even applicable to my data. I have a collection of binary rasters showing the spread of Bark Beetles between 2018 and 2024. All ...
Sebi's user avatar
  • 11
2 votes
1 answer
184 views

Problem I have a polygon dataset containing many features with holes of various sizes. For my downstream modeling workflow, I need polygons without any holes. The challenge is to remove these holes ...
LeKo's user avatar
  • 21
0 votes
2 answers
100 views

I created a Python script in order to insert a shapefile to geopackage. Have you some advice in order to make this script better (readability, errors manage, etc). I'm open for any suggestion! #...
wilfrid julien's user avatar
1 vote
0 answers
48 views

I am trying to create an interactive map through Streamlit running on Python based around a building footprint shapefile layer, where I can use these building footprint shapes to generate buffer ...
Marvelous_Trex's user avatar

1
2 3 4 5
245