Questions tagged [python]
Python is an open source interpreted programming language used in many GIS programs.
12,250 questions
1
vote
1
answer
24
views
Unable to download MODIS emissivity through pystac
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 ...
0
votes
0
answers
35
views
Change ArcGIS Pro's proenv.bat behaviour (don't change working dir)
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 ...
0
votes
0
answers
22
views
Error when converting feature collection to Pandas data frame
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:
...
1
vote
1
answer
56
views
Natural Breaks (Jenks) classification using Python
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 ...
2
votes
2
answers
174
views
AttributeError: 'DataFrame' object has no attribute 'to_file'. Did you mean: 'to_pickle'?
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 ...
0
votes
1
answer
22
views
Uploading style (SLD) to GeoServer using REST API not working - for empty workspaces
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 ...
2
votes
1
answer
184
views
Landsat Imagery comes up all white inside ROI
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 ...
4
votes
1
answer
92
views
Why does gdal.Warp create a black region on the sides of some rasters when it reprojects and cuts them?
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 ...
2
votes
1
answer
59
views
Getting rid off black/RGB pixels on edges caused by during reprojection with Python
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, ...
3
votes
1
answer
84
views
Truncate layer in ArcGIS Online using arcgis.gis
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", &...
0
votes
1
answer
48
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 ...
2
votes
0
answers
41
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....
3
votes
1
answer
123
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 ...
0
votes
1
answer
32
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\\...
1
vote
0
answers
50
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 ...