Tag Info

Hot answers tagged

8

This questions has been asked a number of times. 30k points, straight up, will not work on an OL map. Or even on a Flash/Silverlight map. Rough (rough!) order of magnitude numbers to remember - 100 points on a JS map (openlayers), 1,000 points in a Flash Map (e.g ArcGIS Flash or Silverlight), 10,000 points on a desktop app (ArcGIS Desktop) are your fine ...


6

The following will stretch your data to 8-bit (0-255). smin=0; smax=255 ( x - min(x) ) * smax / ( max(x) - min(x) ) + smin It should be fairly easy to translate this to the raster algebra syntax in your software of choice. You will just need to know what the min and max values are in your raster. If the raster is the result of a band ratio then it is ...


6

The language of data transformation can be confusing. Standardization refers to transforming your data so it has a mean of 0 and a standard deviation of 1 and is only appropriate for normally (Gaussian) distributed data. Whereas, normalization transforms your data so that the minimum value is 0 and the maximum is 1 while keeping the shape of the original ...


5

I don't believe there's a single command to do this, but we can still accomplish it expediently. The idea is that the distance to the nearest different cell equals the distance to the nearest location whose immediate neighborhood contains more than one cell type. Well, this is not quite true, but it's close: you might want to add approximately one cell ...


5

From a UI and UX point of view, 30,000 individual points on a map is not exactly the best representation of your data. You may also choose to use UTF8 grids on top of your rasterized point data. However, the resolutions of your grid and the amount of points will definetely make selecting data very unpredictable and not the best UX. ...


5

I think the problem is with this expression OutRaster = Con((inRaster <= var[0])&(inRaster <= var[1]),1) Con expects the following format Con (in_conditional_raster, in_true_raster_or_constant, {in_false_raster_or_constant}, {where_clause}) Which in your case Con((inRaster <= var[0])&(inRaster <= var[1]),1) can be broken ...


4

There IS a way to do it in the standard raster calculator ... but it's a kludge ... (iraster@1 > 2) + (iraster@1 > 4) + (iraster@1 > 6) This does a comparison test inside each set of parentheses, returning the value '1' for each true comparison, '0' otherwise. Thus, if the raster value of a cell is 5, (iraster@1 >2) returns 1, (iraster@1 > ...


4

The Raster|Extraction|Clipper tool will help you to do this. You can open the tool and then click and drag in the raster image to select the area you want to export as a new raster (Clipping mode: Extent), and then refine the exact coordinates in the Extent fields (if necessary). Probably no way to do contours on only a selection of a raster; clip it this ...


4

You can use gdal_translate utility. Use the option -scale [src_min src_max [dst_min dst_max]] with src_min and src_max as current min/max values from your data and 0,255 as dst_min,dst_max. If you have installed QGIS with OSGeo4W package, you may have the terminal program called 'MSYS'. Open that and just use the gdal_translate command. If not, from within ...


4

I assume that your graphs came from a R-script and that you are capable of using R. Here is a solution in R, which finds local maxima and minima along a data sequence x <- rnorm(50,mean=1500,sd=800) # Example-Data r <- rle(x) # Generate run sequence object min <- which(rep(x = diff(sign(diff(c(-Inf, r$values, -Inf)))) == 2, times ...


4

Region Group on your original classified raster will identify 'patches' and assign them each a unique number in the VALUE field. Note: an item called LINK is added to the attribute table of the output raster, which indicates the original value for each cell from the input raster. You can use the Zonal Geometry As Table tool again to get the area in map ...


3

The answer was posted here: http://lists.osgeo.org/pipermail/grass-user/2012-December/066646.html (use g.region to set the output extent). See also http://grasswiki.osgeo.org/wiki/Computational_region Note: Please consider to not do parallel postings in mailing lists and here since one of those may remain unanswered, not satisfying the other readers.


3

type your resolution of raster not "resolution" . also don't type +*/= by keyboard . use raster calculator buttons . resolution of your raster : right click your raster. click properties go to source tab . cellsize(x,y) is your resolution


3

No data values in a raster in ArcMap will nullify any summation resulting in nodata for any cells beyond the extents of the total area. Your workaround would be to produce rasters with the maximal extent, set the nodata values to zero and then sum. Not a pretty prospect and not necessarily what you want.


3

One method is to use the segments as zones and request zonal statistics for the point values. Provided there is at most one point per segment, many statistics will work, including max, mean, sum, and min. When there is more than one point per segment, you will need to decide how to combine the point values, but zonal stats is still a good candidate for a ...


