Overview of Features
TipThe Working With Feature Data sample, in the Developer’s Guide samples, demonstrates concepts from this chapter.

Understanding features is fundamental to being able to use the MapGuide Web API. Nearly every application will need to interact with feature data in one form or another.

Features are map objects representing items like roads (polylines), lakes (polygons), or locations (points).

A feature source is a resource that contains a set of related features, stored in a file or database. Some common feature source types are SDF files, SHP files, or data in a spatial database.

For example, you may have a feature source that contains data for roads. Feature sources can be stored in the library repository or in a session repository. A feature source identifier describes a complete path in the repository. For example,

Library://Samples/Sheboygan/Data/RoadCenterLines.FeatureSource

Within a single feature source there may be one or more feature classes. A feature class describes a subset of the features in the feature source. In many cases, there is one feature class for each feature source. For example, there may be a Roads feature class in the RoadCenterLines feature source.

A feature class contains one or more features. Each feature has a geometry that defines the spatial representation of the feature. Features will also generally have one or more properties that provide additional information. For example, a feature class containing road data may have properties for the road name and the number of lanes. Feature properties can be of different types, like strings, integers, and floating point numbers. Possible types are defined in the class MgPropertyType.

In some cases, a feature property will be another feature. For example, a Roads feature might have a Sidewalk feature as one of its properties.

A map layer may contain the features from a feature class. The features are rendered using the feature geometry.

The Web API Feature Service provides functions for querying and updating feature data.