How To: Use the checkfeatures command to validate geometry in an ArcSDE for Oracle feature class
Checkfeatures is designed to examine the validity of any registered ArcSDE for Oracle layer, regardless of the storage type. It is particularly useful for storage types that can be edited using SQL (such as SDO_GEOMETRY) and thus may have features inserted that will not pass ArcSDE shape validation. The rules for ArcSDE shape validation are described in the ArcSDE Developer Help.
Currently, this command is available in ArcSDE 9 for Oracle ONLY. It will not work with earlier versions of ArcSDE or with other database platforms. When checkfeatures is run on unsupported ArcSDE database servers, it will display the following message:
"Unable to set mode to read invalid shapes. Cannot continue. (This capability may not yet be implemented on this type of ArcSDE server.)"
Follow the steps below to validate features.
- Register the table with ArcSDE using autoregistration or manual registration with the sdelayer command.
- Review the checkfeatures command syntax.
checkfeatures -l <table_name>,<shape_column> [-C <rowid_column>] [-T <output_table> <-k keyword>] -u <username> -p <password> [-s <server>] [-i <instance> [-D <database>] [-r <rowcount>] [-E <errcount>] [-v <verbosity>] [-w <where_clause>] Options -C Row ID (a.k.a. objectid) column name. (Default: registered Row ID column, if any.) -D Database name. (Not used with Oracle.) -E Maximum number of shape error to find before exiting. (Default: unlimited.) -I ArcSDE instance. (Default: esri_sde) -k Keyword used for creating output table. (Default: DEFAULTS) -l Layer to examine. -p Password. -r Report progress every N rows. (Default: don't report progress.) -s ArcSDE server name. (Default: local host.) -T New table to receive list of invalid geometries and reasons they are invalid. (Default: don't create an output table.) -u User name. -v Verbosity, how much information should be displayed. 0 = don't display results. Results will still be written to output table, if specified. 1 = display brief summary. 2 = in addition, display reason for each invalid feature (default). 3 = in addition, display invalid feature's type and number of vertices. -w WHERE clause for rows to examine. Don't include the word "WHERE". (Default: examine all rows.)
- If the -T option is specified, checkfeatures will create an output table containing two columns. The first column contains the value from the selected Row ID column corresponding to the row that failed ArcSDE shape validation. The second column is a text column called REASON that has a short description of why the feature failed.
CREATE TABLE REJECTED_SHAPES AS SELECT A.* FROM MY_IN_TBL A, MY_OUT_TBL B WHERE A.MY_ID = B.MY_ID;These tables can be used to examine or extract the failed features from the input table.
- When are ArcSDE features validated?
- Features of third-party registered Oracle Spatial tables do not draw at full extent
- What is the future support for the ArcSDE checkfeatures tool?