Questions tagged [python]
Python is an open source interpreted programming language used in many GIS programs.
12,253 questions
0
votes
0
answers
45
views
Why do point locations in Japan National Police Agency accident open data appear on a regular grid — environment issue or data property? [closed]
I am a beginner in GIS analysis and I am trying to understand whether an
unexpected spatial pattern I observe is caused by my environment/tools
or by the data itself.
I am working with the Japan ...
0
votes
1
answer
29
views
Using API Key to download data from OPEN ET to ArcGIS Pro
I am getting this error when I plug the code down below into the ArcGIS python window to test the compilation of the script. When I do add values for reference_et it spits out that the "etr" ...
1
vote
1
answer
48
views
"builtins.ValueError: year 0 is out of range" error while iterating through features in layer with Fiona
I am getting the error:
builtins.ValueError: year 0 is out of range
while attempting to iterate through a layer's features using Python (3.12) and fiona. GDAL 3.11.4. My searches indicate that this ...
0
votes
0
answers
23
views
openeo.connect() Error
I am trying to use the Sentinels interactive image downloader script that I found here.
I installed all dependencies including the openeo package. As I attempt however to build a connection with the ...
1
vote
2
answers
45
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
45
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
27
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
83
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
183
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
28
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
195
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
100
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
67
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
89
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
51
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 ...