Skip to main content

Questions tagged [gdalinfo]

Commandline utility to list information about raster data.

Filter by
Sorted by
Tagged with
1 vote
2 answers
108 views

What is EPSG:17056?

GeoPDF maps produced in Esri programs by QTopo or nsw.spatial contain EPSG:17056, apparently as the ID/Authority for a UTM CONVERSION. But I can not find EPSG:17056 in the EPSG database, or anywhere ...
OffTrack's user avatar
2 votes
1 answer
110 views

Why doesn't `gdalinfo` with `json` flag report searched but not found attributes?

Motivation I have satellite .tiff data files. I want to understand what information exists in these files. When I run gdalinfo on them, with the -json flag, I don't get any null values from the output,...
Louie_the_unsolver's user avatar
0 votes
1 answer
68 views

How does `gdalinfo` round "STATISTICS_VALID_PERCENT"?

Basically, would 1 valid pixel in a 1,000x1,000 pixel image be rounded to 0 or 1? Would 999,999 valid pixels in a 1,000x1,000 pixel image be rounded to 99 or 100? Based on the tests, it looks like ...
l0b0's user avatar
  • 135
0 votes
1 answer
78 views

How to detect whether a sparse RGBi GeoTIFF is empty using GDAL CLI?

The solution from this question doesn't seem to work with a sparse RGBi GeoTIFF - the last channel is considered valid even though it's empty: ❯ gdalinfo -json empty.tiff | \ jq --raw-output '.bands[...
l0b0's user avatar
  • 135
1 vote
1 answer
361 views

Differences in raster statistics using gdal and gdalinfo

I want to know the basic stats (max, min, mean, std) of my raster file. I use two different methods and get similar, but different results. I assume the results should be exactly the same with any ...
terauser's user avatar
0 votes
1 answer
236 views

How to give a coordinate to *.tif?

I have a *.tif, vintage aerial photo. Also, there is a metadata with coordinate information corresponding to the aerial photo. I would like to give that coordinate to the .tif. First of all, When I ...
Changwan Sun's user avatar
1 vote
1 answer
167 views

gdalinfo retrieve WMS layer abstract

When using gdalinfo on WMS, abstract aren't returned, is there a way to get them ? I only get subdataset name and title. For example, for the first layer I get "DESC=Courbes de niveau", I'm ...
Paul Carteron's user avatar
1 vote
0 answers
244 views

How to debug failing gdalinfo /viscurl?

A gdalinfo is failing as it is stopping forever after naming the Driver: $ gdalinfo "/vsicurl/https://example.com/download/my_file.tiff" Driver: GTiff/GeoTIFF When I download the ...
motorama's user avatar
  • 201
1 vote
1 answer
56 views

gdalinfo on each tile of a vrt

Is there a way to use the gdalinfo tool to calculate the statistics of each tile in a vrt? I would like to get a set of descriptive statistics (min, max, mean, etc.) for each of the slabs that make up ...
Atm's user avatar
  • 1,557
1 vote
1 answer
79 views

gdalwarp without reading the whole file, just coordinates

I'm working with a multiple remotely hosted, large files. I want to apply gdalwarp on them all, but I don't need the raster data; just the new corner coordinates. Is there a way to use gdalwarp ...
Nimai's user avatar
  • 113
0 votes
1 answer
117 views

In Gdalinfo what does Block: 1000x1 means and differ from 1000x2?

I am doing some work on 1k elevation raster tiles and I noticed that after some processing, Gdalinfo shows block:1000x2 while the original tiles show 1000x1. What do the x1 and x2 mean in this case?
Leo's user avatar
  • 701
2 votes
1 answer
54 views

Corner Coordinates with high values from USGS (in NAD27)

I downloaded a GeoTIFF file from USGS (like: https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/HistoricalTopo/GeoTIFF/AZ/AZ_Tatahatso%20Point_313664_1988_24000_geo.tif) I'm trying to get the corner ...
TimG's user avatar
  • 23
2 votes
1 answer
303 views

