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

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

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

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


4

Your values aren't in 0,255 since they are UInt16. You can try rescaling to 0,255 (GDAL works it out by default from input min/max and output default 0,255): gdal_translate -b 1 -b 2 -b 3 -mask "none" "input.tif" "output.tif" -scale Note you can add params if the defaults aren't sensible: -scale [src_min src_max [dst_min dst_max]] ...


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

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


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

Use gdal.GDT_Float32 not GDT_Byte. The Byte datatype is unsigned 8 bit integer. That means it can only hold values from 0-255. If you try to include values <0 or >255 they will overflow, i.e -1 will be converted to 255, -2 to 254 and 256 to 0 and 257 to 1 etc... Your code works fine with Float32 datatype, see image below. You may be seeing "values of ...


3

The GDAL section of the Options from the Settings menu will tell you which raster file formats GDAL in your QGIS can load. I can't find a corresponding list for OGR (vector) drivers, but the popup on the "Load Vector Layer" probably has all the file-based ones:


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.


3

Ciao, an observation on number VS size of files. Opening more than 10 to 20 file to respond to a request would hinder scalability of WMS and WCS. On the other side having Geotiff that are too large (hard to say but >> 20gb as a start) would make the internal structure too big for fast serving. As such you need to balance size and # of files to read on each ...


3

This can be done with the OGC standard WCS. Think that WCS is something like WFS but for raster. But, as @simogeo explains If your goal is to download plain geotif files with no processing (crop, scale, reproject) I would suggest to go for a specific WPS process (that you have to create) that simple give access to the original file. I mean, using ...


3

Rather than reinvent the wheel, I strongly recommend Geoserver. It does exactly what you want, plus has integrated tile caching. It is open source and the de facto implementation of the various OCG web mapping protocols and can simplify your tool chain a lot (as you won't need to implement mapnik and mod_tile. It integrates well with PostGis too. EDIT: ...


3

While Save As ... works easily with vector data, it is not useful to do raster reprojections with it. Instead, use Raster -> Projections -> Warp for reprojection, or Raster -> Convert -> Translate ... for a different file format. For large files, it might be better to use the OSGEO4W Command Shell. You can use gdalwarp or gdal_translate with ...


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

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

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

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

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

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

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


2

there's two tasks here extract the geotag info from the EXIF in your photos rendering that info on your geotiff (or over it, as a separate point layer) From the wording, it sounds like you want to render this directly into a geotiff. This is a bit tricky. If you really do want to go down this route you'll probably need to code. I'd recommend the simpler ...


2

-a_srs just assigns the given SRS into metadata but nothing else. I believe this is what you did already and I don't know any better way for doing it: gdalbuildvrt -a_srs epsg:4326 ortho_4326.vrt ortho-*.tif gdalwarp -of VRT -s_srs epsg:4326 -t_srs epsg:3857 ortho_4326.vrt ortho_3857.vrt. There is one exception, if your final goal is to use VRT as a ...



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