Tag Info

Hot answers tagged

6

Chris, Your confusion stems from the distinction between the image represented by image 1 (a true color image) and the DEM you downloaded. The two are very different things and this distinction is one of the very great things about raster analysis in geospatial science! Image 1 is a high-resolution true color satellite image or aerial photograph such as ...


5

In the text there is basically an error in that there should be another sub heading between the SRTM data download section and the imagery download section. We provide a methodology for obtaining SRTM data, but you are left to your own initiative to find local imagery data. I will update the text to address this.


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


4

I suggest tackling this using Virtual Raster Table (.vrt) format. How the end result is to be used will determine how many steps are needed. Simplest possible case is the end product will be used by a GDAL or GDAL-aware program, create one .vrt in the desired projection and then use that in your final program: gdalwarp -t_srs wgs84 -of vrt ...


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

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

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

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

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.


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


3

There are three main reasons to flag a pixel as NoData in a classified image : 1) No input data : remote sensing dat could be missing for several reasons, including cloud, cloud shadow, temporary snow cover, darkness, sensor dysfunctionning, 2) Insufficient information : there was a valid value for the pixel, but not enough information to classify it. ...


3

I wanted to point out that you can rewrite the mean function, mean, which you can write yourself to do anything you want, including ditch the 0 values and calculate the mean. For example, if you want to ignore 0s: meanIgnoringZeroes <- function(x) { mean(x[x!=0],na.rm=T) } Then you can pass the function, meanIgnoringZeroes to overlay: mean <- ...


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

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

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

As suggested by user30184, the best method is probably manually your contour lines except if you have dozens of images. For some automation with ArcGIS, you can try to reclassify your tif in order to isolate the contour (it it has a specific colour), then (if you have the licence) do our digitization with the help of ArcScan. If you don't have ArcScan but ...


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.


2

To have a better idea we would need you to send over the output of the gdalinfo on those images. I suspect that these are 16 bits images hence geoserver is applying contrast stretch on the fly to them depending on the local histogram to equalize them on bring them on 8 bits. You need to play with the rastersymbolizer parameters to improve the situation or ...



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