Tag Info

New answers tagged

0

You may want to investigate the RasterCalc plugin and its conditional function. The default Raster Calculator doesn't have this ability. The plugin has documentation on syntax. Without knowing the details of your raster I can't say for sure, but assuming the 'accurate' raster only has data in the desired cells and everything else is 0, you'll make a con ...


0

You want the Zonal Statistics tool is what you want. Your classed raster will be your zones and your 'different' raster will be the input for the statistics. It will calculate the average value of the cells from each zone and create a new raster that looks like your classed raster but has the average values instead of class values in the data. Note this ...


2

You can use the Con (Spatial Analyst) tool to calculate the area of specified elevation values. In this example, I stated that I wanted all elevation values of a floating point DEM > 400 = 1, else = 0. The black and yellow image is the result (Figure 1). Then, simply open the attribute table and look at the count next to the Value = 1 row (Figure 2). ...


1

If your elevation raster is integer, Build Raster Attribute Table. Then, select the rows in the table of interest, and look at the Statistics for the Count field (right-click 'Count' -> Statistics). The SUM value is the number of pixels selected. Multiply this value by the area of one pixel (raster layer properties -> Source tab -> cell size). Repeat with no ...


0

Update: Have achieved this the long way by creating rasters at spacing of 25 cm over the area, and then using the zonal statistics tool to extract the number of cells at a certain height inside a given polygon. Combined with the LIDAR info. the areas are then easy to calculate.


0

