Tag Info

New answers tagged

0

Your rasters, I guess from your description, are not overlapping. Therfore you should create a raster mosaic (using a gdalbuildvrt or the ArcGIS mosaicing tools) that would behave like a single image. Thenyou can use your tool (extract value to point or extract multivalue to point) only once.


2

Extract multiple values to points from Spatial Analyst can deal with multiple raster data as input. But I dont know if it is working with 100 Datasets.


1

If you look at the spectral ranges across sensors they seem quite comparable; TM5 10.40-12.50 µm, ETM+7 10.40-12.50 µm and TM8 10.60 - 11.19 µm or 11.50 - 12.51 µm. Depending on your statistical analysis, you may have to perform some data standardization but, this is often the case with comparing multi-temporal data. Everything collected by TM5 and ETM+7 ...


1

I am sure all your classes are represented in your feature class. They will be further down in the attribute table. You have more than 200.000 features. As Michael said, when you convert a raster into a Polygon, pixels of the same class, which are not directly connected will be represented in a different class. Try to dissolve you new feature class (data ...


1

In ArcGIS, you can use tabulate area for this. It will give you a table as output with the number of pixels of each class within each polygon. Then you need to divide each column by a the total count and you have the percent. Note that ArcGIS selects a default raster size for internal analysis. So it is better to specify the pixel size in the environment of ...


1

In short, you must georeference your images in order to view them in an interactive map. The GPS points provided should be used for this. I am not familiar with OpenGeoSuite, I do know however that QGIS 2.8.1 (free and open source, tried and tested) has a georeferencer plugin which works perfect for standard georeferencing which I can stand by as I have ...


1

I believe this is the solution to the issue of "stacking" layers or raster bands for multiple images. This model is set up using standard NAIP imagery so red=1, green=2, blue=3, NIR=4. In this example, I am taking only the three color bands from the original image--combining them--then converting the format to PNG. My model uses the same concept as the first ...


1

It seems to be a question not so related to GIS, that is since you are treating the raster as a "list" (or a vector) of values. Anyhow you can use the following workflow in R: Assume you have raster objects called r1 and r2. >r1Vals<-getValues(r1);r2Vals<-getValues(r2) # Extract values of r1 and r2 cells to verctors ...


0

This is untested, but my thinking would be: Convert No Data to Polygons. Get the bounds of each polygon and use them to create a rectangle. That is, for the left polygon, the rightmost X value will be the Left Bounding Coordinate of the red rectangle. For the right polygon, the leftmost X value will be the Right Bounding Coordinate of the red ...


2

Thank you for clarifying your question as it was previously quite unclear. You can read a multiband raster using the stack or brick function in the raster package and assign the associated RGB values to an sp SpatialPointsDataFrame object using extract, also from raster. Coercion of the data.frame object (which results from read.csv) to an sp point ...


2

An alternative to render LiDAR data and RGB values in 3D is FugroViewer. Below, there is an example with sample data they provide. I used the file entitled Bmore_XYZIRGB.xyz which looks like this: When opening in Fugro Viewer select the corresponding fields available within the file (in this case, a .xyz file): Then, color the points using the RGB ...


0

You can find the Z values of the watercourses at your sample points without raster: Using the tool Split line at Points you can break the lines (to an output feature class), if you have Z values the value at the point of intersection is interpolated. Use a small tolerance or the lines will not be broken, for example if your projection is metres a value of ...


2

Iterating is a little tricky for the first time user who has done VB or C, there is no for i = 1 to n iteration in python (yet). To iterate from one number to another you have to make a range (list) of integers then step through it with for value in list: Use this as an example to adjust your code, I've written the whole thing to give you some context: ...


2

You do not say if you are in academia? If you are then the obvious place to go would be edina and digimap. If you are not then have a look here for free elevation data. Of cause you could go to OS the national mapping agency of the UK and get a 50m terrain model...


2

Free of charge i would say: Get either ASTER or SRTM from earthexplorer. Both are available at 1 arc-sec., respectively ~20m vertical rmse.


1

If your projection is in meters, you have to modifify cellsize X and cellsize Y to reasonable values (for example 30 m; not 0.00001 m). Use a raster base for these settings.


1

You will want to use clipping_geometry = True as in the following example. import arcpy shp = r'C:\temp\myshp.shp' raster = r'C:\temp\someRaster.tif' arcpy.Clip_management (raster, in_template_dataset = shp, out_raster = r'C:\temp\outRaster.tif', clipping_geometry = True)


0

Turns out you can accomplish this task easily using GDAL via OSGeo4W Shell and the following GDAL: gdal_calc -A inn1.tif -B inn2.tif --outfile=test.tif --calc="where(A>0,A,B)"


1

The short answer is that you can't. The documentation says: The Advanced Wide Field Sensor (AWiFS), on-board IRS-P6 operates in four spectral bands in green (0.52-0.59µm), red (0.62-0.68µm), near infrared (0.77-0.86µm) and short wave infrared (1.55-1.70µm) Since the data does not have the regular 3 bands, you cannot get a True color composite of ...


0

This is exactly what the function raster::mask(x, mask) is for. It sets cells in x to NA when the corresponding cell in mask is NA. library(sp) library(raster) # Create some sample data r1 <- raster(nrows=40, ncols=40, xmn=0, xmx=2, ymn=0, ymx=2) r1[] <- seq(1, 100, length.out=ncell(r1)) r2 <- raster(outer(1:20,20:1), xmn=0, xmx=1, ymn=0, ymx=1) ...


1

In your question it appears that you want to assign the values of each cell of V based on the value of rainfall at that cell. arcpy doesn't allow you (as a numpy array would) to compare a raster to a constant. Also note that in each iteration of your loop V is being completely overwritten, and then the results aren't being saved anywhere, so once you get to ...


6

GDAL suppports that so it should be possible for QGIS as well. However, I could not make it work with my QGIS 2.6.0. Perhaps there is just some missing step and somebody can point what it is. Test with GDAL and VSICURL gdalinfo /vsicurl/http://dl.maptools.org/dl/geotiff/samples/made_up/bogota.tif Driver: GTiff/GeoTIFF Files: ...


0

Thin plate spline works perfectly for all GCP you have entered, but possibly not for the rest of the image. If you use polynomial interpolation, you get residuals for all GCP points. If one or several of your GCP have a low accuracy, the polynomial interpolation can compensate that, leaving the image as a whole with less distortion. With TPS and one GCP ...


2

Try to use ead of cell statistics instead of raster calculator and use the sum operator. Also mark ignore no data. That is under the assumption that there are no "NoData" cells you wish to retain. Before running the tool, set the processing extent to UNION of both inputs under tool's environment setting.


0

I posted this question on the R-sig-Geo listserv and received a helpful answer from Adrian Baddeley, one of the spatstats authors. I will post my interpretation of his response here for posterity. Adrian notes that the function spatstat::pixellate.psp() is a better match to my task. This function converts a line segment pattern (or SpatialLines object ...


0

The best way to rasterize a vector layer (including points) is modifying the command line into the rasterize's window for aligning it perfectly to raster base. In metadata of raster base you can get Layer Extent and Pixel Size. In the next image, I have a raster base (dem) and a vector point layer. For the raster: Pixel Size 73.9887 73.9887 Layer ...


0

Here's yet another approach. It deviates from those already given by using the spatstat package. As far as I can tell, this package has its own version of spatial objects (e.g. im vs. raster objects), but the maptools package allows conversion back and forth between spatstat objects and standard spatial objects. This approach is taken from this R-sig-Geo ...


1

Try to apply Con(IsNull("raster"), 0, "raster") to the raster that has "NoData" value. To tell you in the detail, here is my explanation. First, You have to make sure that all rasters have the same extent as you desire (for instance, you can set the extent to the largest raster's extent). To change the extent of a raster, you can simply right-click on the ...


1

Quite easy with command line gdalbuildvrt http://www.gdal.org/gdalbuildvrt.html and gdal_translate http://www.gdal.org/gdal_translate.html. gdalbuildvrt average.vrt *average*.tif gdal_translate of GTiff -co tiled=yes average.vrt average_mosaic.tif


0

You can copy the following script to your QGIS (Processing Toolbox > Scripts > Tools > Create new script). This script takes rasters from a single folder called "Test" on the Desktop and merges all "...average.tif" files and all "...maximum.tif" files. It then places the output rasters into the "Results" subfolder: ##Merge_Rasters=name import os, glob ...


1

Since there are many issues adressed to georeference in posted answers, I'll try to explain the idea of georeferencing rasters. Images are stored as raster data in which each cell in the image has a row and column number (in other words - pixel address). Then to tell GIS software how to translate row and column position into geography wise position there ...


0

As you mentiond, NO DATA is not a problem. Thus in order to overcome the overlapping issue, you should modify the tool's processing extent to UNION OF ALL INPUTS, within tool's environment settings. See image below EDIT: The solution above might create a trade off between NoData values in overlapping areas and the inclusion of none-overlapping areas. Thus ...


0

I have the same problem and tried Ifranview. I think batch convertion lost georeferenced information. Crazy to thing there is no simple option in ArcMap for that. Did'nt get how you manage to do it with ifran view?


1

Your first option does not change anything because, if any cell is NoData in Focal operations, then the result is also NoData. See the documentation. If that is your preferred approach (and you'll know best what appropriate depending on the nature of your data), you could set the Ignore NoData option. This will ignore all NoData cells in the neighbourhood ...


1

Use zonal statistics as table. Create a raster (with all values == 0) or a polygon feature either to the extent of the raster you wish to calculate statistics for. Than apply the Zonal statistics as table with the new "mask" as the zones layer, the raster as the value layer, and set ALL as the statistics type. You can use batch processing to operate once ...


0

I suggest to use grass for doing this. What you need is v.rast.stats (you can find it in the grass plugin for Qgis). This tool uploads the value of the raster to your vector layer. Just pay attention to the resolution of your raster layer (bigger are pixel more difficult it is to approximate your circle so the area that you analyze it's not exactly a a 5 km ...


3

You could approach it this way: f <- function(x,y) { z <- rep(NA, length(x)) i <- which(y == 1) z[i] <- x[i] * 3 i <- which(y == 2) z[i] <- x[i] * 33 i <- which(y == 3) z[i] <- x[i] * 333 z } library(raster) r1 <- r2 <- raster(nrow=5, ncol=5) r1[] <- runif(ncell(r1)) * 10 r2[] <- ...


1

@Michael is guiding you to the right directions. To extend his answer, The coordinate system of online maps such as Google Maps are Web Mercator. ArcGIS fully supports this coordinate system. Exact name in ArcGIS is: "WGS 1984 Web Mercator (Auxiliary Sphere)" To convert from WGS84 to this coordniate system, there is valid transformation in ArcGIS for ...


2

You are actually trying to create a DEM (Digital Elevation Model). My suggestion is to go withy your first option: Import CSV and make a XY event layer. Than export it to a point feature class with the Z-values as altitude. Use the "CREATE TIN" tool to create a triangulation vector surface. Use "TIN to raster" tool to create a DEM. Another method would ...


2

Majority Filter. You can apply multiple runs to smooth the image.


1

Rasterization depends of the field that you select. For example, in the following case I selected (in vector layer point_2) the 'field' field whose values are all 0. The result, point_2_raster.tif, is the same that you are obtaining (a black picture): However, if the 'id' field is selected, whose values are between 1 and 5, the result (point_raster.tif) ...


1

Found it! In Linux, CORE_EXPORT and GUI_EXPORT macros should be set empty, However in Windows you should define them in .pro file as follows: DEFINES += CORE_EXPORT="__declspec(dllimport)" DEFINES += GUI_EXPORT="__declspec(dllimport)"


1

x <- calc(st1, function(x) movingFun(x, 3, mean)) y <- st1 - x


1

The below is modified from Jeffrey Evans' solution. This solution is much faster as it does not use rasterize library(raster) library(rgdal) library(rgeos) roads <- shapefile("TZA_roads.shp") roads <- spTransform(roads, CRS("+proj=utm +zone=37 +south +datum=WGS84")) rs <- raster(extent(roads), crs=projection(roads)) rs[] <- 1:ncell(rs) # ...


1

Matematically, the absolute value of a number, |x|, is: x if x >=0 and -x if x < 0. For this reason, the implementation of abs() function in the raster calculator is: ("layer@1" >= 0)*("layer@1") + ("layer@1" < 0)*(-"layer@1") To test this I used a NDVI raster whose values are between -1 and 1. The result is confirmed in the next image (see ...


0

try this: i=1 while (i<(nlayers(st1)-2)) { j=i+1 k=i+2 #moving averages img1= st1[[i]] img2= st1[[j]] img3=st1[[k]] mov_avg=(img1*img2*img3)/3 #or your function #write raster: the name of the output will be mov_avg_i.tif, where i= number of iteration (day?) writeRaster(mov_avg, paste("c:/mov_avg_",sep=i, ".tif", format="GTiff", overwrite=TRUE) ...


2

This code works well: from qgis.analysis import QgsRasterCalculator, QgsRasterCalculatorEntry bohLayer = iface.activeLayer() entries = [] # Define band1 boh1 = QgsRasterCalculatorEntry() boh1.ref = 'boh@1' boh1.raster = bohLayer boh1.bandNumber = 1 entries.append( boh1 ) # Process calculation with input extent and resolution calc = QgsRasterCalculator( ...


3

Because the comments seem to have constituted a satisfactory answer, I am copying them here for the record (and adding a few edits to improve them). How could the values not change? Consider what happens during the reprojection. Because the raster is truly being warped, each cell in the new version has to reflect some combination of values from the ...


2

I found this at the QGIS 2.2 documentation at "Limitation for multi-band layers" Obviously there is a limitation of multi band layers, what means that they are not supported. As a work around one can extract every single band with the raster calculator Raster > Raster Calculator. Save each raster-band as a single tif-file an load it in the ...



Top 50 recent answers are included