Questions tagged [gdal]

GDAL (Geospatial Data Abstraction Library) is an open source translator library & set of command-line utilities for processing raster spatial data formats. As a library, it presents a single abstract data model to the calling application for all supported formats. It also comes with a variety of useful commandline utilities for data translation and processing.

Filter by
Sorted by
Tagged with
2
votes
1answer
2k views

Using GDAL to read data from GRIB file in Python?

I am attempting to use GDAL to read corresponding latitude, longitude, and temperature values from a GRIB file. I would like to store these data points in a 2-D list. I was able to do this using the ...
1
vote
1answer
20 views

installing gdal from osgeo to work with GeoTIFF

I just installed Anaconda Navigator (and nothing else) in Windows and want to be able to work with GeoTIFF files in Spider (Python 3.7). It is my understanding that Navigator can search for packages ...
3
votes
1answer
96 views

Writing Non Spatial Table into Geopackage - Python

Just wondering how to write a non spatial (aspatial) table to geopackage using python. I have attempted using Fiona, geopackage = 'some_geo.gpkg' layer = 'test_layer' schema = {'geometry': {'type'...
0
votes
0answers
242 views

TypeError: 'int' object does not support item assignment

I am trying python for the first time. I have a raster layer of Type Float32, and another raster output of Type Integer created from this raster layer outside the python code. I want to scan every ...
2
votes
1answer
92 views

Over writing one large DEM over another in QGIS or GDAL

I want to over write/mosaic one large DEM (around 3gb file, Geotiff) over another. What is the best way to do this? Both cover roughly the same region, one is based on 2m res LiDAR, the other 1m res ...
1
vote
1answer
384 views

gdal.rasterizeLayer in QgisPython results in Nan values

I have a vector layer projected in WGS84. I would like to use gdal.rasterizeLayer() from the python console to convert it to a raster. I would like to burn values from a field. I followed the gdal ...
2
votes
1answer
619 views

QGIS 3.0.3 python error “/bin/sh: gdal_polygonize.py: command not found”

I have recently downloaded QGIS on my Mac to preform an analysis for my dissertation. I am trying to convert my raster data to polygon data using the gdal_polygonize.py tool provided by QGIS. ...
0
votes
1answer
2k views

GDAL 2.3.1 is installed but the llinux terminal is using GDAL 2.2.2

I asked this question before realising this site existed: https://stackoverflow.com/questions/51476826/gdal-2-3-1-is-installed-but-the-llinux-terminal-is-using-gdal-2-2-2 I've installed GDAL 2.3.1 ...
3
votes
1answer
43 views

Problems with analyzing MODIS Aerosol Optical Depth

I want to extract AOD from the following hd5 file.Would be grateful for any help. Objective is to have a tif file projected in EPSG:4326 with values of all 3 bands. https://e4ftl01.cr.usgs.gov/MOTA/...
0
votes
1answer
70 views

Mapbox GL JS : Setting bounds of raster tile layer

I have some weather radar data as a raster tileset. Mapbox documentation states that raster tilesets will default to the size of the world on the map unless otherwise specified. Here is my code for ...
1
vote
1answer
112 views

Create elevation-service from geotiff using python and gdal

I'd like to create a little server for us, that tells us the elevation of a point in a geotiff file. I already got it working basically using the following: dataset = gdal.Open('test_file.tif', gdal....
1
vote
1answer
389 views

Get all points from multiline in shapefile using C# and GDAL

I'm trying to read a shapefile and draw it using DirectX and GDAL library. So first I will read the shapefile and get a list of all the points in the shapefile. It works with linestring using GetPoint(...
1
vote
2answers
70 views

Tools for georeferencing PDF's [closed]

5 years ago I exported all our PDF record drawings to TIFF and georeferenced them using Esri Arc Desktop. This added the .tfw file associated with georeferenced images without modifying the original ...
2
votes
0answers
241 views

Reverse parameters of a projection map / guess which geographic project is used

I'm user of a soaring simulator named "Condor Soaring". This simulator is at the center of a community of enthusiastic people who build sceneries (landscapes) which represents quite accurately real ...
3
votes
3answers
3k views

Displaying netCDF data with correct CRS?

I successfully extracted some data from a netCDF file with a single variable E. (the original file was taking ages to load). I used the following code to extract the data: ncks -d lon,24.,36. -d lat,...
1
vote
2answers
145 views

Reading big raster getting warnings using GDAL Python

I am trying to use GDAL Python API to deal with some big raster, and when I read these rasters into Python, I get warnings like that: Warning 1: TIFFFetchNormalTag:ASCII value for tag "GeoASCIIParams"...
2
votes
1answer
110 views

Is there a GDAL function similar to OpenCV's WarpPerspective?

I't trying to mosaic a GeoTiff raster against another. Initially, they were both georeferenced in WGS-84 CRS. Using OpenCV, I calculated a homography transformation (a 3x3 projection matrix), that ...
2
votes
0answers
195 views

“RasterioIOError: This is a BigTIFF file. BigTIFF is not supported by this version of GDAL and libtiff” error message

I am trying to read a raster ".tif" file with rasterio: import rasterio raster_path = r'.........\file.tif' raster = rasterio.open(raster_path) but I am getting the following error message: "...
2
votes
1answer
81 views

PyQGIS: GDAL hillshade patchwork effect

I have used QGIS to batch import and visualise tiled elevation data. This is illuminated greyscale, with identical parameters used each time, so I would have expected the result to be seamless and the ...
0
votes
0answers
16 views

Convert sounding depths from NOAA S-57 ENC to GeoTIFF

I want to rasterize an ENC I downloaded from NOAA (https://www.charts.noaa.gov/InteractiveCatalog/nrnc.shtml) in order to have a XYZ grid of sounding depths. I should think this is an easy process, ...
0
votes
2answers
59 views

Invalid geometry after gdal.polygonize

After converting a raster file to a vector file using gdal.polygonize, I cannot carry out further commands (e.g. Clip) because the vector is produced with invalid geometries (as determined by the QGIS ...
3
votes
1answer
40 views

Find duplicate point geometries in a shapefile [closed]

How to find a duplicate point geometries in point shapefile (around one lakh geometries) using Python OGR/GDAL
3
votes
3answers
782 views

Error in using GDAL Java binding

I am using the Java binding of GDAL to project a set of coordinate points from UTM to lat/log using the CoordinateTransformation Class of GDAL. I have written the code as follows: SpatialReference ...
0
votes
0answers
20 views

Performing cs2cs datum transformation using GDAL?

I'm using GDAL 3 to perform datum transformations. I'm trying to transform coordinates from a local datum to WGS84 using the following command: cs2cs +proj=latlong +ellps=clrk80 +towgs84=-166,-15,204 ...
0
votes
0answers
32 views

EWKT Support in GDAL/OGR CreateGeometryFromWkb

We're using geoalchemy2 Geometry Columns to store points to a postgis DB. The Column seems to return an EWKBElement which ogr fails to interpret correctly as the following test shows: import binascii ...
0
votes
1answer
96 views

.Tif to .GeoTiff Scaling issue using GDAL

I was trying to georeference a .tif file generated from a matplotlib output using GDAL's python bindings and it seems to be off-scale. My objective was to create a geotiff file from the output of a ...
1
vote
1answer
90 views

Cutting a portion of a satellite image based on coordinates in GDAL?

I have a satellite image of 7-channels (Basically I have seven .tif files, one for each band). And I have a .csv file with coordinates of points-of-interest that are in the region shot by the ...
0
votes
1answer
160 views

Copying raster to SQLite using GDAL?

I want to copy a raster file into SQLite database. Previously, I did the same with vector data like this: def store_vector_output(self, file_name, identifier): from osgeo import ogr drv = ogr....
1
vote
0answers
21 views

Resample a raster to the grid of another unaligned raster using GDAL/pktools

Is there a way to resample a raster to the grid of another raster using Bash utilities (GDAL or pktools), if both of the rasters do not necessarily have their origins aligned (and without an ...
0
votes
0answers
84 views

NotImplementedError: Wrong number or type of arguments for overloaded function 'CoordinateTransformation_TransformPoint'

Hello I am new to working with GeoTiff data and I am trying to grab lat/lon values from a tiff image. Here is my code: import gdal import matplotlib.pyplot as plt import osr # open the dataset and ...
2
votes
1answer
242 views

Error reading envi file from zip using /vsizip and gdal in python

I am having an issue reading an envi binary file (with .hdr file) from a zip file using gdal in python and the /vsizip driver. I know the envi file (binary and header) itself is fine, since when I ...
1
vote
1answer
29 views

GDAL's Python wrappers don't load correct asc header informaton

I have a Python script that I am using to load .asc raster files and then work with the contents therein. However, it isn't loading the correct information that is specified in the headers. The .asc ...
0
votes
1answer
75 views

GDAL - creating tiles from TIFF with world file

Several years ago I created multiple tiles (xyz) from orthophotomaps using GDAL with success but now I'm getting this error and I don't know what I'm doing wrong. This is the error: Traceback (most ...
0
votes
1answer
133 views

AttributeError with ExecuteSQL

I'm using the Python bindings for GDAL to do some processing on a set of satellite imagery. In my preprocessing step, I'm attempting to use ExecuteSQL; however, I've been getting a strange ...
0
votes
0answers
11 views

Parse Error After Updating GDAL Version

I have been running GDAL 201-1800 MSVC 2015 and GDAL-2.1.3-cp36-cp36m-win32.whl. I recently updated to GDAL 300 MSVC 2015 and GDAL‑3.0.1‑cp36‑cp36m‑win32.whl. My apps are built using c# in Visual ...
0
votes
1answer
155 views

Convert multiple bsq files to jpg images in python

I am trying to convert a big number of bsq files to JPEG images. I found the way to do it only for one file but I cannot figure out how to put it in a loop in order to run repetitively all the files ...
1
vote
1answer
283 views

Extracting certain portion of a geotiff with node-gdal

I use node server. And I want send coordinates of an area then extract related portion of the geotiff file (dem) using node-gdal. Is it possible to do this with node-gdal?
1
vote
2answers
81 views

Installing GDAL extensions in Geoserver

I'm trying to get GDAL extensions to work in a Geoserver standalone installation. I'm following these instructions: https://docs.geoserver.org/latest/en/user/data/raster/gdal.html Upon starting ...
1
vote
1answer
181 views

compile gdal with ESRI FileGDB_API Ubuntu

I'm trying to build GDAL on Ubuntu 16.04 with ESRI FileGDB_API driver support. I've followed the instructions here: https://trac.osgeo.org/gdal/wiki/FileGDB and have attempted to pass the location of ...
2
votes
1answer
34 views

stack_raster.cpp:35:99: error: 'YES' was not declared in this scope

I've been playing around with C++ and the API for GDAL to create some functions that I have done using Python. One of them was to create a virtual raster based on a list of files found in certain ...
0
votes
1answer
585 views

Installing Python bindings for 64-bit Python on Windows

I installed GDAL and its Python bindings from GISInternals. While I believe that GDAL was installed correctly, the Python bindings have an issue. After opening a file with gdal.open I cannot read ...
1
vote
0answers
100 views

Understanding gdaltindex Limitations?

I was wondering if there is a size, or count limitation with gdaltindex. I ran the operation from within OSGeo4W via a Python script, and from within QGIS 2.2 (Windows) and had issues processing a ...
1
vote
1answer
38 views

Measuring distance between features in linear units from vast layer in geographic coordinates in gdal

I have a point layer for a large area. The layer is in a geographic coordinate system. I need to make some distance-aware work with features from this layer. Actually, I need to build a buffer-layer ...
1
vote
1answer
51 views

Offset in GeoTIFF coordinates Google Earth Engine extracts

I download a certain geographic location (lon,lat) with buffer radius around for MODIS products, such as MCD43A2/MCD43A4 from Google Earth Engine using ee, such as: lon = 10.452175 lat = 51.079206 ...
0
votes
0answers
14 views

Correcting an inaccurate edge effect on MODIS L2 swath data?

I am currently trying to process a MODIS MOD10_L2 product (Snow Cover 5-Min L2 Swath 500m, Version 6) to extract snow cover information. It's in HDF-EOS format and I process it with GDAL in Python and ...
0
votes
1answer
165 views

Why GDAL is not running in Python 3.7.2 powershell

I installed GDAL 2.4.0 core and GDAL-2.4.0.win32-py3.7 to run my code but it is not working
0
votes
0answers
20 views

Grid specification with multiple z fields/attributes in VRT-file in GDAL

I am trying to transform a csv file into a tiff-file (raster). As a first step I am creating a VRT-file. My csv has the following row structure: E_KOORD,N_KOORD,Z1,Z2,Z3 How do I correctly specify ...
2
votes
1answer
24 views

GDAL Raster: How to obtain the cell ( and also the position) where maximum occurs?

I can obtain the maximum/minimum value of a raster via the ComputeRasterMinMax code: using (var ds = Gdal.Open(tiffFile, Access.GA_ReadOnly)) { var nCol = ds.RasterXSize; var nRow = ds....
2
votes
1answer
213 views

How to close open files after processing.runlag() command (Qgis: Error No 24)

I'm creating a pyqgis script. In this script I use the processing.runalg command several times. The problem is that these processes are within a for loop. After several iterations, the error number 24 ...
1
vote
0answers
26 views

Calculating percentage/fraction of thematic pixels with coarser resampled pixels in QGIS/GRASS

I am using QGIS 3.4.9 on Mac OS10.13.6. How can I edit raster data type to change it from thematic to continuous/quantitative? details: I am trying to calculate the fractional (percentage) ...