14.01.2013 Views

Developer's Guide - MapGuide Open Source - OSGeo

Developer's Guide - MapGuide Open Source - OSGeo

Developer's Guide - MapGuide Open Source - OSGeo

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Overview of Features<br />

Understanding features is fundamental to being able to use the Map<strong>Guide</strong><br />

Web API. Nearly every application will need to interact with feature data in<br />

one form or another.<br />

Features are map objects representing items like roads (polylines), lakes<br />

(polygons), or locations (points).<br />

A feature source is a resource that contains a set of related features, stored in a<br />

file or database. Some common feature source types are SDF files, SHP files,<br />

or data in a spatial database.<br />

For example, you may have a feature source that contains data for roads.<br />

Feature sources can be stored in the library repository or in a session repository.<br />

A feature source identifier describes a complete path in the repository. For<br />

example,<br />

Library://Samples/Sheboygan/Data/RoadCenterLines.Feature<strong>Source</strong><br />

Within a single feature source there may be one or more feature classes. A<br />

feature class describes a subset of the features in the feature source. In many<br />

cases, there is one feature class for each feature source. For example, there may<br />

be a Roads feature class in the RoadCenterLines feature source.<br />

A feature class contains one or more features. Each feature has a geometry<br />

that defines the spatial representation of the feature. Features will also generally<br />

have one or more properties that provide additional information. For example,<br />

a feature class containing road data may have properties for the road name<br />

and the number of lanes. Feature properties can be of different types, like<br />

strings, integers, and floating point numbers. Possible types are defined in the<br />

class MgPropertyType.<br />

In some cases, a feature property will be another feature. For example, a Roads<br />

feature might have a Sidewalk feature as one of its properties.<br />

A map layer may contain the features from a feature class. The features are<br />

rendered using the feature geometry.<br />

The Web API Feature Service provides functions for querying and updating<br />

feature data.<br />

34 | Chapter 3 Working With Feature Data

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!