Geometry

<< Click to Display Table of Contents >>

Navigation:  Connectors > Smallworld >

Geometry

 

The DTS Smallworld Connector can access access geometries in the native Smallworld storage formats when streaming data from Collections and exchanges them using its own Magik wrappers for Method/Procedure Calls.

 

Here are the mappings:

 

Smallworld Geometry (DS type)

DTS Magik Wrapper (DTS Type)

GeoJson Geometry Type

point/simple_point

dts_point (DTS_POINT_GEOMETRY)

Point

chain/simple_chain

dts_chain (DTS_LINE_GEOMETRY / DTS_MULTILINE_GEOMETRY)

LineString / MultiLineString (+ DTS Corrections)

area/simple_area

dts_area (DTS_AREA_GEOMETRY / DTS_MULTIAREA_GEOMETRY)

Polygon / MultiPolygon (+ DTS Corrections)

text

dts_text (DTS_ANNOTATION_GEOMETRY)

Point (+ DTS Extras)

 

Smallworld differentiates between networked (topologically embedded) and simple (with no topology) geometries. The Smallworld Connector removes that distinction, as there is no standard for codifying topological data. It is still available in raw form if desired.

Smallworld chain and area geometry objects can encode multiple disconnected lines and polygons respectively, so they can result in the simple or "Multi" variant as they are streamed out.

 

When accessing Collections with geometry fields through the Smallworld Connector, the geometries are automatically transmuted through their respective DTS Magik Wappers and serialized as DTSGeoJson - no extra action is needed.

When using geometries within Method or Procedure arguments or results, the respective items must be registered with their DTS Type (see Method/Procedure Calls). They will receive and provide geometry data in the DTS Magik Wrapper format. For convenience, the DTS Magik Wrapper exemplars provide the following methods:

new_from(<a_geom>) : creates a new instance of a DTS Magik Wrapper with all the usable characteristics of the input geometry. Both ds and pseudo geometries are accepted.

as_pseudo_[point|chain|area|text]() : transforms the DTS Magik Wrapper object into the corresponding pseudo geometry (pseudo_point, pseudo_chain, pseudo_area, pseudo_text).

 

Smallworld geometries can encode more information than standard GeoJson can accommodate, so the Connector uses DTS Geometry Corrections and Extras to include that data:

(simple_)points can be oriented in Smallworld. The Connector uses the DTSGeoJson orientation field to encode this information.

texts are oriented points with extra information like justification and the actual content string. This extra information is placed in the extras field of the DTSGeoJson.

(simple_)chains and (simple_)areas can contain sectors that are not straight line strings. These will be approximated for standard use and the exact representation included in the DTSGeoJson corrections field as follows:

Smallworld Sector Type

Interpretation

Correction Line Type

sector

Basic sector, represents a straight line string

none (LINE_STRING*)

arc

Single elliptical arc

CP_ARCS or NURBS **

circle

Circle

CIRCLE

rational_b_spline

Rational B-spline

NURBS

 

exclamation_mark_16px sector_z is not currently supported (i.e. only 2D geometries are currently supported)

 

Information-icon_16px * LINE_STRING corrections are not produced by this connector or any of the other standard connectors. It exists for extensions and optimization.

 

Information-icon_16px ** If the arc is circular, it results in a CP_ARCS correction, otherwise it's encoded as NURBS. Multiple CP_ARCS corrections may be compounded into a single one.

 

 

Information-icon_16px Further reading:

DTS Geometry Overview