Questions tagged [gdal]

GDAL (Geospatial Data Abstraction Library) is a library for reading and writing raster geospatial data formats.

GDAL (Geospatial Data Abstraction Library) is a library for reading and writing raster geospatial data formats.

2184 questions
0
votes
0 answers

Can't create Anaconda enviornment. Stuck at solving Environment

i am trying to create a conda enviornment but it alwas stuck at solving envrironment. i have installed fresh copy of lateset ubuntu. i also tried several previos versions of ubuntu and also tried with several previos versions of anaconda. i am…
0
votes
0 answers

How to do path finding in a 3D DEM data?

I want to implement a path finder using python which can read a DEM file and add some 3D obstacles into it and then find the optimal path from any point A to B. I have tried using GDAL least cost path, but its very slow and we cannot add obstacles.
Ajin Ra
  • 1
  • 1
0
votes
0 answers

Converting EPSG 2056 GeoTIFF files to NetCDF format

I am trying to convert GeoTIFF (.tif) files to NetCDF (.nc) format. These files are in the Swiss coordinate system (EPSG:2056 - Swiss CH1903+ / LV95) but unfortunately, when using standard GDAL commands, the conversion fails. Often a netcdf file is…
0
votes
0 answers

Is there a way to get data from a PNG map to a GeoJSON

I have a map which was published in PNG format without its underlying data : Map produced by the French Gov I also have this GeoJson of every district in France. Visualisation of GeoJson file I need a file that would contain the content of the map…
EloidCmx
  • 1
  • 1
0
votes
0 answers

Converting dataframe to GeoTiff file in python

I have a dataframe which contains locations (x,y) and data (z), pertaining to an area inside an irregular shaped polygon shape file. I am trying to convert the dataframe to a Geotiff file with WGS 1984 as coordinate reference system. I have tried…
srinivas
  • 301
  • 1
  • 9
0
votes
0 answers

pyProj gives incorrect results

I'm trying to use pyProj to convert UTM coordinates from WGS84 UTM 30N (epsg 36230) to ED50 (epsg 23030). My WGS 85 coordinate is 456859.248 E, 6212329.347 N. When I convert using this online convertor…
Dave Stark
  • 107
  • 8
0
votes
0 answers

how to set USE_PATH_FOR_GDAL_PYTHON=YES environment variable to feed the PATH into os.add_dll_directory()

I need to import gdal and I use from osgeo import gdal I've been using gdal couple weeks with no error messages, but when I imported gdal today it show: On Windows, with Python >= 3.8, DLLs are no longer imported from the PATH. If gdalXXX.dll is in…
TuHsin
  • 1
  • 1
0
votes
0 answers

Read / Write array with Python GDAL and multiprocessing

I have an image with a large number of bands and I want to perform some operation on each band, then output it to a new image. To speed things up, I want to use multiprocessing in a way that every process is working on one image band, but I get a…
s6hebern
  • 725
  • 9
  • 18
0
votes
1 answer

python gdal not processing grib file properly on CENTOS linux

I am trying to use python gdal to process a grib2 file into a geotiff file based on the following example: https://geoexamples.com/d3-raster-tools-docs/code_samples/vardah.html based on this I have the following code: import gdal import osr ds =…
jms1980
  • 1,017
  • 1
  • 21
  • 37
0
votes
0 answers

GDAL Build error: PROJ_INCLUDE should be defined. PROJ >= 6 is a required dependency

Before this is marked as duplicate, I have looked at this post already and it doesn't seem to be valid anymore. I have followed the steps of installing OSGeo4W and making sure PROJ is selected as one of the downloads, however the files required to…
justanotherguy
  • 395
  • 4
  • 17
0
votes
1 answer

OGR2OGR PostgreSQL / PostGIS issue after enabling postgis extension on import

I'm running psql (PostgreSQL) 14.5 (Homebrew) with PostGIS extension version 3.3 I'm using gdal's ogr2ogr to import geojson files. ogr2ogr -f "PostgreSQL" PG:"dbname=test4 user=myuser" "myfile.geojson" If I import all files into a new database and…
Brettk80
  • 1
  • 1
0
votes
1 answer

Why is Mosaic rasters not working in some files?

I want to create a new raster from 2 tiles. For the date "247" everything works fine. But for the next date "248", the raster I'm getting in return is only the first tile h12v12, is not merging the consecutive one (h13v12). This is just an example.…
0
votes
0 answers

ERROR 2: Internalize failed ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0

I used GDAL RasterIO to read multi-band geotiff, when I apply it to the same band, it is ok, but when I appply it to tow different bands, the error occurs. GDALRasterBand *tmpBand1 = img_sar->GetRasterBand(1); GDALRasterBand *tmpBand2 =…
0
votes
1 answer

get elevation from lat/long of geotiff data in gdal

I have a mosaic tif file (gdalinfo below) I made (with some additional info on the tiles here) and have looked extensively for a function that simply returns the elevation (the z value of this mosaic) for a given lat/long. The functions I've seen…
Griff
  • 2,064
  • 5
  • 31
  • 47
0
votes
1 answer

rasterize a shapefile using python

I used following code to rasterize my polygone layer, but it gives the TypeError: in method 'Driver_Create', argument 3 of type 'int' please let me know what is the problem and how I should solve it. import os from osgeo import gdal, ogr, osr import…
user3713988
  • 13
  • 1
  • 7