Questions tagged [python]
Python is an open source interpreted programming language used in many GIS programs.
12,256 questions
-2
votes
0
answers
43
views
Which library to use for calculating flow accumulation from DEM raster?
I have acquired the DEM raster for a watershed area. I want to first calculate the flow accumulation using D8(Deterministic 8-Node) algorithm. Earlier in our lab people have used GRASS in Python to ...
1
vote
1
answer
28
views
PDAL: open stream for ' ' with error 'No error'
I'm trying to run a pdal pipeline - which has worked before (on a different computer, different data around 3 years ago) - on a singular las dataset - however it keeps throwing up an error: PDAL: ...
4
votes
1
answer
77
views
Getting Geodesic Area of GDAL polygon in C
I am using GDAL to create polygons for a GeoJSON:
OGRFeatureH hFeature = OGR_F_Create(OGR_L_GetLayerDefn(hOGRLayer));
OGRGeometryH hLinearRing = OGR_G_CreateGeometry(wkbLinearRing);
OGR_G_SetPoint_2D(...
1
vote
2
answers
60
views
Finding out coordinate system in shapefile for PyProj
I ultimately want to create a netcdf masking file that masks different oceans using a shapefile. Now, I am trying to get latitude-longitude coordinates from a shapefile that I have downloaded off of ...
0
votes
1
answer
23
views
Unable to download any product from Copernicus using EODAG and its cop_dataspace provider
I have written the following code to search and download the best product given a set of parameter (e.g. product type, cloud coverage etc.):
from pathlib import Path
import json
import os
from eodag ...
1
vote
1
answer
63
views
Getting projection name from CRS object with PyProj
When I use pyproj to make an ERMapper raster in EPSG 7853, it writes
datum = "GDA2020"
projection = "MGA53
But I cannot see where it gets the "MGA53" string from. It is not ...
2
votes
1
answer
71
views
Converting shapefile point to lat long in Python
This is my first GIS day, I'm reading a shapefile using Python doing:
import shapefile
sf = shapefile.Reader("file.zip")
This file contains Point list, I can read each x,y point doing:
s = ...
1
vote
0
answers
33
views
Stacking rasters into multi-band raster causes value distribution issues
My goal is to stack two seperate single band rasters into a multi-band raster using rasterio. Initially, I seperately check the distribution of each raster. Here are the steps:
import numpy as np
...
0
votes
1
answer
22
views
Indexing yaml file with ODC Python API
I am trying to write a Python script to index ODC dataset yamls. It looks to me as though the ODC Python API is capable of indexing datasets.
I found this bit of code from ODC - Dataset Writing:
...
1
vote
1
answer
60
views
Pyproj UTM database query
I want to open any raster grid with Rasterio, and reproject on the fly to the appropriate UTM.
I cannot get a local UTM datum for GDA94 using the PROJ database query. The returned list is empty. Only ...
0
votes
0
answers
27
views
PostGIS rasters to .zarr
I have a very large PostGIS database filled with small rasters for individual fields on almost daily frequency over ~10 years and for several variables: raw satellite imagery and some vegetation ...
0
votes
1
answer
43
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
81
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
37
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
53
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 ...