Arcengle the processing of a hollow value (Null \ Nodata) value

Source: Internet
Author: User

One, Arcengle value assignment

There are no intrinsic functions found in the engine and can only be handled with GP tools.

<summary>
Null value processing Author:allenrobin http://gisrsman.cnblogs.com
</summary>
Private Static voidNull2number (Igeodataset Praster,stringoutpath,double number) { //Check out empty location (NULL location 1, non-null zone is 0) stringIsnullpath = System.IO.Path.Combine (Application.startuppath,"isnull.tif"); Geoprocessor GP=NewGeoprocessor ();//Initialize GeoprocessorGp. Overwriteoutput =true;//allow the result of an operation to overwrite an existing fileESRI. ArcGIS.SpatialAnalystTools.IsNull ISNULLGP =NewESRI. ArcGIS.SpatialAnalystTools.IsNull (); Isnullgp.in_raster=Praster; Isnullgp.out_raster=Isnullpath; Gp. Execute (ISNULLGP,NULL); //Set the empty (that is, 1) to 0 and the rest to the original valueGeoprocessor GP1 =Newgeoprocessor (); Gp1. Overwriteoutput=true; ESRI. ArcGIS.SpatialAnalystTools.Con CONGP=NewESRI. ArcGIS.SpatialAnalystTools.Con (); Congp.in_conditional_raster=Isnullpath; Congp.out_raster=Outpath; Congp.where_clause="Value = 1";//The place where the value=1 is the null to be queried .Congp.in_false_raster_or_constant =Praster; Congp.in_true_raster_or_constant=number;//change NULL to 0 or another value
Gp1. Execute (CONGP,NULL);
}
Second, the ArcGIS raster data null value processing

Refer to Handling in ArcMap

---------------------------------------------------------------------------------

When two rasters are superimposed, sometimes there is no data, value is nodata,nodata+ any number =nodata, so when you need to assign values to the raster null values, the conditional query function is used to assign the place of NoData.

1. Null value (Nodata) Assignment:

In the raster calculator, enter the function expression CON (ISNULL ([raster]), 0,[raster]). Where [raster] is the input raster name. A raster image is automatically generated with an external rectangle of the input raster image, where the grid value is not empty and where NoData is 0.

2. A specific value is converted to a null value

Use the function expression SetNull to assign a value of a specific raster value to a null value.

SetNull ([Raster==1],[raster]), the data in the raster value of 1 is empty, and the other retains the original value.

Citation: ArcGIS Raster data null processing

Arcengle the processing of a hollow value (Null \ Nodata) value

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.