Making tables mappable – Pitney Bowes MapXtreme User Manual

Page 179

Advertising
background image

Chapter 8: Working with Data

Table Metadata (TableInfo)

MapXtreme v7.1

186

Developer Guide

AutoMatching Using the GeoDictionary

The MatchResolver.AutoMatch method in the Data.GeoDictionary namespace initiates the
AutoMatching process. It does not call AddColumns, i.e., does not do the binding. A subsequent call
to BindColumn is required to perform the autobinding, or a direct call to AutoMatchAndBind.

Automatching can encounter ambiguous situations. These situations include:

multiple source columns are detected in the user data

multiple tables/layers are detected that match the source column

multiple geosets/workspaces are available for the matched table/layer.

It is the MatchResolver object with which the GeoDictionary communicates during the match
process to solve the ambiguity. It provides the matching algorithm. The basic class selects the first or
the one with the highest matching percentage. This class is not sealed and client applications may
derive their own class from this and override its behavior.

Making Tables Mappable

Tables can either be mappable (contain a GeometryColumn) or non-mappable (no spatial attribute
data). Mappable tables are added to a MapXtreme application as a layer in a map. Non-mappable
tables, such as customer data, can be made mappable when a GeometryColumn is created for it.
MapXtreme provides spatial schemas to accomplish this.

Spatial schemas are services that can be applied to a table to enhance its spatial capabilities. There
are two type of spatial schemas: XY and PointRef. Non-mappable tables that have attribute columns
that represent X and Y values (such as longitude and latitude) use SpatialSchemaXY and tables that
have an attribute column which can be used to reference a record in a mappable table uses
SpatialSchemaPointRef.

SpatialSchemaXY

SpatialSchemaXY uses the X and Y values of each record in the table to construct point objects and
store them in a temporary column known as MI_Geometry. This spatial schema may be applied to
tables of any data source except Seamless, View, and ResultSet.

By having a GeometryColumn, the table can now be displayed as a layer in a Map and used for
spatial analysis.

SpatialSchemaXY has the following characteristics:

The Geometry column is editable.

Editing the Geometry automatically changes the X and Y values.

You can define styles for each point in the table.

You can store the spatial information as a TAB file and open like any other table.

This spatial schema can be used for traditional server XY data without a MapCatalog. (Using a
MapCatalog may offer better performance on RDBMS's, since more work is done on the server. See

The MapInfo_MapCatalog

.)

MI_Geometry is a temporary column unless you write out the TAB file explicitly using the
TableInfo.WriteToTab method. The schema is automatically regenerated when the table is opened.

Advertising