Command line utility to convert raster data between different formats.

learn more… | top users | synonyms

1
vote
1answer
14 views

gdal_translate using /vsistdin/ and /vsistdout/ to pipe commands

I am trying to pipe some of my commands with gdal_translate's output. These commands should read from standard input, so I'm writing to /vsistdout/. However, I am getting some errors. To be a bit more ...
1
vote
0answers
30 views

Why is GDAL/QGIS creating Geospatial PDF's with erroneous spatial data?

I have a GeoTiff that I wish to convert into a geospatial PDF for use in Avenza. I attempted to use gdal_translate, and also used the QGIS's Raster->Conversion->Translate which apparently just builds ...
4
votes
1answer
25 views

Gdal_translate command for SDS having spaces in its name

Can anyone help me with using gdal_translate on an HDF4 dataset that a space? One SDS in the the HDF is: ...
0
votes
0answers
15 views

Specifying column to use in gdal_translate

I am using gdal_translate to convert a tiff file to ascii. The tiff file is a raster with several columns in the attribute table. How do I specify to gdal_translate, which column to use for creating ...
7
votes
0answers
171 views

PyQGIS save raster as rendered image, then use GDAL tools on it

I have tried to use the code from QGis Save Raster as Rendered Image. i is a raster layer: pipelayer = i pipeextent = pipelayer.extent() pipewidth, pipeheight = (pipelayer.width(), ...
1
vote
1answer
27 views

Bad corner coordinates transforming SRTM *.hgt files to GRD format using gdal_translate

I'm transforming some SRTM *hgt files (1 second resolution version) to GRD format using dal_translate. For example, one of my orders is: gdal_translate -of AAIGrid N43W001.hgt N43W001.grd The ...
3
votes
1answer
53 views

Geo-Referencing an image from google maps with gdal_translate

I am trying to geo-reference an image using gdal_translate in a command prompt. Currently I have the following gdal_translate.exe -of GTiff -a_nodata 0 --config GDAL_DATA "Config location" -a_ullr ...
1
vote
1answer
73 views

Transform an image with projection EPSG:4326 to EPSG:3857

I have an image with known boundary and projection EPSG:4326 and want to overlay it to openstreetmap using Leaflet.js. I have tried using function imageoverlay, but the image is not aligned with the ...
3
votes
2answers
70 views

Can GDAL extract a raster window from disk without loading the whole file to memory?

I have a 500MB GeoTIFF with 3 bands on disk. I can easily read a very small, 25x25-pixel subwindow using GDAL like so: gdal_translate -srcwin 600 550 25 25 hugeimage.tif smallwindow.tif Does this ...
0
votes
1answer
40 views

GeoServer WMS: Retrieved GeoTIFF band contains integer values instead of floats

I am using gdal_translate to import a GeoTIFF into an oracle database. The import as well as the layer creation in GeoServer works without errors. GeoServer correctly recognizes the band data type as ...
1
vote
2answers
46 views

gdal_translate crashes on huge jp2

I have 44GB jp2 file, I want to translate it to tif file, but once it reaches 10% it crashes. No messages, just stopped. This is my command: gdal_translate.exe -of GTiff --config GDAL_CACHMAX 8000 ...
1
vote
0answers
35 views

Handling warning about DX and DY in gdal_translate from .Gtiff to .ASC?

When I try to convert Gtiff to .asc file, QGIS shows the warning: Producing Golden Surfer style file with DX and DY instead of CELL SIZE since the input pixels are non-square. Use the FORCE CELL SIZE ...
1
vote
1answer
25 views

How to make transparent the Index 0 of the color table of a Tif/GTiff/GeoTiff using gdal?

With a Tif file, I'm trying to generate tiles using gdal tools. gdalinfo gdalinfo I_III_IVA_MRA_WGS.tif | more Output Driver: GTiff/GeoTIFF Files: I_III_IVA_MRA_WGS.tif Size is 17119, 23309 ...
1
vote
1answer
102 views

Converting large jp2 files using gdal

I have a bunch of jp2 files with size going from 40MB to 1GB and I need to convert them all to a .tif format. When using gdal_translate for the small files (having the jasper driver to support jp2 ...
0
votes
0answers
37 views

How to transform any GTiff to Lambert Azimuthal Equal Area with GDAL?

I am trying to transform a GTiff EPSG:4326 +proj=longlat +datum=WGS84 +no_defs and a GTiff EPSG:31982 +proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs both to ...
1
vote
0answers
47 views

GDAL - replacing rgb value (0,0,0) with (nodata,nodata,nodata)

I have a set of rasters in which I want to replace any rgb value of (0,0,0) with (nodata,nodata,nodata) I've tried using gdal_translate -a_nodata "0,0,0" in.tif out.tif But this seems to convert ...
1
vote
0answers
33 views

Using gdal_translate to generate large raster from tile service?

I'm calling gdal_translate from the windows command line. My objective is to obtain a large geotiff, of a predefined region, from a Tiled Map Service (TMS) hosted at the University of Wisconsin. When ...
0
votes
0answers
49 views

Define band specific metadata of a GeoTIFF file using GDAL (gdalwarp/gdal_translate)

Does anybody know how to change or set the "Description" option/tag (band specific metadata) of a GeoTIFF file using GDAL? To specify what I mean, this is an example of gdalinfo return from a GeoTIFF ...
0
votes
0answers
58 views

GDAL and WMTS supprt

I have researching possibility to fetch raster file from WMTS server via GDAL. I have found some old post about that GDAL doesn't support WMTS (WMS only). However, I also find this information: ...
4
votes
0answers
123 views

How to remove nodata values from XYZ output with GDAL?

I have a buffered line route that is overlayed on a DEM: I've clipped the DEM to the buffered line, and exported it as an ADF ESRI grid file. I then used gdal_translate to convert it from the ...
1
vote
0answers
82 views

WKID issue when adding raster layer from ArcGIS “mapserver” to QGIS via REST

QGIS docs here describe how to do this. I am trying to add a layer from this MapServer: gps.digimap.gg/arcgis/rest/services/JerseyBaseMap/MapServer When I try the following command from the Python ...
2
votes
0answers
28 views

Display or export gdal_translate exponential scaling equation

I have an GeoTiff raster that contains elevation information at each pixel. As OpenLayers 2 can't display GeoTiff, I convert it to a PNG image and have to apply an exponential scale so the resulting ...
3
votes
0answers
31 views

gdal_translate bilevel tiff output

I have a geotiff image that rings in at about 290MB. However, once I smooth it using a gaussian filter I'm unable to get it back to that size, it ends up being 1720MB. The size isn't really the ...
3
votes
2answers
198 views

How to have GDAL print layers of GeoPDF AND say which are raster vs vector

My Objective: I would like to use GDAL to convert a GeoPDF. I want the vector layers as shp files and the raster layers as tif files. I want to do this in a programmatic way. Edit: In reality, I ...
0
votes
0answers
48 views

What are the units in GMTED2010 elevation data?

I have downloaded the GMTED2010 elevation data from http://topotools.cr.usgs.gov/gmted_viewer/viewer.htm I am merging all the files/tiles (to create a global dataset) with: gdal_merge.py There is ...
3
votes
0answers
75 views

How do I specify an outsize for gdal translations to an ENVI file?

I'm trying to create an elevation map using the output from gdal_translate. When I run gdal I can convert to both PNG and ENVI and combine the results to make something like the following image. ...
1
vote
1answer
56 views

Black image using gdalwarp

Im a geomatics student; Currently, I try to geo-referencing a tif image with the QGIS GUI, and then I load and save the Gdal script. With the QGIS GUI, I managed to get a decent picture, then I ...
4
votes
0answers
114 views

can I preserve a fading alpha layer when mosaicing images with gdal?

I am mosaicing some images with gdal and would like to improve the final result by using a fading / gradual alpha layer towards the edge of each image to remove the sharp edges in the middle of the ...
0
votes
0answers
28 views

Is gdal_translate ignoring the CPL_TMPDIR switch?

I've tried both... /usr/bin/gdal_translate -q --config CPL_TMPDIR /opt/xipi/nitf/scratch -of KMLSUPEROVERLAY /opt/xipi/nitf/scratch/sample-100000001.ntf /opt/xipi/nitf/out/sample-100000001.kmz ...
1
vote
0answers
54 views

Extra white space in ASCII file due to Translate GDAL from QGIS Modeler

Could anyone enlighten me why do I get an extra white space in from of my first column in an ASCII file generated through a model? With ArcGIS it doesn't happen. Output raster type: Int32 Output ...
1
vote
1answer
100 views

How to change the projection and resolution of a file using gdal?

I have a file with these information: lat_min -60.0 lat_max 80.0 lon_min -180.0 lon_max 179.9 lon_sampling 0.1 degree lat_sampling 0.1 degree samples = 3600 lines = 1401 I want to re-project the ...
0
votes
0answers
107 views

Create GeoTIFF from JPG and JFW files with gdal

I have a JPG image and the corresponding geospatial information on a JFW wolrd file in a ETRS89 geodesical system and UTM coordinates (EPSG:25830) 5.0000000000 0.0000000000 0.0000000000 -5.0000000000 ...
0
votes
1answer
74 views

gdal_translate cannot convert MSG3 channels to TIFF

following this guide http://www.gdal.org/frmt_msg.html I want to convert my MSG3 HRIT format files in TIFF but I get this error gdal_translate H-00 ...
0
votes
1answer
59 views

gdal_translate or gdalwarp to define projection

Which of these is the best approach to define (aka. set) a projection for a tiff? 1) gdal_translate -a_srs EPSG:32182 in.tif out.tif 2) gdalwarp -s_srs EPSG:32182 -t_srs EPSG:32182 in.tif out.tif ...
0
votes
1answer
71 views

