Tag Info

Hot answers tagged

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

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

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

I finally figured it out... this code assumes that the geotif is in wgs84 (4326) proj, but it works well for getting the lat long for each pixel, and the band values for each pixel (formatted as a csv here). Hope this helps. import com.spatial4j.core.io.GeohashUtils; import java.awt.geom.Rectangle2D; import org.geotools.coverage.grid.GridCoverage2D; import ...


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

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

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

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


3

Spectral mixture analysis / sub pixel analysis is designed for hyperspectral data, not a 3-band aerial photograph. However, you can try it and see if the output is useful. A tutorial can be found in this pdf and in this ppt/pdf. You will have to skip a significant number of the steps, as you don't have the same amount of information in your dataset. In ...


3

For merely converting a raster from one format to another, many of the GDAL tools will do that along with their specialized functions so either GDALWARP or GDAL_TRANSALTE will do fine for your purposes (which also explains why they give you the same error). The information you mention in the documentation in your links is applicable to using GDAL. Most of ...


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

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


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

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

You can enforce real nodata on the file using GDAL translate utility, look in your QGIS install location bin\ folder. GDAL_Translate -of GTIFF -a_nodata value InTiff OutTiff Substitute your own value for value. NoData does not have to be the highest or lowest value in the file you can set it to any value. Only one value is supported though so if you have ...


2

You make no mention of the Coordinate System for your raster data so I suspect that it is different from that used by Google Earth. The Google Earth projection page says: Google Earth uses Simple Cylindrical projection with a WGS84 datum for its imagery base. Use the Properties of your raster dataset(s) to check the coordinate system(s) being used. ...


2

This example may help you http://bl.ocks.org/jorgeas80/4c7169c9b6356858f3cc. Using Maps API


2

Use gdalsrsinfo to get the srs of the tiff that still has the projection: gdalsrsinfo -o wkt tiffwithsrs.tiff Then copy the output and use gdal_translate to apply it to a new tiff: gdal_translate -a_srs '...' tiffwithoutsrs.tif newfixedtif.tif just paste your projection after the -a_srs option


2

I would use listgeo http://www.remotesensing.org/geotiff/listgeo.html and then geotifcp.


2

Mark's answer is great! It really helped me out. Here's a slightly modified version of Mark's code. The major difference is that this code does not rely on the java.awt.image package to compute the image size, number of bands, or pixel values. Instead, it uses the GeoTools Coverage API. import org.geotools.coverage.grid.io.GridCoverage2DReader; import ...


2

Using the arcpy site package in Python, you can accomplish this by converting your geotiff to a raster object and using the extent and *max&*min classes. import arcpy arcpy.env.workspace = r'C:\path\to\ws' rasters = arcpy.ListRasters() for ras in rasters: f = arcpy.Raster(ras) xmin = f.extent.XMin ymin = f.extent.YMin xmax = ...


2

I think this is best left up to the authorities. However, from a GIS perspective, a location is given. That's about it. From a crime analysis perspective, if the technology is available (more than certainly it is) the police could track cellphone GPS locations that were in that area at the time. As another reddit user posted they could potentially track ...


2

Convert this pdf map as dxf format using "Adobe Illustrator" 2.Take some control points from Google earth in map area and mark same places in dxf file then do spatial adjustment (Arcgis) with familiar software.



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