Tag Info

Hot answers tagged

4

Is Python an option? Use RasterIO (a Python GDAL/ numpy bridge) to load the raster to NumPy array, then use numpy.amax() to find the maximum value, followed by numpy.where() to find the row/column indices, then calculate the lat and lon from the raster extents.


4

Do not download multiple files at once / use different ftp client You are downloading from TRMMopen (which is an official download source of the NASA / Goddard PMM) via anonymous ftp. You are only prompted a username/password dialogue if you have multiple connections to this ftp site, e.g. because you are attempting to download more then one file at once. ...


4

Building on what @David mentioned you may use open source gdal library using python module to get image extent like this: import gdal from gdalconst import * data = gdal.Open('C:/Temp/myimage.tif',GA_ReadOnly) geoTransform = data.GetGeoTransform() minx = geoTransform[0] maxy = geoTransform[3] maxx = minx + geoTransform[1]*data.RasterXSize miny = maxy + ...


4

I would recommend to use gdalcopyproj.py, a sample file from the GDAL repository done for this purpose as mentioned directly in the script: Duplicate the geotransform and projection metadata from one raster dataset to another, which can be useful after performing image manipulations with other software that ignores or discards georeferencing ...


4

Install OpenJUMP and study what all has been gathered into it I have never really understood what all the alternatives are. ImageIO-ext is probably utilising native GDAL binaries if such are available but at least most other alternatives are pure java. There is also one more alternative in OpenJUMP called "Sextante raster" which is also pure java. ...


4

Given your error, my guess is that when you are importing the file to GRASS, it is expecting a GRASS ASCII raster format, which has a header that looks like this: north: ####.### south: ####.### east: ####.### west: ####.### rows: ####.### cols: ####.### Instead of an ArcGIS ASCII grid, which has a header that looks like ...


3