How to not process when query is outside the raster extent ? (Error when Completely Outside)

Given a West North East South bounding box, I want to crop this data from a hundreds of inputXX.tif. Nearly every times but once, the query first print out that it "falls completely outside raster ...
0
votes
1answer
45 views

How to pass value of a band to and other band and change its value?

Using gdaldem hillshade, I get a one-band hillshade (download here, 2MB) : gdaldem hillshade crop_xl.tmp.tif Shadedrelief.tmp.tif -s 111120 -z 5 -az 315 -alt 60 -compute_edges I currently can ...
19
votes
3answers
915 views

How to create transparent hillshade?

I get elegant transparent hillshades via a combination gdal and convert. Compare to grey-based hillshade commonly used, such transparent hillshades are very cool because they can be placed between the ...
1
vote
1answer
107 views

How to convert from .shp to .csv using python and either gdal_translate of ogr2ogr

I am trying to convert .shp files to csv using either gdal_translate or ogr2ogr and python but its not work. if i run the following from qgis its not giving an error but at the same time its not ...
1
vote
1answer
180 views

mosaicing geotiffs with gdal creates gaps due to alpha layers

I have a series of geotiffs which I'm trying to mosaic together, however when they are combined their individual alpha layers overlap sections of the other images and create gaps in the final mosaic: ...
1
vote
1answer
493 views

