Hot answers tagged

49

To select compression method you need to use a command like: gdal_translate -co "COMPRESS=method" src_dataset dst_dataset When you use compression biggest trade-off is extra processing time which is required to uncompress the image, and after uncompressing the image would still consume same amount of memory. About information loss there are two basic ...


29

Looks like gdalinfo will tell you: A non-georeferenced figure exported from ArcMap layout: C:\Temp>gdalinfo figure1.tif Driver: GTiff/GeoTIFF Files: figure1.tif Size is 244, 210 Coordinate System is `' Metadata: TIFFTAG_XRESOLUTION=96 TIFFTAG_YRESOLUTION=96 TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch) Image Structure Metadata: INTERLEAVE=PIXEL Corner ...


13

Recent versions of gdal_translate have support for KML Superoverlay. Although it is not yet documented on the GDAL website the following can be used: gdal_translate.exe -of KMLSUPEROVERLAY c:\in.tif c:\out.kmz -co FORMAT=JPEG This will save a tiled version in a kmz file using jpeg compression. On windows you can automate using forfiles /m *.tif /c "cmd ...


13

try this with gdal: gdal_translate -of JPEG -scale -co worldfile=yes input.tiff output.jpg it also create worldfile too... i hope it helps you...


12

The listgeo utility that comes with libgeotiff is a nice command-line utility that can extract the TWF file from GeoTIFF files. For example, I have a directory of GeoTIFFs, and I have libgeotiff installed as part of OSGeo4w. You can run the OSGeo4w shell, and do this: c:\dat\NZ-Topo50>listgeo -tfw BN24_GeoTif_1-01.tif World file written to ...


12

With lzw and deflate compression using -co predictor=2 can help with imagery that is smoothly varying as it compresses the differences from pixel to pixel instead of the absolute values, and these will tend to be small and have more patterns (ref). Predictor is only useful with lzw and deflate compression, the option has no effect with other methods. ...


11

Usually, GeoTIFFs are compressed for storage. Running gdal_merge on default settings won't compress the file. Add the option -co COMPRESS=DEFLATE (or any of the other options listed in the documentation) to your command to get smaller output files.


11

You need to tile the image and add overviews so that the whole image is never read into memory at the same time. GeoServer provides an image pyramid datastore for this purpose. I wrote these notes describing how I set this up on my machine. The key step is to use GDAL to build the pyramid using the following command: mkdir bmpyramid gdal_retile.py -v -r ...


11

Have you looked at using FWTools? There is a python script called gdal_merge that is available within FWTools. You can use a list as input. The command with usage would be: gdal_merge -o c:\temp\output_image.tif -q -v --optfile c:\temp\rasterlist.txt


10

GDAL has a wonderful file format called VRT, which is an XML wrapper around one or more raster files. One feature of VRTs is their ability to encode square convolution kernels for any given band. It does involve playing around with XML in a text editor (or programatically), but if you're already used to the GDAL tools, it shouldn't be too hard. To ...


10

You could explicitly set the output coordinate range using the target extent option to gdalwarp (ie. "-te -180 -90 180 90") but you can also use the CENTER_LONG configuration option to force rewrapping around a new central longitude. Something like this: gdalwarp -t_srs WGS84 ~/0_360.tif 180.tif -wo SOURCE_EXTRA=1000 \ --config CENTER_LONG 0 ...


10

Files ending with 'w' (tfw, jpw or jgw, bpw and so on) are world files. These files are used to geolocate rasters that otherwise have no means of geolocation. They tell the GIS where the file's origin is in the real world and the size and rotation of the pixels. however, they do not store any information about projection. You only need a world file if ...


9

You can use the GDAL included .NET wrappers. This allows you to access any of the GDAL functionality from within managed code.


9

You can use the GDAL C#/.Net bindings to do this.


9

If you can accept some quality degradation in the image, you may try out something like the following, using the GDAL utilities: gdal_translate -co "TILED=YES" -co "COMPRESS=JPEG" -co "PHOTOMETRIC=YCBCR" input.tiff output.tiff gdaladdo -r average --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR output.tiff 2 4 8 16 The above should ...


9

There is no service or readily available tool that I can think of. But if you are comfortable on the command line and willing to spend some time tinkering, here is a way that can work Download the OSM shapefile. Import the shapefile to TileMill.. Once you style it, export it as a georeferenced PNG. The following command should work once you have ...


9

By default an RGB image will be written to an RGB color model JPEG image, but this is not actually the most efficient way of writing to JPEG. It is better to convert to the YCbCr color space, and encode that. This is in fact the typical form of standalone JPEGs and what GDAL will produce when writing to a free standing JPEG file. Compressing a 4K x 2.6K ...


9

It's a well known and longstanding issue that gdalwarp doesn't deal with compression well. The solution is to gdalwarp without compression then gdal_translate with compression. To avoid two lengthy processes, gdalwarp to VRT first, it's really quick, then gdal_translate with the -co compress=lzw option. i.e. $ gdalwarp -tap -tr 30 30 -t_srs "etc..." -of ...


8

Make a tiny Python script named "UpdateSRS.py": import sys from glob import glob from osgeo import gdal, osr # Define your projection here sr = osr.SpatialReference() # For example, UTM Zone 11 sr.SetUTM(11) sr_wkt = sr.ExportToWkt() file_list = set() for arg in sys.argv[1:]: file_list.update(glob(arg)) for file in file_list: ds = gdal.Open(file, ...


8

You can use GetStatistics Method to get the stats. eg. stats = ds.GetRasterBand(1).GetStatistics(0,1) it will return (Min, Max, Mean, StdDev) so the xml can be read: <PAMDataset> <PAMRasterBand band="1"> <Metadata> <MDI key="STATISTICS_MINIMUM">stats[0]</MDI> <MDI ...


7

Here's an old blog article of mine looking at the file size and access time of the formats. I didn't investigate the write speed, only the access time. I'd say they would probably be directly related, but wouldn't be able to vouch for it. Article Summary: It seems that Packbits gives you the best access times (at expense of disk space), whereas Deflate ...


7

Download the source code from here http://www.osola.org.uk/elevations/index.htm SRTMGeoTIFFReader.php is the clever file the reads the GeoTiff and converts the elevation values (in meters) into Lat/Lng coordinates. I doubt this is exactly what you want but it does give you a solid base on understanding the process required to accomplish the task from your ...


7

I think that all of listed by you software allow to execute batch converting in some way. ArcGIS I can explain how is it possible to perform in ArcGIS. Converting of one raster JPEG2000 -> GeoTiff can be done using tool Raster To Other Format (Conversion). Don't forget to setup appropriate raster storage settings in Environment variables when running ...


7

Hei! Choose Raster menu - Conversion - Translate (Convert format). Then choose *Input file* for the image You want to convert. Under the *Output file* You can choose the format You need. There is .jpg too (with some 20+ file types). I got 40MB large .tiff file, after conversion its only 1,6 MB as .jpg.


7

I suspect that your TIFFs might be Ordnance Survey Vector Map District rasters? I've not loaded any of these into Postgres/PostGIS but I have loaded some into a Rasterlite DB. The secret is to batch translate the TIFFs from indexed to RGB GeoTIFFs before loading them into the database. Raster -> Conversion -> Translate (Convert Format), tick 'Batch mode' and ...


7

I have written a tutorial on exactly this problem that you may find helpful. Basically it boils down to using gdal_translate, gdal_merge and gdal_retile so you will need to have installed GDAL. Either use apt-get install gdal or the osgeo4w installer


7

I had a similar problem few weeks ago . I resolved it this way: creating pyramids rasters image (all rasters had got pyramids depends on standard scale rate in my project creating tiles from raster (mosaic) putting all files to postgis (by WKTRaster) By this way you get MRDB (multi-resolution data base) which is the most effective way of serving a large ...


7

I ran an experiment with a TIFF file and an ECW. Started with a 1.2 GB ECW, and converted it to TIFF with compression and pyramids, it was ~1.5 GB. So I think that a TIFF can be a similar size to an ECW. I would mosaic the image using GDAL, ensuring that compression is on. Then build pyramids, and if the resulting file is reasonable (less than 10 GB, I ...


7

I think I can answer it for you. If you look at the precision vs. accuracy image on the link you provided, precision refers to the repeatability of the observation. For example, if I measure the distance from one point to another and it is always vaying only by a very small amount, then I am making measurements at a high precision. But, basically, ...



Only top voted, non community-wiki answers of a minimum length are eligible