English

Bug: Shape.len and Shape.area cannot be used in a Feature or Image map service

Description

An ArcSDE layer may include two useful fields: shape.len in line feature classes, and shape.len and shape.area in polygon feature classes. These fields are not currently accessible in ArcIMS.

Cause

This is a known limitation of the software. Feature class properties such as shape.len and shape.area are accessible in ArcGIS because that product is capable of interacting more directly with the feature table (f-table) of the ArcSDE layer.

For ArcIMS to access these properties, duplicate the data in the ArcSDE layer's business table.

Workaround

To workaround this limitation, it is possible to expose these fields by means of a join to the specific table containing them. The join can be implemented in an ArcSDE View, or in a SPATIALQUERY statement in the ArcIMS map configuration (AXL) file. The instructions below demonstrate the latter: to join the fields of the ArcSDE layer's business table with its own f-table using a SPATIALQUERY statement in the ArcIMS map configuration (AXL) file.

  1. Determine the feature ID of the ArcSDE layer with the sdelayer -o describe command. Here is an example:

    Code:
    sdelayer -o describe -i 5151 -l data.gisdba.india_states,shape

    The response appears similar to the following:

    Code:
    Database : DATA
    Table Owner : GISDBA
    Table Name : INDIA_STATES
    Spatial Column : SHAPE
    Layer id : 12
    Entities : nac+
    Layer Type : SDE
    I/O Mode : NORMAL
    User Privileges : SELECT, UPDATE, INSERT, DELETE
    Layer Configuration: DEFAULTS

    The feature id is the 'Layer id' returned from the above command. In this example, the Layer ID 12.

  2. Join the ArcSDE layer with the now known f-table (f12). It is important that the the subfields attribute is not left to its default value, #ALL#. It is necessary to specify the list of fields or else the geometry (BLOB) field from the f-table is joined. The ArcIMS Spatial Server cannot handle the BLOB field in this manner, so it is necessary to exclude it. Also, note that the key field from the f-table is named FID.

    Code:
    <LAYER type="featureclass" name="DATA.GISDBA.INDIA_STATES" visible="true" id="0">
    <DATASET name="DATA.GISDBA.INDIA_STATES" type="polygon" workspace="sde_ws-0" />
    <SPATIALQUERY subfields="#SHAPE# DATA.GISDBA.INDIA_STATES.OBJECTID
    DATA.GISDBA.INDIA_STATES.STATE DATA.GISDBA.INDIA_STATES.CAPITAL
    DATA.GISDBA.F12.FID DATA.GISDBA.F12.LEN DATA.GISDBA.F12.AREA"
    where="DATA.GISDBA.INDIA_STATES.OBJECTID = DATA.GISDBA.F12.FID"
    jointables="DATA.GISDBA.F12" />

    <SIMPLERENDERER>
    <SIMPLEPOLYGONSYMBOL filltransparency="1.0" fillcolor="227,127,127" />
    </SIMPLERENDERER>
    </LAYER>

  3. The shape.len and shape.area fields are now accessible for this ArcIMS layer.

    The other workaround shown above is to create the join in an ArcSDE View instead of using a SPATIALQUERY join in the map configuration file. An ArcSDE View is handled by ArcIMS as if it were a true feature class. When creating the view, note that it is necessary to prevent the f-table's BLOB field from being included. Consult ArcSDE documentation regarding correct command syntax for sdetable -o create_view.