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

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


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.


5

Depending on where you create the VRT, it will either become a relative path, or an absolute path. You can manually set this, by modifying the relativeToVRT="1"to a 0, and then write a complete path in the instead of just the image filename. See the example below of a full path VRT. <VRTRasterBand dataType="Byte" band="1"> ...


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

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


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

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

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


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

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

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


3

GDAL supports NetCDF: http://www.gdal.org/frmt_netcdf.html gdal_translate input.cdf output.tif


3

Use the ASCII to Raster tool. import arcpy arcpy.ASCIIToRaster_conversion("/path/to/file.asc", "/path/to/output.tif", "INTEGER") Note: A GeoTIFF is just a TIFF file with some extra metadata tags, and the only file extension that should be used for TIFFS in ArcGIS is .tif, not .tiff or .geotiff.


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

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


2

If the min value is consistent - like a no data value, you might be able to use the snodata option and specify the value you want ignore. As listed in the doc for gdal_contour


2

gdal_Calc.py can do that, a reclass Something like.. gdal_calc.py -A filename.tiff --outfile=filename.tiff --calc="A*(A>3)" --NoDataValue=0 --calc="1*(A<3) See this one gdal_calc.py raster reclass equivalent of ArcGIS reclass or r.reclass in grass


2

After some fiddling and a lot of googling I found that this worked gdal_translate -co tiled=yes -a_srs EPSG:27200 tiff/Tiri tiff/Tiri-tiled gdaladdo tiff/Tiri-tiled Where tiff/Tiri was the original GeoTIFF file that I produced from the mrsid file.


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


2

In GRASS, location and dataset should share the same projection. On-the-fly-reprojection is only available in advanced GIS packages like QGIS or Arcgis. To change the projection, use gdalwarp to a different filename outside of GRASS.


2

If you don't know the extent in coordinates of the prj file, you have to georeference the file manually using ground control points. This is rather comfortable if you have QGIS installed, and you can guess some details from the image. In some cases, you can build the extent manually if the filename follows a certain rule, like the one-degree-SRTM files do. ...


2

Here is the source to the underlying Java library, prj2epsg, used behind the scenes on the webpage you list. Basically, it uses a Lucene index to get the best match between the WKT in your prj file and an underlying EPSG. As AndreJ has already said, this may not be 100% perfect, but Lucene excels at partial/fuzzy matching. gdalsrsinfo might be easier to get ...


2

There is no such tool working 100% perfectly, because there are many EPSG codes that share the same projection parameters. You can run gdalsrsinfo on any Geotiff or shapefile .prj file to get the proj string out of the definition. For some intelligent ways of guessing, follow the answers given here: Identifying Coordinate System of Shapefile when Unknown? ...



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