jpg to geotiff transformation with gdal_translate and gcps fails

I am trying to create a geotiff from a jpeg by inputting gcps with gdal_translate: gdal_translate -of GTiff -a_srs EPSG:4326 -gcp [1616.0 0 -121.459869532 38.5822533549] -gcp [0 0 -121.460081357 ...
0
votes
0answers
106 views

gdal_merge tries to create image with negative dimensions

I am trying to use gdal_merge.py to create a mosaic from a set of geotiffs, however the command fails with the error message: "ERROR 1: Attempt to create -3510x1817 dataset is illegal,sizes must be ...
1
vote
3answers
414 views

gdal_translate : projection error?

I am using GDAL library routines to build a tiled hierarchy of images for use with Google Earth. The images are just PNG files created using Matplotlib. To tile the images, we are using ...
0
votes
0answers
35 views

Relating to GeoLocation tool of Geospatial PDF Document

I created a PDF file with OGC_BP as GEO_ENCODING option like shown in the below command. The below tif file’s Datum and Projection details are WGS84 /Geographic (lat/lon). ./gdal_translate.exe -of ...
0
votes
1answer
85 views

GDAL - Specify span of elevation values for conversion to Terragen format?

I'm attempting to use the gdal tools to convert some geotiff files I have to the Terragen format. I was hoping to use either gdal_translate or gdalwarp in a similar fashion to this post. (though I ...
0
votes
0answers
202 views

Reprojecting from Lambert Conformal Conic into EPSG:3857?

I'm trying to reproject a plain png image file into EPSG:3857 for use in an OpenLayers application. I'm pulling the image from the NWS site at: ...
1
vote
1answer
298 views

convert raster to xyz without no data values

I want to convert a geotif to an xyz-file by gdal_translate. However, when I use the following statement: gdal_translate infile.tif outfile.xyz -of xyz the nodata values are always within the ...
1
vote
0answers
88 views

How can I improve image quality when using GDAL to generate Google Earth superoverlays?

I'm using the free version of Google Earth, so in order to create superoverlays of my large TIF images I have to use additional software. Google suggests GDAL. Using the instructions Google ...
0
votes
0answers
22 views

Can I export overview with gdal?

How can I export overview for example 1/4 from the orginal raster map to a geotiff file using gdal?
2
votes
2answers
222 views

gdal_translate creates images that are mirrored

I'm having a problem with gdal_translate - when translating from an XYZ file to AAIGrid or geotiff the raster is mirrored and "moved" south on one axis. The top part of the attached image is the ...
1
vote
0answers
97 views

gdal_translate- limit memory usage

I am using gdal_translate to clip raster data (using -srcwin and -projwin). This works fine for me until I'm trying to run some concurrent processes of this command. In this case I get random error ...