BlueSpray - Help
© SchoonerTurtles, Inc. 2012-2015

Introduction
Contents
Getting Started
Download
Navigating
Tutorials
Scripting
Advanced
About

Simple Features

Introduction

The Open GIS Consortium has defined a set of geometric primitives called "Simple Features" for describing vector data. BlueSpray includes the Java Topology Suite and additional software to help you work with these primitives. In addition, some databases implement vector data based on this format.

Simple Features

The Open Geospatial Consortium, Inc.® is a standards group that has created the Simple Feature Access for simple GIS data. This standard provides a definition for handling spatial data within software applications and file formats, including spatial databases. Microsoft has implemented this standard in their spatial database. The standard makes it very easy to query and access spatial data.

The Simple Features are structured in a hierarchical "tree" of classes of types (Figure 1). You do not need to really remenber this except to note that all the features that start with "Multi" are based on a "GeomCollection" and thus share common features (i.e. they are collections of other types of features).

Geometry Classes

Figure 1. OGC Simple Features. The geometry classes you'll probably use are shown in blue.

Features as Well Known Text (WKT) Format

Spatial data is usually stored as "binary" data in a database and in files. This is done because spatial data is much faster to access when in a binary form and is much smaller on disk. However, this makes it much harder for humans to look at the data.

One of the great benefits of the Simple Feature Access standard is that it defines how spatial data should be represented in text. This makes it much easier to create sample data and look at data when you think their may be problems. Below are definitions and examples to use the OGC Simple Features as text.

POINT

A point is just that, a single coordinate on the earth's surface.

POINT(X Y)

LINESTRING

	LINESTRING(X1 Y1, X2 Y2, X3 Y3)

For those familiar with ESRI projects, a LINESTRING is the same as a "Polyline". A LINESTRING contains a series of points that are connected together but do not close on themselves. LINESTRINGs can be used to represent individual sections of a road or reaches of a stream.

POLYGON

A polygon is a series of points that closes back on itself. Notice that the first point (X1 Y1) must also be the last point to ensure that the polygon is closed. In the Simple Feature specification a polygon is not just a simple polygon, it can contain additional polygons that form "holes" within the first polygon. This is the "H1X1" values in the defintion below.

POLYGON((X1 Y1,X2 Y2, X1 Y1))

MULTILINESTRING

MULTILINESTRING((L1_X1 L1_Y1, L1_X2 L1_Y2), (L2_X1 L2_Y1, L2_X2 L2_Y2))

Polyline with multiple members:

	MULTILINESTRING((0 2, 1 1), (1 0, 1 1))

MULTIPOLYGON

	MULTIPOLYGON(((P1_X1 P1_Y1, P1_X2 P1_Y2, P1_X1 P1_Y1), (H1_X1 H1_Y1, H1_X2 H1_Y2, H1_X1 H1_Y1)), 
		((P2_X1 P2_Y1, P2_X2 P2_Y2, P2_X1 P2_Y1)))

Mulitple Polygons with holes: The examle below contains 3 polygons. Notice the parenthesis group the first two polygons and then the third one is on it's own. As in the POLYGON example, the first polygon contains the second while the third polygon is disjoint from the others.

	MULTIPOLYGON(((0 0, 0 3, 3 3, 3 0, 0 0), (1 1, 1 2, 2 1, 1  1)), ((9 9, 9 10, 10 9, 9 9)))

Note: Need a graphic here of the polygons