Questions tagged [gdal]
GDAL (Geospatial Data Abstraction Library) is a library for reading and writing raster geospatial data formats.
2,098
questions
0
votes
0
answers
14
views
django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library (when I try to run "python manage.py runserver")
I installed PostGIS 3.3.
That PostGIS 3.3.2 bundle includes
PostGIS 3.3.2 w,
GDAL 3.4.3 (SQLite 3.30.1, OpenJPEG 2.4.0, Expat 2.4.8, FreeXL 1.0.6),
GEOS 3.11.1,
Proj 7.2.1,
pgRouting 3.4.2,
...
1
vote
0
answers
20
views
How to trim nodata values in TIFF
There is a TIFF file, 3 channel. RGB channels contain a frame, with a value of 0.
I have set nodata values for all channels, now I need to crop the snapshot to remove these nodata. How to completely ...
0
votes
0
answers
20
views
Installing GDAL for python in Google Cloud Functions -- error when deploying
I've been unsuccessful in using GDAL in a Google Cloud Function with Python 3.9. I've included gdal in the "requirements.txt" file:
numpy
pygrib
requests
google-cloud-storage
gdal
But get ...
0
votes
0
answers
11
views
I would like to know how to build gdal for C++ with MinGW、MSYS2.And using the gdal in vs code
Recently,I am going to try to build GDAL with MinGW.And it must have the precondition that you should build the proj and SQLite first.But I do not know how to add these libraries in the gdal building ...
0
votes
0
answers
14
views
MapServer (WMS) OAPIF connection - disable schema establishing
According to the Layer Schema GDAL docs GDAL Driver does the following:
OGR needs a fixed schema per layer, but OGC API - Features Core doesn’t impose fixed schema. So the driver will retrieve the ...
0
votes
2
answers
16
views
Question how to use -ts or -tr flags in gdalwarp for resampling
I run a complex cpp application, where gdal (3.5.3) is a part to get elevation data from eudem v 1.1. The eudem files are quite large and I want to reduce their file size, since I don't need an ...
-1
votes
0
answers
12
views
XYZ Tiles without 85 N/S Cutoff
I'm looking for help rendering XYZ tiles for openlayers that show layer content up to the poles, not cutting off at ~85 degrees N/S like a lot of mercator handlers do.
So far I've tried both QGIS + ...
0
votes
0
answers
22
views
R Error in FUN(X[[i]], ...) : '"C:\OSGeo4W\apps\gdal\share\bash-completion\completions\gdalinfo"' not found
Lately I have been encountering many problems I have never seen before in R with geospatial packages, especially GDAL.
In particular I encounter this error (which when I had written the code I did not ...
0
votes
0
answers
25
views
Convert TomTom PBF to Mapbox MVT format
I have downloaded traffic data from TomTom API which as come in the format
https://api.tomtom.com/traffic/map/4/tile/flow/relative0/12/1207/1539.pbf?tileSize=256&key=*****
However, I want to show ...
1
vote
0
answers
24
views
Update parameters of a function in a while loop
I am trying to execute a while loop that holds a function with parameters. However, I have noticed that the parameters inside the while loop are not updated which leads to an infinite while loop. Is ...
1
vote
0
answers
35
views
extract raster values into each polygon in a shapefile in Python
I have a Gtiff layer and a shapefile with 5 polygons that are placed across the Gtiff (both have the same crs). I'm trying to create a NumPy array for each polygon that contains the pixels that are ...
0
votes
1
answer
22
views
Error: /usr/local/Cellar/xz/5.2.4 is not a valid keg
I wanted to install package gdal on my Mac. I ran arch -x86_64 brew install gdal. However, it returned this error:
Error: /usr/local/Cellar/xz/5.2.4 is not a valid keg
0
votes
0
answers
17
views
ValueError: Found input variables with inconsistent numbers of samples: [4620309, 6003]
I couldnt find where is the problem. Can someone help me for this? My code is:
# Import the necessary modules
from osgeo import gdal
import numpy as np
import pandas as pd
# Open the GeoTIFF files ...
0
votes
1
answer
76
views
Merge overlapping rasters using GDAL
I have around 211 rasters, one for each area of the world. The gdalinfo for one of them is below. They are all the same except for the area of concern. Values are always between 1-6.
I would like to ...
0
votes
0
answers
10
views
How to save a raster in RasterField after save in GeoDjango?
I am building an app using Django with PostGIS backend. Thus, GeoDjango. I have a model with FileField, and RasterField [1]. I want to save a raster object to RasterField after supplying the FileField....
0
votes
0
answers
33
views
Confusion using gdaltranslate.exe when rasters overlap
I'm confused about what gdaltranslate is doing here. My understanding is that files are written on top of each other. So the last file, file_b, with 5 NAs in it should be present in the final tif. But ...
-2
votes
0
answers
28
views
OSError: /opt/anaconda3/lib/libgdal.dylib: cannot open shared object file: No such file or directory
I am using windows and installed GeoDjango on my pc but not too confirm how can i add the path to my Django application i.e = GDAL_PATH = ?? not to confirm
I have tried the folder in which my GDAL is ...
0
votes
0
answers
45
views
Trying to build GDAL from github using Visual Studio 2019 on windows 64
I want to use GDAL for a project that I am working on which is written in C++ using Visual Studio 16 2019. I am getting errors and I am finding difficulties in building the library. The steps I ...
0
votes
1
answer
26
views
How to read s3 rasters with accompanying ".aux.xml" metadata file using rasterio?
Suppose a GeoTIFF raster on a S3 bucket which has - next to the raw TIF file - an associated .aux.xml metadata file:
s3://my_s3_bucket/myraster.tif
s3://my_s3_bucket/myraster.tif.aux.xml
I'm trying ...
0
votes
0
answers
23
views
Gdal: tiff image black color rbg(0,0,0) changes to white at zoom in levels)
Gdal: QGIS is changing black/white color for no data values at different zoom levels for a TIFF image - why this happens, and how to solve it?
The image is a GeoTiff with LZW compression. The data is ...
0
votes
0
answers
17
views
When I use C++ GDAL in vs code, some functions show undefined reference to xxx [duplicate]
everyone.
Recently,I am trying to use GDAL for C++ in VS code.But I meet some problems.And I don`t know how to solve it.Here is the problem:
These are my code:
#include<iostream>
#include"...
0
votes
1
answer
51
views
Aggregate with custom function over groups in raster cube
I have raster data on daily temperatures, and I want to aggregate them to monthly 95th percentile.
After some trying and research e.g., help pages of terra::tapp or gdalcubes::aggregate_time I was not ...
0
votes
1
answer
42
views
support for vsi7z (direct reading of compressed 7z files) in terra and sf?
The current versions of terra and sf do not support direct reading of 7zip compressed files, because GDAL does not support it yet. But it seems that this feature will be included in GDAL version 3.7.0,...
0
votes
0
answers
35
views
Lambda Layer for GDAL
I am trying to use the GDAL as a lambda layer in my AWS environment. But I am getting this error response:
"errorMessage": "Unable to import module 'lambda_function': cannot import name ...
0
votes
1
answer
33
views
AROSICS error ... RuntimeError: One of the input images does not have sufficient gray value information (non-no-data values)
I am trying to use AROSICS package (https://danschef.git-pages.gfz-potsdam.de/arosics/doc/usage/input_data_requirements.html) to align an RBG image taken from a drone and a canopy height model ...
0
votes
0
answers
27
views
Installing GDAL via python via a Script
I am trying to install python-gdal and gdal if it doesn't exist in the distribution. This is what I have:
try:
from osgeo import gdal
# gdalVersion = subprocess.check_output(['gdalinfo', '--...
0
votes
0
answers
23
views
Can't import h5py together with geopandas and rasterio
I am trying to extract data from .h5 files (SMAP L4 NEE) for buffer around study sites (points in a .geojson files) and save the data as .tiff files. I have h5py, geopandas, and rasterio installed in ...
0
votes
1
answer
64
views
Where can I find libLerc.so.4 library for CentOS 7?
While working from terminal in conda environment:
gdalinfo filename
Error is:
Gdalinfo: error while loading shared libraries:
libLerc.so.4: cannot open shared object file: No such file or directory
...
0
votes
0
answers
44
views
How can I add geographic information to the data for the entire Arctic?
I would like to add geographic information to this dataset hereand turn it into a geotiff. This dataset has data for the entire Arctic and a corresponding latlonmap in NETCDF format.
I tried ...
0
votes
0
answers
42
views
gdal_config_error: [Errno 2] No such file or directory: 'gdal-config'
I'm running Django rest api with the django 3.2 on GCPUbuntu 20.04.5 LTS (GNU/Linux 5.15.0-1025-gcp x86_64). I'm getting an error when i run my docker containers. I need to use GDAL in one of my ...
-1
votes
0
answers
32
views
Unable to run gdal_calc.py in macOS
I'm having trouble running gdal_calc in terminal. It returns
Traceback (most recent call last):
File "/opt/miniconda3/bin/gdal_calc", line 5, in <module>
from osgeo_utils....
0
votes
0
answers
15
views
Passing additional options to gdal.Translate [migrated]
I have a vrt file defining a transformation of a raster dataset that I would like to turn into a set of gdal.Warp or gdal.Translate commands:
<VRTDataset rasterXSize="100" rasterYSize=&...
0
votes
0
answers
75
views
Extract one band data from Geotiff file and plot colored image based on one band values on folium map
I am new to extracting data from Geotiff files.So this question will sound obvious.I have tiff file which I have got from api.It has 12 bands.This shows definition of what each band contains
What I ...
0
votes
0
answers
24
views
Open Geo Data (GDAL Translate XYZ -> GeoTiff)
Analyze the data structure
Q: What is in the columns of the XYZ file?
Q: Which unit does each column have?
Q: Which coordinate reference system (CRS) is used?
322000.00 5728999.00 17.22 322001.00 ...
0
votes
0
answers
22
views
Install gdal geodjango on elastic beanstalk
what are the correct steps to install geodjango on elastic beanstalk?
got eb instance, installed env and made it two instances now I want to use geodjango on it, I'm already using it on a separate ec2 ...
0
votes
0
answers
34
views
Using Python to add properties in GeoJSON and fill it with calculated result
I cannot find a way to alter a geojson file with the following demands:
add property for every feature
fill property with calculated result
The file I am trying to alter is the following:
{
&...
0
votes
1
answer
42
views
How to query the highest altitude within an area of interest in a DTED?
I have a rectangular area of interest, and each vertex of this rectangle is defined by a pair of coordinates (latitude, longitude).
Parsing a DTED, how could I find the highest altitude within this ...
0
votes
0
answers
27
views
GDAL: how to get the average of n rasters?
I have a list of n rasters and I would like to have a single raster that compute the average of all the rasters.
This the list of files from a python code
files
['../data_revision/LST/day/...
0
votes
0
answers
46
views
Trying to open a Azure blob file using GDAL. Getting an error "does not exist in the file system, and is not recognized as a supported dataset name."
Trying to open a Azure blob file using GDAL. Getting an error "does not exist in the file system, and is not recognized as a supported dataset name."
gdal.SetConfigOption('...
0
votes
0
answers
17
views
gdal_calc.py Error: could not open file "a.geo"
I've had a problem with gdal_calc for a few days that I didn't have before.
Basically, I should recalculate a GEO file and I've always used (via Anaconda Prompt):
python %CONDA_PREFIX%\Scripts\...
0
votes
0
answers
24
views
"django.db.utils.OperationalError: no such function: lwgeom_version" Django Version 3.2.16, Spatialite Version 4.2.0 on Windows 10
I have a Django application that uses some geographic information. I have installed GDAL and installed Spatialite by downloading the windows binaries and placing them in my python directory (conda ...
0
votes
0
answers
29
views
Wrong min value for a geo tif file
I am working on pre-processing a few geo-tif files. I want to obtain the minimum value for my raster image. My OS is Linux and Rasterio version 1.3.3. When I run my script in a conda environment, I ...
0
votes
0
answers
18
views
Gdalwarp validation
I was resizing a Tiff file resolution from 0.08 to 0.5 using gdalwarp
#gdalwrap 'outputfile', 'inputfile'
Then transform the tiff file to csv file.
However, in the end. I need to validate the result ...
0
votes
0
answers
50
views
How to insert OGR Feature into SQL Server database by GDAL C#
I want to insert GDAL OSGeo.OGR feature into my SQL Server database. I make a connection to SQL Server and retrieve some features from table by GDAL OGR and I want to insert these rows (Geometry) ...
0
votes
1
answer
20
views
Execute Python pool.map or pool.apply_async methods in reversed order
I have a script that is iterating through ~40 years of data.
I'm iterating through a list of input monthly files in order, and then assigning those input files to an output function.
Is it possible to ...
0
votes
1
answer
64
views
Not Able to Install Geopandas library using docker
I want to build a Docker container with airflow. The app requires geospatial packages like Geopandas. When trying to build the Docker Image it fails when trying to install Fiona, it says "
...
0
votes
0
answers
49
views
How to run ogr2ogr copy from GML to Postgres from Gdal.netcore library (C#)?
Can I run the same functionality as from beneath commandline in C# using gdal.netcore?:
ogr2ogr -update -append PG:"dbname='postgres' host='***' port='5432' user='***' password='***' -f XML mygml....
0
votes
0
answers
59
views
Adding Metadata to NITF and GeoTiff files
I am building an application to add metadata to nitf and geotiff images. I am using tkinter and gdal to add and edit metadata, which I have been able to do using file.SetMetadata.
What I am not sure ...
0
votes
1
answer
47
views
Coverting Tiff to JPEG with Gdal_tranlate
I'm converting a 16-bit tiff image to JPEG with the gdal_translate library. But it drops from 16 bits to 8 bits. Is here any way that I can keep the bit depth at 16. Or should I need to get tiff image ...
0
votes
1
answer
67
views
How to read a H5 file containing satellite data in Python?
As part of a project I'm exploring satellite data and the data is available in H5 format. I'm new to this format and I'm unable to process the data. I'm able to open the file in a software called ...