Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
10 views

GDAL installation on MAC OSX via conda fails

When installing GDAL via Conda, install fails, on OSX Mojave and Python 3.7: dlopen(/Users/tomkom/anaconda3/lib/python3.7/site-packages/osgeo/_gdal.cpython-37m-darwin.so, 2): Library not loaded: @...
0
votes
0answers
7 views

read error after mosaic_rasters in R

I am using mosaic_rasters from gdalUtils to combine different raster files. More specifically, I am using the 12 tiles that cover Southern Africa from the well-known Hansen et al. (2013) forest map (1....
0
votes
0answers
12 views

Combine two Geotif Files using Python GDAL

I have a python project where I have two geotiff files providing different types of information (File A and File B). There is a region of overlap between both files. What is the best way to extract ...
1
vote
0answers
13 views

To identify overlapping lines between 2 shape file using GDAL

I have 2 shape files in and I have to identify the overlapping lines between 2 shape lines. I have tried below code using overlap, It provided me non-overlapping lines as well. while ((jsonFeature = ...
1
vote
1answer
27 views

How do I transform an EPSG:3857 world map to an EPSG:4326 ECE world map?

This follows up a question posted over seven years ago. The results look very similar to the original inquiry without an answer or update I could test successfully. I made a custom stylized EPSG:3857 ...
0
votes
1answer
32 views

“OGR: not enough data error” when using st_transform in R

I'm trying to use st_transform (from the R package sf) on a sf object and am getting the following error when projecting from WGS 1984 to Albers Equal Area: > sf_obj_prj <- sf_obj %>% ...
1
vote
0answers
8 views

Correcting ColorInterp on Jpeg2000 NAIP imagery using .aux.xml

Using GDAL 2.4.0 with OpenJPEG 2000 v2.3.0. gdalinfo reports all four bands of NAIP imagery as "Unknown" colorinterp. Sample image here: https://prd-tnm.s3.amazonaws.com/StagedProducts/NAIP/id_2015/...
0
votes
0answers
12 views

Specifying dimension for variable in NetCDF input file using GDAL?

I have a data which is in .nc format. I want to extract a variable which is in XxYxZ dimensions for example 4032x496x3 inside the netcdf file. But the problem is when using gdal_translate it is ...
0
votes
0answers
22 views

Georeferencing via GDAL

Plugin GDAL didn't work on my qgis 2.18.17. I'm working on linux mint 19 Installed version : Version 3.1.9 (dans /usr/lib/qgis/plugins/libgeorefplugin.so) How i can change the version of GDAL?
2
votes
1answer
18 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
1answer
22 views

Importing GeoPackage into GeoServer?

I've created a geopackage through gdal_translate (overviews with gdaladdo) In geoserver 2.13/2.15 I can create the geopackage store with no problems, but then geoseverver won't fetch the tables/...
0
votes
0answers
12 views

How can I convert MISR(multi-angle image spectro-radiometer) level 2 AOD (MIL2ASAE) swath dataset to grid data

I am able to convert as batch the 'Aerosol_Optical_Depth' data set inside MISR(multi-angle image spectro-radiometer) level 2 (MIL2ASAE) swath data to grid data,which is in .nc format, and in 2 ...
-1
votes
0answers
22 views

Writing and running scripts using GDAL in Python through OSGeo4W? [on hold]

I don't understand where I can execute scripts in which I use from osgeo import gdal. I have GDAL installed in the OSGeo4W package, but when I set up the Python that is in that directory as the ...
1
vote
0answers
11 views

GDAL rastercalc giving unexpected results

I have a raster file containing the following values: data values from 0 to 8488 nodata values values equalling -3.40282347e+38 The values equalling -3.40282347e+38 are presumably supposed to be ...
1
vote
1answer
35 views

Can Gdal.Translate() return an object instead of writing a file?

I have some Python GDAL code I am using to convert a GeoTIFF file to PNG. The code uses the gdal.Translate() function which generates a new file each time I run it. However, I was wondering if there ...
0
votes
0answers
19 views

GDALWarp and Target Aligned Pixels Not Effective

I have two sets of TIFFs of different resolutions (100m and 1000m), different alignment, and varying data types with corresponding no data values. I need to downsample the 100m TIFFs to match the ...
0
votes
0answers
14 views

DLL Load Failed: The specified module could not be found -Anaconda 3 on win10

I know that this question has been asked a lot (e.g., here, here, here, and here), but none of the solutions worked for me. I downloaded the latest Anaconda version (file name - Anaconda3-2018.12-...
1
vote
1answer
30 views

ogr2ogr with GDAL 2.4 not reprojecting correctly

I have downloaded the latest OSGeo4w (GDAL 2.4) and GDAL 2.4 (from GIS Internals site) but I cant get the below command to correctly reproject the shapes in either application. I used the command ...
0
votes
3answers
45 views

ogr2ogr CSV conversion with two points into column names

I have a CSV with ":" in all column names. I am trying to convert it with ogr2ogr to another format. I don't need all fields example for formating: #0:imgID,1:camSN,2:lat,3:lon,...,57:fields ...
0
votes
0answers
8 views

How to read ALOS PALSAR data using gdal

I have downloaded ALOS-1 PALSAR level 1.0 data from data archive from Alaska Satellite Facility. After unzipping files ,I am getting image files,Leader Files,Trailer File and Volume File. All the ...
0
votes
0answers
15 views

Matching Mollweide extent?

I'm trying to match two rasters to same size, so i can do cell to cell analysis on them. The first cell That I'm trying to match is in Mollweide projection, with 250 m resolution. Here is the gdalinfo ...
0
votes
0answers
21 views

GdalDEM slope error in Jupyter

I try to calculate slope data. This is the DEM source https://www.earthenv.org/DEM Firstly, I translate data with gdal.Warp according to image UTM zone. Original image .bil extension so first I ...
0
votes
1answer
27 views

Open 4d NetCDF subdatasets with GDAL in Python

I have NetCDF files containing subdatasets with 4 dimensions: time, height, latitude, longitude. Here is an example of the output of GDAL GetSubDatasets(): ('NETCDF:"Martinique_ALT22.nc":height', '[...
0
votes
1answer
24 views

Gdal not open Sentinel 2A

What is the problem with gdal info for sentinel 2 level 2A? gdalinfo SENTINEL2_L2A:S2A_MSIL2A_20181227T125301_N0211_R052_T24LXN_20181227T145100.SAFE/MTD_MSIL2A.xml ERROR 1: Invalid syntax for ...
0
votes
1answer
42 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
15 views

How to compress DSM with GDAL?

I have a DSM model and I need to compress it to be able to load it in the web browser. I tried many commands with GDAL but none of them is working correctly. For example, I tried this command: ...
1
vote
1answer
40 views

GDAL Python API - statistics valid percent information

I would like to know if the STATISTICS_VALID_PERCENT (percentage of valid (not nodata) pixels) information is accessible through the GDAL Python API? It seems to be missing from the GetStatistics ...
0
votes
1answer
18 views

Get raster coordinates after warping with C# GDAL

I'm currently trying to read a raster file with GDAL and C#. The reading part is fine, but I have troubles with reading the correct bounding box of the raster to map it correctly to the screen. If the ...
0
votes
1answer
30 views

ECW not reocgnized as supported file format in GDAL operation

I've installed QGIS 3.6 for MAC, with GDAL 2.4, ECW GDAL Plugin for GDAL 2.4, and manually installed the libraries from ERDAS ECWJP2SDK 5.4. This allows me to insert ECW files as raster layers in ...
0
votes
0answers
13 views

GDALOpen: “ERROR 1: Too Big for Int” is informative only?

When I use GDALOpen to open an ESRI Imaging .img file I see the error: "ERROR 1: Too Big for Int" Is this an actual error, or a warning? I see no way to avoid the message, It is puzzling since I am ...
1
vote
1answer
40 views

Applying coordinate systems and projections to unprojected images

I have a folder with many unprojected images (i.e. LocX_1_LocY_1.tiff to LocX_32_LocY_32.tiff) which have a naming convention that is associated with a text file that has surveyed locations of the ...
1
vote
1answer
24 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
26 views

QGIS - Missing GDAL Tools plug-in (merging Raster TIFFs of satellite image)

I am trying to install the GDAL Tools plug-in but it is missing from the Plug-ins list. I am looking to merge multiple Raster TIFFs which make up my satellite image basemap, exported using Atlas, ...
1
vote
1answer
21 views

How to access GDAL utilities from command line using Rgdal installation? [closed]

I have just installed rgdal from within R install.packages("rgdal"). I can now successfully do library(rgdal) with the following message: Loading required package: sp rgdal: version: 1.3-9, (SVN ...
1
vote
0answers
30 views

How to convert 4 band GeoTIFF to PNG or JPEG using gdal_translate [duplicate]

I have an orthomosaic GeoTIFF and it has 4 bands. I want to convert it to a PNG/JPEG image to show it on Cesium. I've tried gdal_translate like this : gdal_translate -a_nodata 0 -of PNG 1.tif 1.png -...
0
votes
0answers
27 views

R sf package - link to GDAL

Is it possible to ask R {sf} package to use a GDAL installation I prefer? So far I found how to check external software it uses: library(sf) sf_extSoftVersion() # GEOS GDAL ...
0
votes
0answers
118 views

Why does the output of gdal.RasterizeLayer differ from gdal_rasterize?

Problem I've recently noticed that the output from the gdal.RasterizeLayer function differs from the result I'm getting using the gdal_rasterize utility. I have geotiff of a SAR product that has ...
2
votes
1answer
29 views

gdalwarp - correct for a slight spatial misregistration?

Some Sentinel-2B band images have slight spatial misalignments as I explained on the step forum. https://forum.step.esa.int/t/sentinel-2-tci-10m-level-2-images-slight-spatial-misregistrations/14235 ...
0
votes
1answer
43 views

GDAL Open ZIP returns None

I'm trying to open Sentinel-2 bands directly from the .zip L2A files with GDAL, but this only returns a None. Unzipping the folder prior to reading the file yield better results, but still randomly ...
0
votes
0answers
11 views

Adding points to a gridded XYZ

I have a gridded xyz file that I got from gdal_translate on a tiff file, it's 65,536 points from a 256 x 256 .tif file. I have interpolated another x column of points to make it a 257 x 256 .tif ...
1
vote
0answers
29 views

Importing gdal in Python with anaconda changes environment

I have installed gdal through anaconda. When I run a subprocess in Python before importing gdal I can get that gdal tools are located in my conda environment. For example subprocess.run(['which', '...
1
vote
1answer
21 views

gdal_translate for rotated image [closed]

Even after rotating a GeoTIFF file, the resulting file size do not change. however, the rotated file overlays on the original TIFF file. When I tried gdal_translate with projwin switch an error ...
2
votes
1answer
67 views

GDAL GetGeoTransform Documentation — Is there an oversight, or what am I misunderstanding?

The documentation for GDALDataset::GetGeoTransform says some things that are rather confusing. Fetches the coefficients for transforming between pixel/line (P,L) raster space, and projection ...
2
votes
1answer
84 views

How to create a squared buffer around a point with Python GDAL? [closed]

I have a large collection of points with X and Y coordinates in a projected coordinate reference system (EPSG:28992). I would like to compute a square buffer around it (say, 500 meters around the ...
2
votes
1answer
39 views

sampling error using gdalwarp on a subsetted VRT?

I am currently trying to prepare an SRTM subset including height conversion from EGM96 to WGS84 using gdalwarp. I encountered some strange shifts in part of the image. Here is a reproducible example: ...
0
votes
0answers
32 views

Why gdal create does not give the proper projection?

Here is my code. I want to resample the raster. But it doesn't set the projection, although I write it. May be there is a simplier way to perform the resampling by pixel size? Is it incorrect to set ...
0
votes
0answers
38 views

GDAL install path issues on Mac OSX High Sierra

trying to run Django (django==1.11.9) in a Python 3.6.3 virtualenv with PostGIS. I've installed postgres, postgis, and gdal2 via homebrew. when I run make, the build signals: CPLUS_INCLUDE_PATH=/...
2
votes
1answer
47 views

When is it worthwhile to reproject in QGIS? [closed]

My QGIS project has various raster and (complex) vector layers from different sources, in different CRSes. Using reprojection on the fly, I don't have to reproject them. But should I, especially for ...
0
votes
0answers
31 views

Extracting single band from multiple band raster with PyQGIS?

I'm approaching naw in the script and I'm trying to select many multi-band files from a folder and extract a single band from the file, putting everything in an output folder with the single-band ...
1
vote
1answer
94 views

GDAL and reprojecting a NetCDF file

I have a .nc file that you can download here. This is satellite imagery. I want to re-project this and save it to a new .nc file, without saving to raster. Just NetCDF to NetCDF only. Is this ...