Featuregeometry objects, Values, see, Support for m and z values – Pitney Bowes MapXtreme User Manual

Page 298

Advertising
background image

Chapter 16: Spatial Objects and Coordinate Systems

Geometries

MapXtreme v7.1

305

Developer Guide

FeatureGeometry Objects

The FeatureGeometry class is specifically designed to contain classes that can be placed in tables
and that can be parts of Features and FeatureCollections. In order for something to be displayed in
a map, it needs to be in a table. FeatureGeometry objects are by definition included in tables. Any
object that is a subclass of Geometry and not a subclass of FeatureGeometry cannot be saved to a
table or included as part of a Feature or FeatureCollection. An exception is thrown, or the program
will not compile, if such an operation is attempted. The FeatureGeometry class, like the Geometry
class is abstract and cannot be instantiated.

Support for M and Z Values

Feature geometries support reading and writing M and Z values at each node of the object.

Support for reading and writing M and Z values for linear objects was accomplished by extending the
MapXtreme Geometry model. FeatureGeometry objects (Point, MultiPoint, MultiPolygon, MultiCurve
and FeatureGeometryCollection) can now hold values for X, Y, Z and M for each node.

IsMeasured and Is3D properties allow you to determine whether the object has M or Z values.
Additional properties and methods are provided to read and modify M or Z values at each node. The
minimum and maximum ranges of M and Z values can be retrieved as well.

MapXtreme provides creation and editing capabilities for FeatureGeometries. For more information,
see MapInfo.Geometry.FeatureGeometry class in the Developer Reference.

M values for MultiCurves provide valuable information in linear network applications for tracking and
managing assets, events and conditions. See

Chapter 21: Linear Referencing

.

Point

Points are derived from the FeatureGeometry class and represent a single point on a map. Points
can be contained within a MultiPoint collection and then operated upon collectively.

Use the following example code to model the creation of a Point:

using MapInfo.Geometry;
using Mapinfo.Design.Windows;

CoordSys longLatNad83;
CoordSysFactory coordSysFactory = new CoordSysFactory();
longLatNad83 = coordSysFactory.CreateLongLat

(MapInfo.Geometry.DatumID.NAD83);

DPoint point = new DPoint(0.0, 0.0);
Point pointGeometry = new Point(LongLatNad83, point);

MultiPoint

A MultiPoint contains an unordered, disconnected set of Points and is useful for performing multiple
operations on multiple points.

Use the following example code to model the creation of a MultiPoint object:

using MapInfo.Geometry;

Advertising