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
1 answer

how to install fiona on windows

i am trying to install fiona package. i tried to install it via pip command and as a wheel, but either of them fails and i get the below posted error. GDAL, shapely and psycopg2 are installed. please let me know how to install fiona on…
Amrmsmb
  • 1
  • 27
  • 104
  • 226
0
votes
0 answers

'str' object has no attribute 'get' when creating a mask on dataset

i am trying to make a mask on a dataset as follows: out_image, g= rasterio.mask.mask(dataset=NDVIsTIFFAsDataset, shapes=bufferedTreatmentAsGeoJSONInEPSG3857) the value of the shapes parameter is shown below in the geojson-section. when i run the…
Amrmsmb
  • 1
  • 27
  • 104
  • 226
0
votes
1 answer

Handle PostgreSQL transaction errors in GDALVectorTranslate

In c++ I'm using the GDAL library for importing geo-spatial files into Postgres/PostGIS. The GDAL library will create a table in the Postgres database and insert the data. But I can't figure out how to handle errors during the inserting of data. I'm…
Martin Hoegh
  • 465
  • 3
  • 17
0
votes
1 answer

Make use of multiple cores using multiprocessing converting lidar point cloud files to raster

I have many classified lidar point cloud files, which I want to convert to geotiff raster files. For that I wrote a function that creates a json-Pipeline file that is required for conversion with PDAL and then executes that pipeline. tiles = [] for…
sfluck
  • 345
  • 1
  • 2
  • 8
0
votes
1 answer

Installing GDAL in Anaconda on an offline machine

I have an offline windows machine with anaconda 2021.5, and I want to install GDAL on it. I am able to install it onto my online computer, but i get multiple conflicts when installing it on my offline computer I have tried installing it on my online…
0
votes
1 answer

Getting GRIB2 Lat/Lon Information from GDAL

I am attempting to plot fields from a GRIB2 file of GFS model data (example file: https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.20220202/12/atmos/gfs.t12z.pgrb2.0p25.f006 ). Normally I would just use PyGRIB and I'd have this problem…
0
votes
0 answers

having trouble installing osgeo to work with gdal

I'm using Ubuntu 20.04. My goal is to add georeferencing to an image. I have a simple script below. It's confusing because I have gdal installed, but I can't call it by itself. I need to use "from osgeo". When I try to install "osgeo", it fails…
user1475191
  • 121
  • 1
  • 1
  • 5
0
votes
0 answers

raster to vector python gdal

I am trying to convert a raster file to polygon shp, but when I do, the values in shp came out as integer, although I want the values to be float and equal to the values in my raster. the code used was as the one below: from osgeo import gdal from…
Dnl_
  • 55
  • 9
0
votes
2 answers

How to print out the current working directory of gdal package in python?

I have searched around and have not seen a way to print out the current working directory for the gdal package in Python at all in Stackoverflow. Is there a method that I am missing? I did not see any method related to current working directory for…
windsound
  • 706
  • 4
  • 9
  • 31
0
votes
1 answer

Reprojection of North Polar Stereographic binary to Lon/Lat grid (rasterio or gdal in python)

Now, I am working on Stage IV dataset (Precipitation dataset in CONUS). https://data.eol.ucar.edu/dataset/21.093 This is a binary data that shapes (1121 x 881) array and local 4km polar-stereographic grid. The header files includes; "polar stereo:…
TBan
  • 1
0
votes
0 answers

Read specific characters in .hdf files and then convert them to .tif files

I have two MODIS images over a decade which are distinguished by "h11" and "h12" in the filename. How can I specify to list files with "h11" in one variable and then with "12" in another variable, which will then be converted to .tif files. The…
Yogi
  • 45
  • 6
0
votes
1 answer

GDAL python : How to convert GEOTIFF to TIFF

I would like to convert a GEOTIFF to a normal TIFF with python. I'm trying to use gdal but cannot if more than one page.. How can I do it please ? Thanks for help
0
votes
1 answer

Python GDAL: Count the number of pixels of the raster image using a range of pixel values

I have some raster files and I want to count the number of pixels in each file with pixel values falling in between some specific range. I tried the following code, though it runs but produces wrong number of pixels. Code: import os, sys import…
Asif Marazi
  • 127
  • 2
  • 11
0
votes
1 answer

Compile GDAL with GEOS

How can I compile GDAL with GEOS support enabled? I managed to compile it in release only but I need a debug dll too. Is there a Tutorial somewhere?
Roots19
  • 13
  • 3
0
votes
1 answer

GDAL batch conversion of TIFF to PNG

I have several hundred tiff files that I need to convert to png. I have a script that does this conversion one file at a time, but can not figure out how to loop through all of the tiff files at once and convert to png files with otherwise the same…