The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
0
votes
1answer
27 views

Using raster calculator with GDAL in Python to make sum?

I have 130 rasters in a folder and I would like to create a new raster containing the sum of the 130 raster cell values. How can I do this?
1
vote
1answer
34 views

Using raster calculator with GDAL in python?

i am using an hyperspectral image with 158 bands. I want to calculate raster. i am using the following python script import gdal # Import GDAL library bindings from osgeo.gdalnumeric import * from ...
0
votes
1answer
43 views

Converting GeoTIFF to tiles using gdal2tiles

I have a GeoTIFF of weather radar data that I cannot seem to get converted to a raster tileset using gdal2tiles. When the tileset is generated, there are TONS of empty folders in the output directory, ...
1
vote
1answer
32 views

import gdal, return “ImportError: DLL load failed:”

I came up against this problem during the installation of gdal, I tried several solutions already read on the site but none helped me. Here's what I did: 1) uninstall gdal 2) uninstall Anaconda 3) ...
0
votes
0answers
17 views

Unable to install gdal2tiles on PyCharm

I have installed gdal 2.4.1 while installing gdal2tiles. I am getting this error: ERROR: Could not find a version that satisfies the requirement GDAL==2.4.1 (from gdal2tiles) (from versions: 1....
1
vote
1answer
41 views

How to convert GeoTIFF to array of normalized (0 - 1 range) values using C# GDAL Nuget Package?

I currently have a Unity3D tool that allows users to import different heightmap files into the Unity3d Game Engine, in order to produce Unity Terrain objects. The tool currently has limited support ...
2
votes
1answer
40 views

Python GDAL writing image output all pixels as zeros

I have an array "array" with numbers range from -5 to 1 (with decimal) and I tried to write it as a geotiff. However, the output geotiff turns out to be all zeros. Can someone tell me why? Here the ...
0
votes
1answer
46 views

How can I remove clouds' borders on Sentinel-2 images?

I have to replace area with clouds from another image without clouds. So I have a problem when I remove clouds from my mask I have borders of clouds. I use Sentinel-2 SLC image. For begin I open my ...
0
votes
0answers
26 views

Seeking documentation on DEMProcessing from GDAL?

I am using python 3.X and I am transforming a DEM (from a raster GeoTIFF file) into a slop tif file. I am using GDAL and rasterio to do that. Specifically, I am using the method: gdal....
0
votes
1answer
33 views

Getting string attribute from a shapefile with GDAL Feature.GetFieldAsString(name) returns incomplete value

I read a shapefile (zipped) with GDAL library in C#. Shapefile contains .cpg file with "UTF-8" encoding specified. When I call Feature.GetFieldAsString(attributeName) some of the attribute values get ...
0
votes
0answers
30 views

Many-Many Relationship in GDAL Pixel Functions

I am using pixel functions (in Python) in VRT derived data sets. As far as I know it is only possible to use One-One or Many-One relationships within a pixel function. In other words, the in_ar ...
0
votes
0answers
14 views

GDAL C# Bindings ogr2ogr's clipsrc

I am trying to call ogr2ogr's clipsrc command from C#, but I can't find any reference other than implementing what the command does from scratch. I can imagine Using gdalwarp with c# bindings? is ...
0
votes
0answers
38 views

Python gdal_translate move raster

I would like to translate from TIFF to ASCII, import os os.system("gdal_translate -of AAIGrid -a_srs EPSG:25830 " + 'my.tif' + " " + 'my.asc') But when I do that the ASCII file is moved: ASCII ...
2
votes
1answer
56 views

Convert gnomonic projection to Mercator

I'm trying for some time to convert a weather radar map (gnomonical projection) to mercator (EPSG_3395) and then layout it onto third-party web map so far unsuccessfully. The original image: The ...
2
votes
1answer
55 views

Creating a vector tileset from a vector GeoPDF

I have a georeferenced PDF published by the USFS. It appears to have been created using Esri ArcMap, and all of the labels and linework appears to be in vector format. Is there any way to convert ...
0
votes
0answers
25 views

GDAL project lat lon coordinates to UTM in C

I have dug up some old code I wrote 6 years ago that was doing the conversion from Lat Lon coordinates to UTM. I have tried to run it today and the code returns NaN values. I suspect there has been ...
0
votes
1answer
98 views

Installing rasterio and Fiona together?

I work on Windows; I use Christoph Gohlke wheels; Python 3.7 After installing GDAL-3.0.1 and Fiona-1.8.6 an error occurs on import of fiona from fiona.ogrext import Iterator, ItemsIterator, ...
0
votes
0answers
12 views

Convert black color to transparent alpha gdaldem

So I have a tif and it has a black internal padding or stuff. ------- --***-- --***-- --***-- --***-- ------- So the * are the needed bit, the - however, I need to get rid of. After few web ...
1
vote
0answers
22 views

Converting PBF to Shapefile with name:xx tags as a column in the attributes

I have a PBF file containing only rivers information (extracted using osmosis when waterway=river). A conversion of this PBF to SHP works fine with ogr2ogr when I am selecting fields like "osm_id" ...
0
votes
0answers
19 views

Using gdalwarp, how to first transform and then clip instead of vice-versa?

I have a large number of GeoTiffs that I need to clip by a polygon stored in a shapefile and then save them as a new raster. I use a gdalwarp command which I call from a Python script. These GTiffs (...
2
votes
0answers
21 views

GDAL osgeo for python treating Z dimension differently

I have a space defined by a polyhedral surface, and I would like to check if a point is inside this space, and I would like to do this in python with gdal. After trying the default installation of ...
1
vote
1answer
39 views

GDAL module in python error

I have some troubles with GDAL module on Python. When I try to import gdal, console displays this: Файл "c:/rstp/Lib/site-packages/osgeo/__init__.py", строка 48, из <module> __version__ = ...
4
votes
2answers
68 views

QGIS-3 does not recognize “-3.40282e+38” float raster values as NoData

I have DEMs with "-3.40282e+38" values that are supposed to be the NoData values. However, if the rasters are loaded into QGIS (3.4.11), the value can not get assigned with "add additional no data ...
0
votes
0answers
23 views

Can't Open NetCDF file with GDAL module for Sentinel 3 Data

I downloaded a Sentinel 3B SLSTR Sl _L_RBT file and I am trying to open the Band 8 Nadir Thermal Band (S8_BT_in.nc) in NETCdf format. import gdal ds = gdal.Open( 'NETCDF: "/home/aaron/...
0
votes
0answers
17 views

Mimik -crop_to_cutline from gdalwarp with rasterio.mask

I'm trying to clip a raster with some polygons, some of them lie party outside of the raster. In gdalwarp, if you set -crop_to_cutline, it will fill the exterior part with no data and make it be a ...
2
votes
1answer
67 views

How to clip raster inside of circle (python gdal)

I have a source raster and an ERSI shape file, want to crop the raster into the circle. raster = gdal.Open("raster.tif", gdal.GA_ReadOnly) #read raster projection=raster.GetProjectionRef() ...
1
vote
1answer
78 views

Read RAT (raster attribute table) using GDAL or other python libraries?

Referring to this post, is there any update on the reason why GDAL function band.GetDefaultRAT() always returns NoneType? I can't find much documentation. I've tried to create a RAT for testing (...
3
votes
0answers
34 views

Problem with QGIS GDAL Fill Nodata

I have been using the 'GDAL Fill Nodata' function in QGIS in order to rectify downloaded Landsat 7 images, having created a relevant mask. Whilst said function has been successful in resolving bands 1 ...
3
votes
1answer
113 views

How to change a numpy array's dimensions [closed]

I'm using GDAL Python API to read a raster into a NumPy array, it will return a array's shape like [bands, rows, cols], if we want to use OpencCV to deal with this array, it will cause some problem, ...
1
vote
1answer
31 views

Conversion of MLS/AURA RELATIVE HUMIDITY PRODUCT to correctly referenced GeoTIFF

I have downloaded the following product https://cmr.earthdata.nasa.gov/search/concepts/C1251101764-GES_DISC.html and it gives me a .he5file. Can anyone help me in correctly geo-referencing the file ...
1
vote
0answers
23 views

Split .tif image in Python using GDAL

I am trying to split .tif image that i have downloaded from satellite imaginary. The .tif image is 114MB and has lot of data and i want to split the image into further small images to work more on the ...
1
vote
1answer
51 views

How to compress ecw when gdal_translate from tiff to ecw?

I wish to translate geotiff 16gb to ecw, cause current size is so big. but when I run sudo gdal_translate ppp_2020.tif ppp_compr.ecw -co "COMPRESSION_RATE_TARGET =80" 0...70...80...90...100 - done. ...
0
votes
0answers
20 views

GDAL calc difference between two NDVI rasters

I get a series of NDVI rasters every 2 weeks and need to calculate changes. The rasters overlap, but are different in area. The resolution is also a little different in each raster, raster 1: -0....
0
votes
0answers
19 views

R gdal_grid interpolation results in null values for elevation

I am trying to grid point cloud data. I created a csv with coordinates x,y and elevation z-values. The first lines of the .csv file look like this: "X", "Y", "Z" 666578.24179169,5747856.3361029,-0....
0
votes
0answers
8 views

Image pyramid have wrong colors in Geoserver [duplicate]

Just want to start off with saying that I'm fairly new to geoserver and the fix to this may be very simple. So have managed to create an image pyramid out of a ~14 GB tif file. The files are fine ...
0
votes
0answers
18 views

Preventing Base Map is getting converted after loading the chart as a layer in MapInfo?

Whenever I am loading the chart into mapinfo using MapXtreme the basemap is getting converted. Because of which the chart is not coming in the right place. Can you please check my code what I am doing ...
0
votes
0answers
22 views

ogr2ogr sqlite dialect can't find functions

my question might be related to this Dissolve using ogr2ogr gives 'no such function: ST_union' What I am trying is st_unioning my landparcel polygons based on its group. The code is very ...
0
votes
0answers
15 views

GDAL Rasterize (Vector to Raster) not working with any extent

I am attempting to rasterize a road layer and neither the GRASS nor GDAL routines for this are working in QGIS 3.8.2. All of my data is in UTM. Here is my input (GDAL): { 'BURN' : 0, 'DATA_TYPE' : ...
1
vote
1answer
45 views

Python ImportError with libgdal, undefined symbol: opj_codec_set_threads

GDAL and its Python 3 bindings have been installed through apt package manager for weeks, but, suddenly: from osgeo import GDAL ------------------------------------------------------------------------...
0
votes
1answer
45 views

Setting correct proj4 string/info using GDAL

I am going to try and be as clear as I can - because I don't exactly know what I am doing but I am trying my best. I am sure this is probably simple but I have tried for hours to figure this out. I am ...
1
vote
1answer
73 views

Reproject NetCDF file using gdalwarp?

I'm trying to convert this file to EPSG:3857 with this command: gdalwarp -t_srs EPSG:3857 S2A_rhow_l2r.nc test-proc.nc Warning 1: No UNIDATA NC_GLOBAL:Conventions attribute Warning 1: Several ...
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
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/...
1
vote
2answers
45 views

Converting BMP image into TAB MapInfo format using MapXtreme?

I am developing a plugin for MapInfo and I have BMP image with all the prop and I have rectbounds. I have done through GDAL using the below solution. But I am not getting proper output which I am ...
1
vote
2answers
146 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
0answers
202 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: "...
0
votes
1answer
71 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 ...
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, ...
3
votes
1answer
41 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
2
votes
1answer
51 views

Making polygon shapefile from unsorted point shapefile?

I have a point Shapefile with unsorted feature ID's (FID). I want to convert the same point file into polygon Shapefile by using python gdal/ogr. I got the help from link1 and link2. I'm able to make ...