Tag Info

Hot answers tagged

9

Using GRASS and the r.reclass module, yes. However, you actually need to use the keyword "thru". Example: For a raster elevation grid, to be reclassified into values based on 100m-intervals: 500 thru 599.99 = 500 600 thru 699.99 = 600 700 thru 799.99 = 700 Etc.. And you save that into a notepad text document(with no spaces between lines). Then when ...


7

The first attached script successfully reclassified your AK NLCD data in about 15 minutes (i7, 12GB RAM machine). Since the original dataset is almost 7GB you may be encountering memory issues. If you cannot process the entire dataset in one chunk, try splitting it up with the second script prior to reclassification. My recommendation is to take a small ...


6

beside @R.K. answer, you can use r.null in grass too. r.null - Manages NULL-values of given raster map. EXAMPLES Set specific values of a classified map to NULL: r.null map=landcover.30m setnull=21,22 Set NULL-values of a map to a specific value: r.null map=fields null=99 i hope it helps you...


6

I think the RasterCalc plugin should be able to solve your problem. Once you've installed it, you can use the following query (assuming that NULL values corresponds to -9999; you can check this value in Transparency tab of the Layer Properties): eq( [your_raster]@1, -9999, 0 ) eq means equal to. This tells RasterCalc that all pixels in your raster with ...


6

you can do this with arcpy, if you want. In this code, any input cell with a value 9999 will be set to NoData in the output raster, and the remaining cells will retain their original value. import arcpy from arcpy import env from arcpy.sa import * env.workspace = "C:/sapyexamples/data" outSetNull = SetNull("elevation", "elevation", "VALUE = 9999") ...


4

This is a Job for the Field Calculator. See this Python example at Calculate Field examples Parser: Python Expression: Reclass(!WELL_YIELD!) Code Block: def Reclass(WellYield): if (WellYield >= 0 and WellYield <= 10): return 1 elif (WellYield > 10 and WellYield <= 20): return 2 elif (WellYield > 20 and WellYield <= 30): ...


4

yes, r.reclass is for reclassing thematic rasters, like the Corine Land Cover. It will work for your data, but the routine will cast the float numbers to integers before doing the reclass, so it might lead to unexpected results. What you are looking for is r.recode The rules are defined in many formats, one of those is the following: ...


3

Because the Raster Calculator is a spatial analyst tool, you can utilize the Mask environment. From there, you can use a variety of commands to perform the reclassification: common ones include Con, Pick, Is Null and Set Null, based on your needs. To check if a specific spatial analyst tool honors the Mask environment, simply scroll down to the ...


3

whuber made a comment regarding the usage of logical tools to express this reclassification. After a little digging, I found InList, as part of the Logical Math toolset of Spatial Analyst, filled my need. import arcpy # Check out the ArcGIS Spatial Analyst extension license arcpy.CheckOutExtension("Spatial") from arcpy.sa import InList # Pixel values of ...


3

Comprehensive raster functionality is apparently rather new to PostGIS, but the official reference should be helpful: http://postgis.net/docs/manual-2.0/RT_reference.html I think this is the desired function, with examples: http://postgis.net/docs/manual-2.0/RT_ST_Reclass.html And for constructing the reclassarg, the docs are a little hazier: ...


2

Doing that, you should have a new vector layer with an attribute containing the values. You then use v.colors to specify the desired color for a given value attribute. See the exemple at the bottom of the given page to understand how the rules mechanism works.


2

Your approach used to work fine in old versions of Arc but not now. You can around this by adding in another value (set to be identical to the old one). One value is usually sufficient unless you have floating point values, in which case I would add the highest and lowest original values (set to be the same as their original value). The values in between ...


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

For your collection of avalanche simulations, Find the minimum and maximum values. Use the Cell Statistics tool to accomplish this. Build a Remap table using the min/max values from step 1. Format it as described in the help section of the Reclassify by Table tool. Use the Reclassify by Table tool to reclassify your simulation results to a common scale(as ...


2

The File type of the table is "Info Table" .You can add the table in ArcMap => Right click to the table => Data => Export = > Export your Info table to the Text File. Import the text file to Excel : Open Microsoft Excel Select Data tab Click From Text Import your Text File then save the Excel. change your reclassify then import the Excel to Arcmap and ...


2

One option would be to create a color map file (.clr) you can reference in your script. Then it is simply a matter of using Add Colormap (Data Management) to assign your color map to the raster layer: arcpy.AddColormap_management (in_raster, {in_template_raster}, {input_CLR_file})


2

I recently ran into this limitation when creating an esri addin toolbar. I was limited to the option that Chris R mentioned, creating and saving a template layer with my python code. It was fairly simple and works remarkably well. To not hard code the path to the symbology layer, I used os.path to get the path of the layer saved with the python code... ...


2

Seems the bugs you mention with GRASS are a known issue with the standalone version. Nothing to do with mapcalc... this was a packaging issue that has been solved on osgeo4w and now is just needed to wait for updated standalone installers. Réf : https://hub.qgis.org/issues/8529


2

If I understand well, you have one class that needs to be changed only if it is located off the coast So what you need to do is convert your ZIP code boundaries to raster (feature to raster): this will produce a raster that is Null (NoData) where you are not on inland. Then apply a conditional statement in order to change your wetland values. In the ...


2

This sort of operation is often accomplished using a mask in the environment settings accompanied by a Spatial Analyst tool that honors the mask environment. The Con or Reclassify tools could be used to perform the analysis you describe.


1

The obvious difference is that the reclassify tool will create a new file, while the symbology is stored in the layer file but does not change the input data set. This file will usually be markedly smaller than your input file thanks to better compression, which could speed up display and analysis. Most processing tools will look at the data instead of the ...


1

What you want to do, is quite easy. The high level steps can be as follows: Using Raster calculator or the Con geoprocessing tool, reclassify the raster into three classes: null for oceans/water, 1 for below 2000 m and 2 for above 2000m. Using Raster to Polygon tool, create a featureclass from this raster. Intersect the output of 2, with your countries ...


1

I guess your data is from http://www.ngdc.noaa.gov/mgg/ocean_age/ocean_age_2008.html In the data description linked at the bottom of the site it is stated that the raster values are millions of years, mutlipied by 100. So you have to divide by 100. In Raster calculator, double-click on the @1, click on the / and input 100 afterwards. select new filename, ...


1

Sextante is still in active development and most likely there are a lot of bugs that occur in certain situations and on different systems. In the meantime try to use the SAGA sextante toolset. It also has a reclass tool called "Reclassify Grid Values" in the "Grid - Tools" toolbox. And don't forget to submit a bug to the qgis development team.


1

I think you are using the Reclass by Table (Spatial Analyst) geoprocessing tool instead of the plain Reclassify (Spatial Analyst) geoprocessing tool. The former takes a Table View containing the ranges of values to be reclassified; the latter utilizes the arcpy.sa.RemapValue Python objects to define the ranges of values to be reclassified. So I think your ...


1

This grid looks like the result of a Combine operation. It overlays two co-registered categorical ("integer") grids, producing a table of all unique combinations of categories appearing among the cells. To apply that here, create a constant grid equal to the elevation. Make sure it is categorical (such as by applying Int). Combine this with the other ...



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