# Introduction

The ISO 19100 series of standards, like many other GIS frameworks, emphasizes 2D spatial coordinates with various reference frames which are fixed to the rotating earth. There is, however, some nominal functionality defined to support 3D geometric constructs. This page is a challenge to figure out how to represent one of the simplest 3D constructs using the framework provided by ISO 19107.

# Problem Description

For the coverage effort, there is a need to define a grid cell with three spatial dimensions which is bounded by grid points at the corners. For instance, the grid cell occupying the volume between (0, 0, 0) and (1, 1, 1) would have the corners:

```(0,0,0)
(0,0,1)
(0,1,1)
(0,1,0)
(1,0,0)
(1,0,1)
(1,1,1)
(1,1,0)
```

Note that I am not interested in specifying topological relations (edges) between the corner points. I just want to represent the rectangular solid volume bounded by these corners.

# What you win.

If you're the first to figure it out, edit this page with a solution (or attach a comment). If you're prevented from editing this page, email me. The first valid solution wins my heartfelt respect and admiration. You may also win some empty flattery.

We will keep your solution on this wiki page to help future pioneers grapple with the third dimension of 19107. If you could please express your solution in the manner of a short descriptive article, I'd be very grateful.

# Solution

The solution was not long in coming. John Herring of Oracle Corporation (none other than one of the editors of the standard) responded with instructions on how to make a cube. As such, he probably has enough fame that winning this contest is an insignificant addition.

For those unfamiliar with ISO 19107, a cube is a polyhedral surface, 6 face polygons with 4 distinct points each (5 to close with the first = last). Each face shares its 4 edges with 4 other faces (with orientation
reversed).

A unit cube at the origin is (using a variant of SF4SQL WKT):

```POLYHEDRAL_SURFACE
(
POLYGON(0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0),
POLYGON(1 0 0, 1 0 1, 0 0 1, 0 0 0, 1 0 0),
POLYGON(1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0),
POLYGON(0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0),
POLYGON(0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0),
POLYGON(0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)
)
```

# Reference

The ISO 19107 geometry specification may be found on the OGC website. Download the spec.