Tag Info

Hot answers tagged

10

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


9

you can do more with Con than with Reclass, for example you can have continuous output value with Con. You can also use some map algebra within your statement, and you can have multiple inputs. However, if you need an output with a large number of classes, reclass is easier to use because you can use the built-in partitioning methods based on the histogram. ...


7

Would it be an option to use r.reclass to assign for example 1 to areas of interest and 0 to others. Then use r.to.vect with the -v flag.


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


7

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


6

All of the detailed information about MOD12 data can be found in the Algorithm Theoretical Basis Document (ATBD). On page 23, it says that the forest classes require >60% coverage of the pixel.


6

You simply need to use following expression raster A insularis_1@1 > 0 The expression means , set all values greater than 0 as 1 and others as 0.


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


5

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


5

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


5

In Python: def function(field): if field>4: return "0.5" else: return "A" And below: function(!choose from Fields!)


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

You could use the Raster Calculator to do this, square the pixel values and then extract the roots. Something like this: sqrt ( myraster@1 * myraster@1 ) Regards, Nick.


4

You can actually enter multiple ranges of values as a single entry in the Reclassify tool if you use a semicolon between ranges. An example reclassify input from your screenshot would be: Old Values 333 - 334; 433 - 434 New Values 21. When you click away from your entry (either to run the tool or add another entry), you will see that the tool automatically ...


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

The easier way is to use GRASS (also using the QGIS/GRASS plugin) and the r.reclass module. You will need to create a reclassification rule file, where you can use the keyword "through" or the wildcard "*" to reclassify multiple values in one rule.


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

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

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

With the Advanced Interface option of the toolbox, I use the Reclassify Grid Values from the SAGA GIS, It a really intuitive tool with options of reclassification by single value, range and using a table. I prefer this over the r.reclass because you do not have to create additional files.


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

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

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

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

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.


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

there is a warning about using the Quantile breaks noted in the help file. "Because features are grouped in equal numbers in each class using Quantile classification, the resulting map can often be misleading. Similar features can be placed in adjacent classes, or features with widely different values can be put in the same class. You can minimize this ...


2

To sum many rasters (> 2) together, I'd suggest using Cell Statistics. The example from ArcMap help: # Execute CellStatistics outCellStatistics = CellStatistics([inRaster01, inRaster02, inRaster03], "SUM", "NODATA") # Save the output outCellStatistics.save("C:/sapyexamples/output/cellstats") It is slightly trickier in your case since you have an ...



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