Indicates the type of shape represented by this geometry.

Namespace:  ESRI.ArcGISExplorer.Geometry

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public enum GeometryType
Visual Basic (Declaration)
Public Enumeration GeometryType

Members

Member nameDescription
Envelope
Indicates the geometry is an Envelope, representing a rectangle with sides parallel to the coordinate system.
Multipatch
Indicates the geometry is a Multipatch, representing a 3D shape such as a building or a tree.
Multipoint
Indicates the geometry is a Multipoint, representing an ordered collection of Point objects.
None
Indicates a non-spatial Table or otherwise unknown type of Geometry which cannot be directly represented by any of the types of Geometry class in ArcGIS Explorer.
Point
Indicates the geometry is a Point, representing a single location.
Polygon
Indicates the geometry is a Polygon, representing a shape defined by one or more rings, where a ring is a path that starts and ends at the same point.
Polyline
Indicates the geometry is a Polyline, representing a shape defined by one or more paths, in which a path is a series of connected linear segments.

Remarks

This enum is returned by a number of properties, and is used to work out which type of shape is represented by the objects:

Effectively, the Column, FeatureLayer and Table GeometryType properties are all shortcuts to the same information. Each spatial Table can have only one type of Geometry, which may be either Point, Multipoint, Polyline, Polygon or Multipatch. Envelopes cannot be stored as the Geometry in spatial Tables or FeatureLayers.

Non-spatial Tables will return the None GeometryType.

The GeometryType enum is also used in a number of members within the other ArcGIS Explorer namespaces:

The relationship between SymbolType and GeometryType is constant, but not 1:1; see the SymbolType topic for more information.

Examples

The example below summarizes the number of FeatureLayers in the current Map which have different types of geometry, using the GeometryType property of the FeatureLayer class.
CopyC#
// Get all of the FeatureLayers in the Map.
ESRI.ArcGISExplorer.Mapping.MapDisplay disp = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay;
System.Collections.ObjectModel.ReadOnlyCollection<FeatureLayer> flyrs = disp.Map.GetMapItems<FeatureLayer>();

// Count each type of feature layer geometry.
int ptLyrs = 0;
int mptLyrs = 0;
int plineLyrs = 0;
int pgonLyrs = 0;
int mpchLyrs = 0;
foreach (FeatureLayer lyr in flyrs)
{
  switch (lyr.GeometryType)
  {
    case GeometryType.Multipatch:
      mpchLyrs++;
      break;
    case GeometryType.Multipoint:
      mptLyrs++;
      break;
    case GeometryType.Point:
      ptLyrs++;
      break;
    case GeometryType.Polygon:
      pgonLyrs++;
      break;
    case GeometryType.Polyline:
      plineLyrs++;
      break;
    default:
      break;
  }

  System.Diagnostics.Debug.WriteLine("Point Layers: " + ptLyrs.ToString());
  System.Diagnostics.Debug.WriteLine("Multipoint Layers: " + mptLyrs.ToString());
  System.Diagnostics.Debug.WriteLine("Polyline Layers: " + plineLyrs.ToString());
  System.Diagnostics.Debug.WriteLine("Polygon Layers: " + pgonLyrs.ToString());
  System.Diagnostics.Debug.WriteLine("Multipatch Layers: " + mpchLyrs.ToString());
}
CopyVB.NET
' Get all of the FeatureLayers in the Map.
Dim disp As ESRI.ArcGISExplorer.Mapping.MapDisplay = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay
Dim flyrs As System.Collections.ObjectModel.ReadOnlyCollection(Of FeatureLayer) = disp.Map.GetMapItems(Of FeatureLayer)()

' Count each type of feature layer geometry.
Dim ptLyrs As Integer = 0
Dim mptLyrs As Integer = 0
Dim plineLyrs As Integer = 0
Dim pgonLyrs As Integer = 0
Dim mpchLyrs As Integer = 0
Dim lyr As FeatureLayer
For Each lyr In flyrs
  Select Case lyr.GeometryType
    Case GeometryType.Multipatch
      mpchLyrs += 1
    Case GeometryType.Multipoint
      mptLyrs += 1
    Case GeometryType.Point
      ptLyrs += 1
    Case GeometryType.Polygon
      pgonLyrs += 1
    Case GeometryType.Polyline
      plineLyrs += 1
    Case Else
  End Select

  System.Diagnostics.Debug.WriteLine(("Point Layers: " + ptLyrs.ToString()))
  System.Diagnostics.Debug.WriteLine(("Multipoint Layers: " + mptLyrs.ToString()))
  System.Diagnostics.Debug.WriteLine(("Polyline Layers: " + plineLyrs.ToString()))
  System.Diagnostics.Debug.WriteLine(("Polygon Layers: " + pgonLyrs.ToString()))
  System.Diagnostics.Debug.WriteLine(("Multipatch Layers: " + mpchLyrs.ToString()))
Next lyr

See Also