GET_FEATURES  Examples

Used in:  REQUEST  
Parent elements:  REQUEST  

<GET_FEATURES Attribute Description Table

     attributes ="true | false"  [true]
     beginrecord ="integer"  [0]
     checkesc ="true | false"  [false]
     compact ="true | false"  [false]
     envelope ="true | false"  [false]
     featurelimit ="integer"  [all features]
     geometry ="true | false"  [true]
     globalenvelope ="true | false"  [false]
     outputmode ="binary | xml | newxml"  [binary]
     skipfeatures ="true | false"  [false]
>

     <LAYER... />
     <QUERY... />  [Or]
     <SPATIALQUERY... />  [Or]
     <ENVIRONMENT... />

</GET_FEATURES >
Bold: Attribute or child element is required.


Description:


Restrictions:


Notes:


Attribute Descriptions for GET_FEATURES:

Attribute Usage Back to Top
attributes Determines whether attribute data for selected features is returned in the response.
beginrecord Index of first extracted record.
checkesc Used to determine if the returned data should include escaped characters for ampersand, single quote, double quote, less than, and greater than. For example, if the value for SUB_REGION is "P&NW", then:

  • If checkesc="false", in the response the value of SUB_REGION is "P&NW".
  • If checkesc="true", the value of SUB_REGION is "P&amp;NW".
compact For ArcXML response, switches geometry to compact form. See Using GET_FEATURES and FEATURES for more details.
envelope Used to request the bounding envelope of each returned feature.
featurelimit Maximum number of returned features.
geometry Requests feature coordinates.
globalenvelope When set to true, the overall envelope for all the features returned is included in the response. Since the number of features returned depends on beginrecord and featurelimit, only the actual records extracted based on featurelimit are included in the overall envelope. Note that in order for the global envelope to be returned, subfields in the SPATIALQUERY must include either #SHAPE# or #ALL#.
outputmode If outputmode is binary, data is compressed into a binary stream. This is valid only for feature MapServices. If the value of "xml" is used, data is returned in ArcXML format. This format uses a shorthand format that is faster to parse in an HTML client. If "newxml" is used, the data is returned in a longer format. See Using GET_FEATURES and FEATURES for more details.
skipfeatures When set to true, only the number of features is returned without including any information on individual features. The number of features returned depends on beginrecord and featurelimit. To get the total number of features in a layer, a query can be specified with an empty where clause. Note that even when skipfeatures is set to true, the query is executed and features are actually extracted before they are counted. This attribute is valid only when outputmode is xml or newxml.
 

Examples for GET_FEATURES:

Example 1: Back to Top
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
<REQUEST>
  <GET_FEATURES featurelimit="25" beginrecord="0" outputmode="xml" geometry="false" envelope="true" compact="true">
    <LAYER id="4" />
    <SPATIALQUERY subfields="#ALL#" where="NAME  =  'Los Angeles'" >
    </SPATIALQUERY>
  </GET_FEATURES>
</REQUEST>
</ARCXML>

Example 2: When using projection elements. Back to Top
<?xml version="1.0" encoding="UTF-8" ?>
<ARCXML version="1.1">
  <REQUEST>
    <GET_FEATURES featurelimit="25" beginrecord="0" outputmode="xml" geometry="true" envelope="true" compact="true">
      <LAYER id="4" />
      <SPATIALQUERY subfields="#ALL#" where="POPULATION > 10000000" >
        <FILTERCOORDSYS id="53030" />
        <FEATURECOORDSYS id="53030" />
        <SPATIALFILTER relation="area_intersection">
          <ENVELOPE minx="-11395772" miny="930558" maxx="-3878142" maxy="6419621"/>
        </SPATIALFILTER>
      </SPATIALQUERY>
    </GET_FEATURES>
  </REQUEST>
</ARCXML>