Questions tagged [gdalinfo]
Commandline utility to list information about raster data.
62 questions
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 ...
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 /...
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 ...
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,...
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[...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
1
vote
1
answer
3k
views
Getting warning when opening NetCDF file using gdal?
I am using windows 7(32-bit) and want to warp NetCDF (nc) files and save the output as GeoTIFF.
First I run gdalinfo first to get the info of the subdataset I need and added NETCDF in the beginning(e....
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 ...
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 ...
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. ...
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 ...
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?
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 ...
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 ...
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 ...
3
votes
2
answers
2k
views
Showing only raster attribute table using GDAL?
I have a binary ArcGRID raster (AIG/Arc/Info Binary Grid) with an attribute table. I would like to get only this attribute table but gdalinfo outputs also projection information and bounds and then ...
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:
...
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
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/...
4
votes
2
answers
3k
views
How to create Raster statistics with GDAL externally?
If I want to create a GDAL PAM statistics file with the command gdalinfo -stats from a GRIB file, e.g. needed for DynamicColorMapping, GDAL only creates the statistics internally inside the sourcefile....
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 ...
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 ...
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, ...
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 ...
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?
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 ...
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.
...
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(...
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 ...
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"):
...
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 ...
-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",
...
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",
...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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-...
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 ...
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
...
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 ...
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:...
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-...