ArcGIS Tutorial: Editing features

Source: Internet
Author: User

  Summary

Edit and update feature files by merging, numbering again, and deleting class features.

 How to use

· The Edit feature tool agrees that you can change an existing signature file by doing all or one of the following:

Merging a set of feature classes

Numbering feature class ID again

Remove features that are not required

· The input signature file must be an ASCII signature file. The file can be the output of a "multivariate analysis" tool (such as ISO clustering and creating features) that is used to generate files that include the required statistics.

The file must consist of at least two classes. This type of file can be identified by the. gsg extension.

· The input feature remap file is an ASCII file with two columns of values corresponding to each line, separated by colons. The first column is the original class ID value.

The second column includes the new class ID for updating in the signature file. All entries in the file must be sorted in ascending order based on the first column.

To merge a set of classes. Please place the same new class ID for the second value of the group's various IDs. Only classes that need to be edited must be placed in a feature remap file, and no matter what class does not exist in the remap file, the classes will remain intact. To delete a class feature. Use 9999 as the value of the second column of the class. In addition, the class ID can be numbered again as a value that does not exist in the input signature file. Here is a demo sample of the input feature remap file:

2:3

4:11

5:-9999

9:3

The previous example uses 3 to merge classes 2 and 9. Use 11 to merge Class 4, and delete Class 5.

· Suppose the input signature file includes a class feature name. And the features in the input feature remap file are merged, the associated name of the merged value is transferred to the output signature file.

· Assuming that the input is a layer created from a multiband raster (more than three bands), the operation takes into account all the bands associated with the source dataset. Instead of three bands loaded (symbolized) by a layer.

· You can specify a subset of bands for a multiband raster as input to the tool in several ways.

· Suppose you want to use the tool dialog box, navigate to the multi-band raster by using the button next to the input raster band. Open the grid and select the desired band.

· Assuming that a multiband raster is a layer in the table of contents, you can use the Create Raster Layer tool to create a new multiband layer that includes only the desired bands.

· You can also use band compositing to create a new dataset that simply includes the desired bands, and use the resulting dataset as input to the tool.

· In Python, you can specify the desired bands directly in a list in the tool's parameters.

  Grammar

Editsignatures (In_raster_bands, In_signature_file, In_signature_remap_file, Out_signature_file, {sample_interval})

  Code instance

  Editsignatures Demo Sample 1 (Python form)

This example edits the signature file based on the input remap file.

Import arcpy

From arcpy Import env

From ARCPY.SA Import *

Env.workspace = "C:/sapyexamples/data"

Editsignatures ("redl123", "C:/SAPYEXAMPLES/DATA/ZSAMP12.GSG",

"C:/SAPYEXAMPLES/DATA/ZSAMP7.RMP",

"C:/SAPYEXAMPLES/OUTPUT/REDLREMAP.GSG", "" ")

  Editsignatures Demo Sample 2 (stand-alone script)

This example edits the signature file based on the input remap file.

# Name:EditSignatures_Ex_02.py

# description:edits and updates a signature file by merging, renumbering,

# and deleting class signatures.

# requirements:spatial Analyst Extension

# Import System Modules

Import arcpy

From arcpy Import env

From ARCPY.SA Import *

# Set Environment settings

Env.workspace = "C:/sapyexamples/data"

# Set Local Variables

Inraster = "Redl123"

Oldsig = "C:/SAPYEXAMPLES/DATA/ZSAMP12.GSG"

Sigremap = "C:/SAPYEXAMPLES/DATA/ZSAMP7.RMP"

Outnewsig = "C:/SAPYEXAMPLES/OUTPUT/REDLSIG.GSG"

Interval = ""

# Check out the ArcGIS Spatial Analyst extension License

arcpy. Checkoutextension ("Spatial")

# Execute Editsignatures

Editsignatures (Inraster, Oldsig, Sigremap, Outnewsig, Interval)

ArcGIS Tutorial: Editing features

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.