Tag Info

Hot answers tagged

36

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 ...


23

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 ...


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 ...


9

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. ...


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.


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

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 ...


8

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


7

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 ...


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

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

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

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 2 4 8 16 output.tiff The above should ...


7

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 ...


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, ...


7

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 ...


6

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 ...


6

I wrote a small gdal python script for this, gdalsetnull.py, a simple command line program to set specified raster value NODATA, without creating a new raster. The easiest route to installing GDAL on windows is via OSGeo4W. Examples: python gdalsetnull.py foobar.tif 0 # pure black is transparent python gdalsetnull.py foobar.tif 0 255 0 # ...


6

In concept, you need to figure out what pixel values represent cells with no data and then edit your color table to assign the RED,GREEN,BLUE (RGB) values in the color table to be 255,255,255 for that cell value. If you don't have the appropriate license to do this in Arc, you could use the gdal_translate tool (one of the gdal/ogr commandline tools) ...


6

For big rasters GeoTiff offers the possibility to store (pre-)downscaled overviews as extra images to the GeoTiff file. This can be done with gdaladdo (= GDAL ADD Overview). When creating these overviews, you can manually tell gdal to comress them too: gdaladdo --config COMPRESS_OVERVIEW JPEG Speeds up viewing your data without adding too much size. ...


6

In arcmap 10. I think I would use the footprint feature (in mosaic dataset) and then generate the centroid of those polygons. add an x and a y field to my attribute table, calculate the geometry, then export to dbf and convert to xls. Also found in this answer are several resources for esri help.


6

You need a Python library that supports the GeoTIFF format. Libraries that support only the TIFF file discard the projection and geotransform metadata when they are saved. GDAL is the most used open source Python library for reading/writing spatially aware rasters. So, for your example: from osgeo import gdal # Load file, and access the band and get a ...


6

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 ...


6

There is a little bit of information which might help you in your task. First you may need to download FWTools inorder to use geotifcp and listgeo. Create a TIFF File(You already did it..) Let us call it initialtif.tif find the image width and height(from where you saved it). imageWidth = 1016 imageHeight = 551 Create a World File for our ...


6

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 ...


6

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...


6

I am not sure if you are aware of the -scale feature of the gdaltranslate tool. it might be just what you are looking for. It defaults to 0-255 and the min and maxx of your rasters. You should also set the null values before using this. You might want to specify the output as type Byte just to be sure -ot "Byte" hope this helps, :) Edit: I always like ...



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