gdalinfo on partial GeoTIFF file

I'm trying to determine the pixel size and corner coordinates of a GeoTIFF file in a cloud service that I'm developing, before uploading the file completely. So my plan is to upload the first 10kB or ...
Andreas Ekstrand's user avatar
2 votes
1 answer
1k views

Identifying vertical datum of raster

I have a DEM that purports to use the Canadian Geodetic Vertical Datumn 1928 (CGVD28) where heights are normal-orthometric. However, when I run gdalinfo dem.tif from the command line the output for ...
standbybee's user avatar
0 votes
1 answer
57 views

Reading Gdal info

I georeferenced a .tif image (image 1) using QGIS software following the Irish Grid System [EPSG:29903]. After I georeferenced. I see that the image shape is changed (image 2). Image 1 Image 2 Then ...
0xMinCha's user avatar
  • 151
1 vote
0 answers
138 views

GDAL: wrong corner coordinates from KNMI grib file

I'm trying to parse KNMI grib files to extract weather forecasts for The Netherlands. I use gdal.netcore which is a .NET wrapper for gdal 3.2.0. On the website of KNMI they say the following: ...
Carpenter's user avatar
0 votes
0 answers
158 views

Difference in pixel size between gdalinfo and gdal2tiles

I'm getting two different pixel size values, does anyone know what is the reason for this issue? From gdalinfo: From gdal2tiles.py: GDAL version: 3.20
Daniel Shlomo's user avatar
4 votes
1 answer
794 views

Prevent gdalinfo from creating auxiliary file

When calling gdalinfo with certain options, it creates an auxiliary file which has a side-effect on other options. Let’s say I want to compute the min/max value on elevation data from a GeoTIFF file. ...
vdavid's user avatar
  • 308
2 votes
0 answers
113 views

Load gzipped HDF5 layer without decompressing using GDAL

I am interested in loading a VIIRS raster that's contained in a gzipped H5 file, but I get an error. I am using the following command to get the info: gdalinfo HDF5:"/vsigzip/imagery/viirs/test3/...
Nikos's user avatar
  • 380
1 vote
1 answer
349 views

Can Pixel Size be calculated from '-json' output from gdalinfo?

When running gdalinfo without the -json parameter, a field called "Pixel Size" is included in the output. When including the -json parameter, Pixel Size does not appear to be included in ...
Lisa's user avatar
  • 11
1 vote
1 answer
629 views

ogr2ogr PDF unable to open datasource but PDF is recognized fine in GDALInfo

I am attempting to use ogr2ogr to convert a PDF to a SHP through the OSGeo4W shell, part of the QGIS installation (3.6 i think) on windows 10. I have used this before successfully but been a while so ...
Joe N's user avatar
  • 31
1 vote
1 answer
851 views

GDAL understanding multiple EPSG codes for a single GeoTIFF

What does multiple EPSG codes for a single raster image mean ? Is it that the extent spanning across different projection zones.If so how can one generate it using GDAL when an unprojected/GCS image ...
addcolor's user avatar
  • 1,304
2 votes
1 answer
254 views

Obtain raster area using gdalinfo

I'm trying to get the area of a raster (without NULL cells) using gdalinfo, I read the gdal documentation but found no parameter that would give me the area; I can calculate it from the histogram ...
Elio Diaz's user avatar
  • 3,528
2 votes
1 answer
1k views

Showing values from a GeoTIFF

I would like to get a list of the values of a GeoTIFF. Is that possible using 'gdalinfo' command? If not, is there any other software that can show that?
tirenweb's user avatar
  • 133
2 votes
1 answer
274 views

Raster file statistics in R (stars and raster package) don't match gdalinfo

I'm trying to read a gridded binary file in R using read_stars. Comparing the stats from stars package to the stats from gdalinfo, I could see differences in min/max values. Below is the sample code. ...
Surya's user avatar
  • 123
1 vote
1 answer
432 views

How to use GDAL /vsizip/ to access GML file(s) from Sentinel-2 zip package

