The sdelayer command administers feature classes.
1. Add operation: Adds a spatial column to a business table, creating a feature class. This must be done by the owner of the table.
$ sdelayer -o add -l victoria,parcels -e aA3+ -g GRID,1000 –x 0,0,200 -z 0,200 -P BASIC -L off -G 28355 -u av -p mo -i esri_80
2. Alter operation: Modifies some characteristics of a feature class.
Using the alter operation of sdelayer, you can modify the entity mask, spatial index grid cell sizes, coordinate system ID, description, envelope, or configuration keyword.
To modify the entity mask, configuration keyword, coordinate system ID, and description:
$ sdelayer -o alter -l victoria,parcels -e al+ -k vict2 -G 4326 –S "Victoria Parcels" -u av -p mo -i esri_40
To change the grid size:
$ sdelayer -o alter -l victoria,parcels -g GRID,2000 -u av -p mo –i esri_40 -N
The -N option suppresses the prompt to verify the change in grid size.
To alter a layer's (blocks) precision to high precision and specifies the x,y, z-, and m- offsets and scales, and the projection file to use:
c:\> sdelayer -o alter -l blocks,shape -P HIGH -x 1,1,1 -z 0,0 –m 0,0 -G file=c:\blocks.prj
3. Delete operation: Deletes an entire feature class. All features and the feature class definition are permanently removed. The business table is not deleted.
For feature classes that have been implemented using the binary schema (Oracle and SQL Server only), deleting a feature class drops the DBMS spatial tables (the F and S tables) and removes the definition of the feature class from the ArcSDE data dictionary tables.
Under the spatial types (UDT) and functions implementation, the spatial column is made null, and the feature class definition is removed from the ArcSDE data dictionary tables. The business table still exists and is registered. To completely remove the business table, use sdetable -o delete. You should also use sdetable –o delete to delete views, NOT sdelayer -o delete.
The sdelayer command is not geodatabase aware, therefore, references to feature classes that participate in feature datasets, networks, and topologies will not be removed. Such feature classes should be removed using ArcCatalog.
$ sdelayer -o delete -l victoria,parcels -u av -p mo -i esri_80
4. Describe operation: Lists feature class definitions (short form). If a feature class is not specified, lists all feature classes to which the user has access.
$ sdelayer -o describe -l borders,fid -u av -p mo -i esri_80
Layer Administration Utility
-----------------------------------------------------
Table Owner : AV
Table Name : BORDERS
Spatial Column : FID
Layer id : 1
Entities : a
Layer Type : SDE
I/O Mode : NORMAL
User Privileges : SELECT, UPDATE
Layer Configuration : DEFAULTS
-----------------------------------------------------
5. Describe_long operation: Lists feature class definitions (long form). If a feature class is not specified, lists all feature classes to which the user has access.
The describe_long operation returns the same information as describe plus such information as feature class description, database, SRID, minimum shape id, false x and false y offset, system units, z offset and units, measure offset and units, spatial index information, layer envelope, creation date, autolocking state, precision, and coordinate system.
c:\ sdelayer -o describe_long -u raster -p raster -i 12000 -s joe –l counties,feature
Layer Administration Utility
-----------------------------------------------------
Layer Description : None
Table Owner : RASTER
Table Name : COUNTIES
Spatial Column : FEATURE
Layer Id : 39
SRID : 2 Minimum shape Id : 1 Offset :
falsex: -179.00000
falsey: 18.00000
System Units : 10000000.00000
Z Offset : 0.00000
Z Units : 1.00000
Measure Offset : None
Measure Units : None
XY Cluster Tolerance : 0.00000
Spatial Index :
parameter: SPIDX_GRID,GRID0=1.6,GRID1-9.6,FULL
exist: Yes
array form: 1.6,9.6,0
Layer Envelope :
minx: -178.21760 miny: 18.91278
maxx: -66.96927 maxy: 71.40624
Entities : a+
Layer Type : SDE
I/O Mode : NORMAL
Autolocking : Enabled
Precision : BASIC
User Privileges : SELECT, UPDATE, INSERT, DELETE
Coordinate system : UNKNOWN
Layer Configuration : DEFAULTS
-----------------------------------------------------
6. Feature_info operation: Reports information about the feature, such as shape validity, measurements and extent information, the FID, the presence of annotation, whether the feature contains CAD data, the presence of inclusions or cojoined inner rings, the minimum precision of the layer, and the number of points, parts, and subparts contained in the feature.
c:\> sdelayer -o feature_info -l world.lakes,feature -r all –i sde_world -s myrtle -u him -p shade
ArcSDE 9.2 Oracle 9i Fri Mar 3 18:54:58 PST 2006
Layer Administration Utility
--------------------------------------------------------------------
---------
Row Id, FID, Entity Type, Annotation, Cad Data, Number of Points,
Number of Parts, Number of Subparts, Self-Touching Rings, Minimum
Precision, Verification
0,1,A,F,F,38,1,1,F,BASIC,0
0,2,A,F,F,29,1,1,F,BASIC,0
7. Grant operation: Grants a user access to a specified feature class
c:\> sdelayer -o grant -l victoria,parcels -U bob -A SELECT -u av -p
mo -i esri_80
8. List operation: List the fields of a feature including the point values for all points that define the shape of the feature.
c:\> sdelayer -o list -l states,shape -v 11 -i esri_40 -s K9 -D usa
-u me -p mo more
ArcSDE 9.2 for SQL Server Build 723 Wed Aug 3 16:00:40 2005
Layer Administration Utility
-----------------------------------------------
Map Layer 41
Feature Entity Type Area
Number of Points 179
Feature Envelope Min X -124.55840
Min Y 41.98779
Max X -116.46944
Max Y 46.23626
Polygon Perimeter 24.78668
Polygon Area 28.18703
------------------------------------------------
Point X Y
------------------------------------------------
1 -121.44041 41.99446
2 -120.87083 41.98779
3 -119.99240 41.98931
4 -119.35065 41.98896
5 -119.30991 41.98924
6 -118.18433 41.99674
7 -117.01791 41.99490 ...
9. Load_only_io operation: Sets the I/O mode of the feature class to load-only, allowing only store and replace I/O operations. normal_io sets the I/O mode of the feature class back to normal I/O mode.
Use load-only mode when performing large inserts to avoid the continuous update of the feature class's indexes.
You cannot place a feature class registered as multiversioned in load only I/O mode.
If the feature class is in normal I/O mode, the indexes on the spatial index table are dropped. While rebuilding the spatial index table, the feature class is set to load-only mode. The indexes are rebuilt when the feature class is reset to normal I/O mode.
When the feature class is in normal I/O mode, the envelope is automatically updated whenever a feature that extends the current envelope is added. The envelope is not updated while the feature class is in load-only I/O mode but is recalculated to the full extent when the feature class is reset to normal I/O mode.
The sdelayer command always creates a feature class in normal I/O mode. The loadonly I/O mode is provided to make the bulk data loading processes more efficient.
$ sdelayer -o load_only_io -l victoria,parcels -u av -p mo –i esri_40
$ sdelayer -o normal_io -l victoria,parcels -u av -p mo -i esri_40
When the feature class is returned to normal I/O mode, the spatial index table and database indexes are rebuilt. If the operation does not complete successfully for any reason, the feature class is left in load-only mode.
10. Register operation: Registers a feature class having a spatial column defined using Oracle Spatial Geometry Type, Informix Spatial DataBlade, DB2 Spatial Extender, or Spatial Type for Oracle. Registering a feature class with ArcSDE registers the business table in the TABLE_REGISTRY system table.
$ sdelayer -o register -l victoria,feature -e aM -C parcel_no,USER -u av -p mo -i esri
There are certain requirements, specific to each DBMS, that must be met to register a table as a layer with ArcSDE. These include the following:
• Only the owner of the table can register it with ArcSDE. Therefore, the user and password you provide with the -u and -p options must be those for the table owner.
• It must have only one spatial column.
• It must have no other columns of a user-defined type.
11. Revoke operation: Revokes access to a feature class from a user.
c:\> sdelayer -o revoke -l victoria,parcels -U bob -A SELECT -u av -p mo -i esri_80
12. stats operation: Reports feature class statistics, including feature entity type counts, total number of features, feature ID, the date of the last feature modification, the number of points in the largest feature, minimum and maximum linear feature lengths, minimum and maximum polygon areas, and the feature class envelope.
$ sdelayer -o stats -l victoria,parcels -u av -p mo -i esri_40
13. si_stats operation: Reports spatial index statistics (Oracle and SQL Server).
Optimum grid cell sizes depend on the spatial size of all features, the variation in spatial feature size, and the types of searches to be performed on the feature class.
$ sdelayer -o si_stats -l victoria,parcels -u av -p mo -i esri_40
Layer Administration Utility
--------------------------------------------------------
Layer 1 Spatial Index Statistics:
Level 1, Grid Size 200 (Meters)
------------------------------------------------------------------
Grid Records: 978341
Feature Records: 627392
Grids/Feature Ratio: 1.56
Avg. Features per Grid: 18.26
Max. Features per Grid: 166
% of Features Wholly Inside 1 Grid: 59.71
------------------------------------------------------------------
Spatial Index Record Count By Group
Grids: <=4 >4 >10 >25 >50 >100 >250 >500
--------- ------ ------ ------ ------ ------ ------ ------ ------
Features: 627392 0 0 0 0 0 0 0
% Total: 100% 0% 0% 0% 0% 0% 0% 0%
------------------------------------------------------------------
Level 2, Grid Size 1600 (Meters)
------------------------------------------------------------------
Grid Records: 70532
Shape Records: 36434
Grids/Shape Ratio: 1.94
Avg. Shapes per Grid: 18.21
Max. Shapes per Grid: 82
% of Shapes Wholly Inside 1 Grid: 45.35
------------------------------------------------------------------
Spatial Index Record Count By Group
Grids: <=4 >4 >10 >25 >50 >100 >250 >500
--------- ------ ------ ------ ------ ------ ------ ------ ------
Features: 35682 752 87 17 3 0 0 0
% Total: 97% 2% 0% 0% 0% 0% 0% 0%
------------------------------------------------------------------
14. Truncate: Deletes all features in the feature class; the feature class definition remains.
$ sdelayer -o truncate -l victoria,parcels -u av -p mo -i esri_80 -N
Options:
-A: Type of access: SELECT, UPDATE, INSERT, or DELETE
-e: Entity types allowed (npslaAc3+M)
n: Nil
p: Point features
s: Line (spaghetti) features
l: Simple line (line string) features
a: Area features
A: Annotation
c: CAD data
3: Three-dimensional features, which can be added to the entity type mask only with the -o add operation
+: Multipart features
M: Measures on coordinates
Note:
1. Before creating a new feature class, be sure there is enough space available on your DBMS.
2. Calculate the x-, y-, and z-scale values for the feature class by using the size of the service area and how much resolution is needed for the data. Coordinates are truncated if the scales are too small.
3. Beginning with ArcGIS Server 9.2 geodatabases, you have the option to create sparse spatial index grids. Sparse grids populate the spatial index with information for only those grids that actually contain a portion of a feature. For example, if you created a spatial index on a river feature class, only those grids that the river crossed would be indexed for the river.
All ArcSDE administration commands: ArcSDE Administration Commands
Tuesday, January 29, 2008
ArcSDE administration command - sdelayer
Subscribe to:
Post Comments (Atom)
0 评论:
Post a Comment