3

You can use the set null tool in the spatial analyst toolbox to assign any cell values outside your desired range to null values. The result will be a new raster layer with only the cell values you wish to preserve. The expression you should use will be along the lines of: Value > -117 AND Value < -69 and the false raster should be the same as your ...


3

You can use Raster -> Raster Calculator. Using Raster calculator calculate an output raster which is the sum of all individual rasters. Assuming your individual rasters have value of 0 or 1 based of whether species are found or not, the resulting raster will have value > 1 where more than one species are found. You can convert the resulting raster to vector ...


3

Starting from QGIS 2.0 (and current development version), the class QgsRasterCalculator is available in python. Unfortunately it is not very well documented. The basic usage is, that you have to define an alias for each band used in the calculator expression in form of a QgsRasterCalculatorEntry Your example can then be written as follows, given you have ...


2

I'm assuming you're using the Spatial Analyst Extension. If I understand your question, and your method, the "," is just separating the inputs in the min function. So, you want to find the minimum cell value from the absolute value of the x raster and the y raster. I haven't used Raster Calculator for a while, but I don't think you can calculate the ...


2

"... I need to generate a new tif raster file (mask) from the nodata values of another tif raster file." You can use gdalwarp, via the command line, to convert a nodata value to an alpha mask: gdalwarp -dstalpha -srcnodata "0 0 0" -co "ALPHA=YES" "raster_w-nodata.tif" "raster_w-alpha.tif" You will want to read up on the creation options for GeoTIFF, ...


2

In python (with numpy, assuming "naip" is your 4 band image as a numpy array), the following will rescale your data to 0-255 in reverse: rescaled=((naip - naip.max()) * -255 / (naip.max() - naip.min())).astype(numpy.uint8) If your data is already >0 and <255 and you don't want to scale it from 0-255, but just reverse it: reversed=((naip - naip.max()) ...


2

Try setting the input rasters as variables - see Building expressions in Raster Calculator, especially the example on ModelBuilder. Or perhaps try setting up your expression in the Con tool. To pursue the python script option, see the code samples at the bottom of the Con tool help, as well as the multiple condition statement examples in the Conditional ...


2

If you provide more detail on how you reclassified and the specific raster calculation used to get the empty data raster (usually indicated by -3e20 to +3e20) that will be helpful in troubleshooting the problem. Assuming ArcGIS with Spatial Analyst, if reclassify and raster calculator are giving you empty output then try the following two tools to achieve ...


2

Here's some gdal python code to get NxN numpy arrays from point coordinates: def getwindow(ds,band,coords,window=[3,3]): rb = ds.GetRasterBand(band) gt = ds.GetGeoTransform() ncols=ds.RasterXSize nrows=ds.RasterYSize for mx,my in (coords): #Convert from map to pixel coordinates. #Only works for georansforms with no ...


2

If you try to output the iterate raster tool directly into raster calculator, you will only see the last iteration in the raster calculator layers and variables list. To get around this nuisance in model builder, use Collect Values to generate a list that you can pass off to Cell Statistics to do your calculations. Simply choose the "MEAN" overlay ...


2

You can incorporate Con into your raster algebra equation to make this calculation. Alternatively, use the Con (Spatial Analyst) tool. The following links will help you build the Con expression: Conditional evaluation with Con Building expressions in Raster Calculator


1

If you are familiar with R, use: column <- extract(RASTER, Samplingsites.spdf, buffer=...) SamplingSites.df <- cbind(SamplingSites.df, column) Where RASTER is your binary raster, and the SpatialPointsDataFrame are your set of point coordinates. You can even do this from within grass with spgrass6 to speed up the process. If you want to stay within ...


1

I think gt() is a function that is only available in RasterCalc plugin but not in the normal Raster Calculator that is available by default. But this functionality can still be achieved using logical operators: (a>b AND a>c) * a + (b>a AND b>c) * b + (c>a AND c>b) * c Only one of the three terms will evaluate to 1, the others will be ...


1

Enable the GRASS logging (in the SEXTANTE configuration dialog, under GRASS), and then have a look at the log, but in the "Info" branch. You should have there a "GRASS console output" entry. That will tell you more about what is happening when you call grass. Post it here so we can help you with it.


1

It will depend on the tool, but typically the intersection or minimum of inputs will be the default processed in them. More specific documentation on extent (what you are presumably meaning when you indicate sizes or row/col of rasters) with respect to environments settings and how you can change this can be read here: Output Extent (Environment setting) ...



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