Which is the correct way to write the path through the *.Zip S2 imagery package to rich the *.GML vector file(s) ? Does someone knows how to correctly write the path to *.GML file for using it with /...
George's user avatar
  • 37
0 votes
0 answers
1k views

Can't use GDAL with Python for opening *.GML file (vector file) from Sentinel-2 (L2A type) imagery *.zip archive

I'm trying to use GDAL 3.0.4 to open some of the *.gml files directly from the Sentinel-2 *.zip archive with following lines: gml_path = f'GML:/vsizip//s2zip_path/path_to_GML_file' gml_ds = gdal.Open(...
George's user avatar
  • 37
0 votes
1 answer
3k views

Pixel Size field in gdalinfo command meaning

What is the meaning of the Pixel Size field in the gdalinfo output on a TIFF image? I have 2 images, one is a PAN image (size 400MB) while one is a DEM (size 25MB). Both are in TIFF format. When I ...
whatdoisay's user avatar
1 vote
0 answers
406 views

gdalinfo returns PROJCS["unnamed"] but QGIS returns the correct projection

I'm trying to understand why my gdalinfo call to a specific file returns "unnamed" for the PROJCS node. The call looks like this: ./gdalinfo /path/to/file/dem.tif. Output (notice the "unnamed"): ...
cosmarc's user avatar
  • 111
0 votes
1 answer
255 views

Calculate the area of a map using gdalinfo

I'm using gdalinfo to get some information out of a map, and want to use it to calculate the area represented by the map. I'm currently doing it (when the units are given in metres), by multiplying ...
Madan's user avatar
  • 11
-2 votes
1 answer
167 views

What do some of the parameters in gdalinfo represent? [closed]