Try converting your file to another/the same format (Raster/conversion/translate(convert format).There you can define a value for "no data", which you can set to a number different than 0. Hope it helps


3

SRTM data is in geographical coordinates, if you want exactly (ish) 14 square km around everest download extra, project to a suitable projected coordinate system and then extract. The cells are not 'square' as the data is originally in arc seconds and is only nearly square at the equator and become more rectangular the closer you get to the poles.


3

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


3

Unfortunately you cannot do this. You can only display those images using OpenLayers which are spported by browsers. That is why using OpenLayers.Layer.Image you can only display JPEG, PNG & GIF images. Other Image formats like Erdas Imagine, Tiff, GeoTiff ASCII etc need to be converted to a format which browsers understand, before they can be shown in ...


3

From the GDAL formats: JPEG/LZW/PACKBITS/DEFLATE/CCITTRLE/CCITTFAX3/CCITTFAX4 You've done JPEG, LZW, PackBits and Deflate for the byte and multi-byte data types. Fax G4 is still a valid monochrome (1-bit) compression that I encounter from time to time.. mostly though space is not a concern so images are 8bit or more; I don't think I've ever seen a G3 TIFF. ...


3

gdal_translate -of GTiff C:\temp\input\a.img C:\temp\output\a.tif and the batch option GDAL_translate: converting ESRI GRID to Geotiff in batch '-of GTiff' this part is probably not even required as this is the default but will do no harm.


3

You can export to other formats, however you will have to use python/arcpy module: How to export Data Driven Pages to other formats using ArcMap: You can use a simple arcpy.mapping script to export Data Driven Pages to formats other than PDF. This example shows how to export Data Driven Pages to a series of PNG image files. mxd = ...


3

The tags you're interested in are: ModelTiepointTag, ModelPixelScaleTag, and ModelTransformationTag. The specification describes how they stored the information: http://www.remotesensing.org/geotiff/spec/geotiff2.6.html#2.6.1 You could have a look at how GDAL implements them in this file: ...


3

A work around would be to use the ExportToTIFF method within the data driven page loop. Here is a code example: mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1): mxd.dataDrivenPages.currentPageID = pageNum arcpy.mapping.ExportToTIFF(mxd, ...


3

There is nothing wrong with your GeoTIFF file. You just need a better program to view it with. Most basic "paint"-style programs such as Preview, Paint, Paint.NET, all expect a Byte pixel type for TIFF files. Although a float type is part of the file specifications, most software don't implement this support. Software that should work include most GIS ...


3

I would advise creating a shapefile of image boundaries using QGIS and the Image Boundary Plugin. The following screenshot shows the results of using the plugin on 4 geotiffs.


3

You can create a local CRS with an oblique mercator projection, and transform the data with gdalwarp and gdal_translate into it. See my advice here: Using customized Coordinate System for Archaeological site data This should work with 16-bit or grayscale data the same way. Paletted colours shoud be expanded to RGBA in advance. UPDATE Using QGIS, ...


3

Using rasterio: import rasterio with rasterio.open('sample.tif') as r: ar = r.read() The ar array has 3-dimensions [band, row, col]


3

A literature search would provide you a wealth of information! Bob McGaughey with USFW-PNW in Seattle, is the developer of FUSION and I am sure would hand over the source code for watershed segmentation. Randy Wynne is at Virgina Tech and developed an IDL virtual machine program implementing a variable window filtering approach Popescu & Wynne (2004). ...


2

With libtiff you can't get altitude from you file. I spent a lot of time trying to do it with libgeotiff. My advice is to install GDAL. Example: GDALRasterIO( hBand_ , GF_Read , p, l, 1, 1, &pafScanline, 1, 1, GDT_Float32, 0, 0 );


2

It's highly inefficient to merge mosaic using gdal merge. Instead, make a VRT (Virtual Dataset) and convert it to your favourite format.


2

Check the file system permissions for your data directory. Your servlet container like Tomcat or jetty needs to be able to read AND write files in the directory. I had the same error using linux bu after correcting the permissions for that specific directory (chown -R tomcat7:tomcat ) everything was fine.


2

I'm not sure why, but gdal2tiles does not seem to like a combination of -z and -p raster. So I used call gdal2tiles.bat -p raster ibcso_background_hq.tif and got the right picture in all zoom levels:


2

Sure, gdal_translate: gdal_translate in_file.tif out_file.tif -co "PROFILE=GeoTIFF" -co "TFW=YES" the above command should do the trick.


2

It seems to be the sinusoidal projection that makes the trouble. These links tell how to add sinusoid projection as a custom projection into Geoserver and Geotools http://spatialreference.org/ref/sr-org/modis-sinusoidal/geoserver/ https://www.mail-archive.com/geoserver-users@lists.sourceforge.net/msg05993.html However, discussion is three years old and the ...


2

It doesn't look like your code properly saves/closes the dataset. To do this, add this to the end: dst_ds = None # save, close Also, although it looks like you want to use -999 for NODATA, this needs to be set to the resulting band. If you want to learn more about raster processing with Python, check out rasterio.


2

It would be good if you provided a bit more detail to your question and indicated what you have already tried. Working examples are always appreciated. Here is a function that calculates a correlogram on point data. You could, in theory, modify it to operate on a raster or on a subsample of a raster. Although, I wonder about the computational tractability ...


2

GDAL should be able to convert rasters between any usual formats: gdal_translate -of SRTMHGT input.tif output.hgt See http://www.gdal.org/gdal_translate.html http://osgeo-org.1560.x6.nabble.com/gdal-dev-Aster-tif-files-to-hgt-td3742884.html for more details.


2

I recommend using Python or R (or a GIS software), as @Marc Pfister has suggested. However, you can do it with bash and gdal only, and heavy usage of grep. First get the Min/Max values without coordinates: Obtain the Min / Max values with gdalinfo or gdalinfo -mm like explained in your other question about Min/Max values. Use grep (and possibly some awk) ...



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