In ArcGis you can use point sampling using the spatial analyst tool Sample which creates a table showing the values for each point. Add the fields required, attribute join the table from the sample and use field calculator to copy the value from the joined data. To do this in QGIS (if you don't have the spatial analyst license) you can use the point ...


0

There are several environment settings that affect raster operations. In this instance you should be setting: Output Extent - to ensure that the new raster will be of the same size. Snap Raster - to the raster to match with, this ensures the cells line up exactly. Cell Size - to make the output raster the same cell size as the one you're matching to. All ...


0

In newer QGIS versions (I tested it only in QGIS 2.6) you can set the resolution when you save a raster via "save as" (quite similiar with ArcMap)


4

I certainly wish that more people would be as concerned about the display of digital elevation data as you are. I see so many examples of poorly rendered DEMs that it's somewhat disconcerting. So thank you for raising this question. First, to answer your question of "how can I be sure that I am using a correct setting", I don't think that there is such thing ...


2

If you do have ArcGIS and no SA: you might consider converting to points, deleting the values below 12, making the rest of the values a single integer, convert to raster, and then converting to polygon.That polygon would be used in the clips and advanced drawing layer masks, I tested this on an SRTM, and it worked well: import arcpy from arcpy import env ...


3

You cannot clip a vector file with a raster file. So you need to convert your raster to polygon first. In ArcGIS, you can use "raster to polygon" from the Conversion toolbox (no need for an extension). The problem is that you first need to create the mask, and there is no built in tool in ArcGIS without spatial analyst. So this step has to be done in ...


1

For a DEM, I would expect regular interval (similar to what you get with contour lines). Therefore, I would recommend a linear stretch. Maybe you could just increase the contrast in the area where you have the most data by sacrifying the contrast for the very few very high pixels (summits). So putting your line from the bottom left (0,0) to (6,8) counting ...


3

If your values are Normally distributed then approximately 68%, 95% & 99.7% of the values lie within 1, 2 & 3 Standard Deviations respectively, see here, so if you are stretching your values of the colour map using SD(2) all of the values that are below 2.5% will be black and all over 97.5% will be white, (depending on your colour scale of course) - ...


0

In case anyone is interested, the problem above was a simple error on my part - the srs for the Layer was incorrect.


0

You did not specify which software you use in your question. Based on some of your other questions you are using ArcGIS in which there are a couple of ways to solve this problem. One would be to use Raster to Polygon to convert your raster to a vector layer. You may then need to merge or dissolve the resulting shapes into a single bounding box which you can ...


0

I've thought of one way to do what you want - there may be others that are more efficient. First, you need to create a binary Zone raster. This will be 0 for everything not in a zone and 1 for everything that is. Then you'll need a raster of your modified values. You can use the current floor raster as a starting point and run Raster Calculator on it to ...


0

Finally it worked with the 'Mosaic To New Raster' tool. I used MAXIMUM as Mosaic Operator. I have no idea why it works now, suddenly, and did not work when I tried it earlier. But now I have my layer and that´s important ^^. Thanks for all the answers and helping comments!


0

Try the Combine tool which takes multiple input rasters and assigns a new value for each unique combination of input values in the output raster


0

If you want a single raster output, probably map algebra with something like : Con(IsNull("rail"), "buffer", "rail") Con("rail" > 0, "rail", "buffer") will work (with rail and buffer the names of your layers. In the firest case, the background is No Data, and in the second case it is 0. Otherwise, you might want to use "composite band" to create a 2 ...


0

Have a look at the Conditional Toolset in Spatial Analyst. Without knowing the type of values in your rasters, it's difficult to say which one will be best for you. But I think the Con tool will probably do what you want.


2

In GRASS GIS, you can use r.thin for this task: The code implements the thinning algorithm described in "Analysis of Thinning Algorithms Using Mathematical Morphology" by Ben-Kwei Jang and Ronlad T. Chin in Transactions on Pattern Analysis and Machine Intelligence, vol. 12, No. 6, June 1990, along with further subsequent improvements. In QGIS, you can ...


2

So you want to convert all values to the same constant value and NoData should remain NoData. Instead of Reclassify, use the Con tool with your input raster as 'Input conditional raster', and the constant value as 'Input true raster or constant value'. E.g.: import arcpy cst = 5 # your constant value outCon = Con(r"C:\data\intput.tif", ...


1

With ArcGIS Spatial analyst, you can use the "thin" tool. Their algorithm is described in Zhan, Cixiang, 1993, A Hybrid Line Thinning Approach, Proceedings Auto-Carto 11, Minneapolis , pp. 396-405 As a remark, if you are interested in the process, you can also have a look at the skeletonization process in mathematical morphology. I don't know about a ...


0

I would suggest taking a look at the ArcScan toolbar if you are using ArcGIS. It has a range of functions in addition to Raster vectorisation which I think should help. Specifically the Raster Cleanup tools such as erosion and dilation which will make your lines thinner. Also check out raster snapping as that may also be useful. The image below is from the ...


-1

I think that somewhere in the classification process you are including spatial coordinates or pixel row/column IDs of your training samples. For a purely spectral classification and classes distributed in a spatially homogeneous manner it is not required to include spatial coordinates. From a random forest perspective, this would explain the linear ...


0

There is a Curvature GP tool in Spatial Analyst that may be helpful. It can tell you how convex or concave a surface is. For example it can be used to determine ridges and valleys. You would still need to convert the output raster to vector - likely it would be lines that you convert to initially.


1

This is a bit of a late answer, but I thought it was worth contributing. As a polyline is just a series of points you should be able to obtain the Mean value you want by converting the Polyline nodes into points by going Vector > Geometry Tools > Extract Nodes... You can then extract the underlying Raster values for each of these points by using the Point ...


1

I see that the question and answers are quite old, but still will post my answer as it could help someone in the future. I get this error mostly because invalid characters in the paths and file names. Keep your whole path strictly in ASCII without spaces and the filename under 13 characters.


2

You could: Generate contours at the desired intervals from your DEM and use the lines to cut up your polygon. Clip your DEM using your polygon, then reclassify the DEM using the desired interval ranges, followed by a little math - get the number of pixels in each class times the area of a pixel. (See Measuring area of raster classes? which discusses ArcGIS ...


0

So, I solved my problem in the way that I actually converted my Raster data into Polygon, draw Buffer around it with the Buffer tool and then converted it back into Raster.


0

Step one is to read GeoSolutions excellent GeoServer on Steroids: http://demo.geo-solutions.it/share/foss4g2013/gs_steroids_sgiannec_foss4g2013_01.03.pdf - it's pretty much the definitive guide to GeoServer optimisation. You'll want pages 10-18. A simplified version of what you want to do is: Convert into GeoTiffs Use Inner Tiling Add Overviews Load them ...


5

This is a bit messy thing. You should read at least this GeoTIFF document http://www.remotesensing.org/geotiff/spec/geotiff2.5.html#2.5.2.2 and some GDAL considerations http://trac.osgeo.org/gdal/wiki/rfc33_gtiff_pixelispoint. As a rule of thumb all rasters (aerial, satellite images) use pixel-is-area and measurement data like DEMs use pixel-is-point. ...


3

Both are common, and neither can be considered entirely standard. For GeoTIFF, both are possible - see Section 2.5.2.2 for the GTRasterTypeGeoKey that describes the interpretation method. The GeoTIFF FAQ suggests using the default (PixelIsArea) value of that tag for compatibility with older versions of GDAL. The World File format uses the centre of the ...


1

I do not know if there is a convention, but coordinates on images normally refer to pixel centres. This this can differ in the case of rasters produced from, for instance, computer models. If you are not sure, you can use GMT, the Generic Mapping Tools, to test you rasters and convert them to some appropriate format, since it explicitly offers the option of ...


1

At first, you should distinguish "georeferenced rasters" from "non georeferenced raster". The second group includes all the raw image acquisitions from remote sensing (aerial photographs, satellite images, UAV images) or scanners. Those raw images will be captured according to the sensor orientation, which is rarely North up. They are affected by geometric ...


0

You should be fine if it was consistently undefined in them all but they all really had the same coordinate system (just not defined).


1

1) Does r.neighbors walk through the raster collecting cell values? The neighborhood operators determine a new value for each cell as a function of the values in its neighboring cells. All cells in a raster map, except for the cells at the map boundaries, become the center cell of a neighborhood as the neighborhood window moves from cell to cell ...


1

I've just tested the code below and it works fine. You need to be careful in your code that you don't try and apply symbology to the template raster itself otherwise you'll receive an error so I've added an if statement. import arcpy mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd)[0] rasters = arcpy.mapping.ListLayers(mxd, ...


0

Attachments may be useful here. If so then you can use the Generate Attachment Match Table to batch load your images.


1

Given a mosaic dataset, you can select the footprints of interest and then in the table of contents right-click the footprint layer > Data > Download Selected Rasters... which then allows you to choose which rasters to download.


0

The code below works for me, though I think it's a bit sloppy. I had to include make raster layer and save to layer for it to work. arcpy.MakeRasterLayer_management(in_raster, out_raster) arcpy.SaveToLayerFile_management(out_raster, display_raster, "ABSOLUTE") # Adjust symbology of Raster layer ...


2

There's a few minor hiccups in your code, I've re-written it (hopefully) better: import arcpy arcpy.env.workspace = "c:\DEM Files" # not requred mxd = arcpy.mapping.MapDocument("Current") # This MXD df = arcpy.mapping.ListDataFrames(mxd,"Georgia")[0] # the first data frame called Georgia rasters = arcpy.mapping.ListLayers(mxd,"*",df) # all the layers # ...


0

What is "Feature_El147"? The help for that function says that the second argument has to be a: Feature Layer; Raster Layer;TIN Layer; Network Analysis Layer;Geostatistical Layer. Which in this context refers to a layer currently in the map document that has the symbology you want. Is that how you've got it set up?


0

Personally I'd create a mosaic dataset (or VRT) and extract the area of interest from that. VRT is supported by Global Mapper but will be quite slow, I would go with the mosaic dataset for this operation. Both of these raster types are links only to their respective rasters so don't take very long to create as the rasters themselves aren't being copied. ...


0

You can define the labelling style using the label.style argument of lattice::contourplot. In my opinion, you should choose align. It is not a complete solution because it does not break the contour lines, but it is better than the default method. On the other hand you can overlay two different contour plots with different cuts, line widths, and labels ...


1

It's because NetCDF does not have names for each slice in the 3rd (and higher dims), but raster does. NetCDF has a name for a "variable" (which is the array), but raster has a name for every slice in the variable. (This is the standard mess where we conflate data fields/attributes with dimensions). There's no straightforward way to store these names in ...


3

This sorts itself out with the base function mean. mean(c(20,10),na.rm=TRUE) # where both values occur mean(c(20,NA),na.rm=TRUE) # where the first value occurs mean(c(NA,10),na.rm=TRUE) # where the second value occurs mean(c(NA,NA),na.rm=TRUE) # where both values are nodata If you think of raster functions in terms of vectorization then things become ...


1

The gdalbuildvrt program isn't the right tool for this task. It's for making virtual mosaics and multiband images. I suggest this approach: Define the domain in which you want results (geotransform, rows and columns). We used to call this a "canvas" back in the day. Warp (gdalwarp, nearest neighbor) your source TIFFs to that domain, producing TIFFs with ...


1

You can use Expand to buffer raster "zones" that represent specific values in the raster. Buffers value 10 by 3 cells Expand("landcover", 3, [10])


1

You can use the euclidean distance tool, see: http://resources.arcgis.com/en/help/main/10.2/index.html#//009z0000001p000000



Top 50 recent answers are included