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


6

Your source tif is in Pseudo mercator, but the extent stored inside the file is in degrees. This can not be interpreted correctly by gdalwarp, and so it delivers the untouched source file. You can get the correct extent in pseudo mercator coordinates from https://github.com/mapnik/mapnik/wiki/XMLConfigReference : -20037508.34, -20037508.34, 20037508.34, ...


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

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


4

It doesn't have to read the whole thing. GDAL is heavily geared to sensible access either line by line or block by block (for tiles). It won't matter if you are selecting bands, and no the answer won't change if it's compressed - but the real details will depend on which compression and which internal tiling is used. See "Reading Raster Data" here ...


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

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

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.


3

File-oriented operations rarely "read the whole image into memory", however: It will always need to read the full header (which varies in size by format) It will always need to allocate a row buffer (or tile buffer, if the format is tile-oriented) for input and another for output (in the case of conversion). If a compression algorithm is used, additional ...


3

Check this here is one discussion about reducing size of tiff images. http://www.cvisiontech.com/library/file-formats/tiff/reduce-tiff-file-size.html or You can use this • Flatten your layers if any. • Use LZW compression to reduce tiff file size. • For pdf, try experimenting with compression settings in the Distiller job options.


2

You could do this easily enough in C++. The way I would do it is to send the path of the file you want to crop, the path of the output/cropped raster, the top left coordinates of the cropped raster and the width and height of the cropped raster. An outline for your code could look something like this. . . void crop(const char *inputPath, const char ...


2

As an alternative to Custom Maps mentioned below, I would suggest GeoViewer. It can do what you need. It can load MrSID and JPEG2000 formats from local storage and arrange them automatically. https://play.google.com/store/apps/details?id=com.lizardtech.activity


2

A big question is whether you are going to read the entire raster from the file into memory before processing it, or whether the file is so large that you will process it incrementally, or process some subset of the overall file. If you will load it all into memory, then you will be doing mostly sequential access, and the fastest format will be a tossup ...


2

A simple for loop will suffice. You can use readGDAL in the rgdal package but I would recommend raster in the raster package. You have to be a bit tricky and use strsplit in the assign function to strip off the ".tif" file extension. setwd("C:/rasters") rlist=list.files(getwd(), pattern="tif$", full.names=FALSE) for(i in rlist) { ...


2

A simple method that does not need programming is to digitize the area of "small" into vector file as a polygon and then burn it into the image with gdal_rasterize http://www.gdal.org/gdal_rasterize.html If the small image is rectangular without nodata regions you can get the mask shapefile with gdaltindex http://www.gdal.org/gdaltindex.html gdaltindex ...


2

The gdal_translate document page http://www.gdal.org/gdal_translate.html may indeed give an impression that the values for Ground Control Points should be closed between brackets [-gcp pixel line easting northing [elevation]]* However, that is not the case as close reading reveals and correct syntax for your case is gdal_translate -of GTiff -a_srs ...


2

Found a quick solution - replacing "-hidenodata" with "-srcnodata 0" in the .vrt build: gdalbuildvrt -srcnodata 0 mosaic.vrt geo_pict20140910_131*


2

The units of the extent will inherit from the units of the projection of the data, so to convert the extent to lat/long, you would need to reproject your data to a geographic projection (usually WGS1984) that uses degrees as units. Your data appears to have been projected to NAD27 / UTM zone 11N, which has units of meters. The extent refers to the x and y ...


2

Yes, you can make Geospatial PDF from QGIS raster maps to Avenza PDF map. If you have vector layers you can save the QGIS map to an Image (Projects > Save as Image...). Use this image as input in a Geospatial PDF convertion from menu Raster > Convertion > Translate (Convert Format)... Upload PDF to Avenza PDF Maps. I use Android, don't know the dark ...


2

You need to post the input raster (in UTM) information too so a true before-and-after comparison can be made. Representing data using lat/lon in a raster means using a Plate Carree-like projection and treating the decimal degree values as if they're linear measures. UTM data is often 'tilted' in comparison so data is resampled. There'll be 'no data' values ...


2

You cannot have R objects called "2000", so presumably these are fake names? Your example actually should work, so you may want to double check why you think that the results are incorrect. @aaryno's approach should work. I would do this: library(raster) s <- stack(r2000, r2001, r2002, r2003, r2004, r2005) x <- reclassify(s, cbind(0, NA)) r <- ...


2

According to the Earth Explorer metadata on NAIP JPEG2000: The U.S. Geological Survey (USGS) Earth Resources Observation and Science (EROS) Center manages and distributes NAIP products in JPEG2000 format, which is a compressed file with embedded georeferencing information. The 10:1 lossy compression makes the file size smaller by reorganizing the ...


2

I assume the GeoTiff is in WGS84 EPSG:4326 with degrees as units. As you may know, degrees of latitude and degrees of longitude have different lengths if you are away from the equator. What you expect to see is a projected CRS, like Web Mercator EPSG:3857 or the UTM zone of your part of the world. In QGIS, you can set the project CRS to change the view ...


2

Draw the area(s) you want to hide from the image and save as vectors into shapefile or other format if you prefer. Then use the gdal_rasterize utility http://www.gdal.org/gdal_rasterize.html which burns fixed, non-transparent pixels into your image and removes permanently image data below the polygons. Here is an example. The map is a RGB tiff image with ...


2

Openlayers and leaflet usually render tiles in World Mercator EPSG:3857. So you have to reproject your source file into that projection using gdalwarp, then start the tiling.


2

Try r.out.gdal. First, at the layer properties, you can see the raster data type of the original raster. Afterward, at the Modules List of next image, you have the parameters used by me for exporting the raster as *.tif. At the next image you can see that the process was successfully finished. The resulting raster (it was as I expected; without the ...



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