For example, on the gdalinfo documentation, we have gdalinfo ~/openev/utm.tif Driver: GTiff/GeoTIFF Size is 512, 512 Coordinate System is: PROJCS["NAD27 / UTM zone 11N", GEOGCS["NAD27", ...
Madan's user avatar
  • 11
2 votes
2 answers
97 views

Information in gdalinfo not shown

I have a geotiff and I checked it's metadata using gdalinfo.exe: Driver: GTiff/GeoTIFF Files: C:/image_test.tif Size is 3956, 34151 Coordinate System is `' GCP Projection = GEOGCS["WGS 84", ...
arsenal88's user avatar
  • 159
0 votes
1 answer
525 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 ...
Diogo Caribé's user avatar
1 vote
2 answers
2k views

gdalinfo and other applications not running through Anaconda Prompt

I am using GDAL 2.0.3(installed through wheel) in Anaconda 4.2.0 with Python 3.5 installed. I am able to import GDAL in my code. But whenever I am trying to run gdalinfo and other applications(such ...
Shubham_geo's user avatar
0 votes
1 answer
2k views

Using gdalwarp to merge bands into a mosaic created by gdal_merge?

I have created a mosaic with gdal_merge.py using the following command: gdal_merge.py -createonly -separate -co PHOTOMETRIC=RGB -o merged.tif LE07_L1TP_046030_20180810_20180810_01_RT_b3.tif ...
jonesy19's user avatar
  • 107
2 votes
1 answer
1k views

Why does gdalinfo -hist give values outside of [0 - 65535]?

I am running gdalinfo -hist on a 3 band tif file and am getting the following output (see below). Notice it says 256 buckets from -78 to 40184. That's fine, but then when it shows the histogram, ...
jonesy19's user avatar
  • 107
2 votes
1 answer
869 views

Counting the number of layers in a GeoPackage

I'm trying to figure out a best practice for determining what are the names of layers in a GeoPackage and counting the total number of them. I've been able to list all the layers of a GeoPackage ...
Zeitsperre's user avatar
  • 1,398
6 votes
1 answer
7k views

Add bands' name and description to the Metadata when stacking using rasterio

I'm using this code, of @Loïc Dutrieux, to stack 8 Landsat bands. with rasterio.open(final_list[0]) as src0: meta = src0.meta with rasterio.open('stack.tif', 'w', **meta) as dst: for id, layer ...
mlateb's user avatar
  • 139
2 votes
0 answers
156 views

GDAL : transfer metainformation

I'm using Agisoft Photoscan 1.4.2 to build DEM from UAV photos and in last versions thay produce DEM multipage tiff format and I want to convert it to tiff with metainformation preserved. According ...
mrgloom's user avatar
  • 621
5 votes
1 answer
3k views

Why doesn't gdalinfo report pixel size?

When I run gdalinfo (v2.2.2) on a geotiff that I created from a pdf using gdal_translate, I don't get the pixel size as shown in the docs. Does the pixel size have to be explicitly stored in the tif ...
Llaves's user avatar
  • 6,043
1 vote
1 answer
103 views

GdalInfo and Mapserver : Difference between data

I'm trying to create a generic XML response from DescribeCoverage response. For my tests, i used Mapserver 7.0.7 With gdalinfo, i got this : Driver: GTiff/GeoTIFF Files: geostationary_ir-...
Quentin S33's user avatar
3 votes
0 answers
305 views

gdalinfo on NetCDF - cell centers or edges?

I was given a NetCDF file and the gdalinfo result for it shows this: NC_GLOBAL#XORIG=-126.0800018310547 NC_GLOBAL#YORIG=41.45000076293945 The gdalinfo command is showing the lower-left cell in the ...
David A's user avatar
  • 163
3 votes
1 answer
318 views

Trying to store Metadata in GeoPDF

Isn't it possible to store Metadata directly in GeoPDF files using GDAL command line tools (gdal_translate, gdal_edit) or GDAL Python? Something like: gdal_edit -mo "CUTLINE=POLYGON(...)" orig.pdf ...
christoph's user avatar
  • 6,395
0 votes
1 answer
645 views

Problem with GDAL distribution and netCDF support

I have a problem with a GDAL distribution downloaded from http://www.gisinternals.com. It is the "release-1800-x64-gdal-2-2-1-mapserver-7-0-6.zip", downloaded just today. In the information about ...
modestprog's user avatar
1 vote
0 answers
101 views

Why gdalinfo don't show subdatasets in sentinel-2 imageries?

In this article Sentinel-2 products have 'Subdatasets' where I can open the 10 meters resolution bands. But in some imageries there isn't this sector. For example in imagery 'de4388a9-13e1-4c5c-affe-...
FriendsKenny's user avatar
1 vote
1 answer
217 views

Understand gdalwarp and gdalinfo on raster files [closed]

I am using: PostgreSQL 9.5 PostGIS 2.2.1 GDAL 1.11.3 I have two raster files: -rw-rw-r-- 1 jlandercy jlandercy 1,3G Aug 25 21:02 contour_raster.dem -rw-rw-r-- 1 jlandercy jlandercy 2,0G Sep 7 17:...
jlandercy's user avatar
  • 387
2 votes
2 answers
2k views

Export GeoTIFF with color table from web service using gdal_translate

The gdal_translate program has an option to define an XML file with the necessary information to download an image using various web map server specifications. I am trying to download a file that ...
Burrow's user avatar
  • 441
1 vote
0 answers
434 views

gdalinfo corner coordinates off file

When running gdalinfo on an SRTM file, I get the corner coordinates. However, when I attempt to get the elevation at those coordinates using gdallocationinfo -wgs84 file.hgt {corner coordinates} I get ...
user985030's user avatar
1 vote
0 answers
272 views

Changing Ascii grid file inside a GeoJSON polygon

I have a Digital Terrain Model ASCII grid file that gdalinfo recognizes as AAIGrid. Its resolution is 2m. I need to alter it simulate the construction of an embankment, so as to feed it to a modelling ...
Btz's user avatar
  • 398
1 vote
0 answers
440 views

Does gdalinfo report tifftag_datetime capture date?

Is gdalinfo meant to report the date a geotiff was captured? When I run it in qgis the tifftag_datetime seems to report the date it was saved to disk, rather that capture/creation date. Is there a ...
Justin's user avatar
  • 66