RDFGeom (RDF Geometry Vocabulary)



Chris Goad, November 2004
cagoad@yahoo.com



Table of contents

1. Introduction
2. Interpreted geometry
3. Dimension
4. Classes and properties

Point

Shape

Transformation

Matrix

Group

Curve

Line

CurveSegment

ClosedCurve

FilledCurve

LineSegment

Polyline

Polygon

SVGPath

Box

Circle


1. Introduction

RDFGeom defines a set of RDF classes and properties for geometry. The practical intent of this initial revision is to support basic two-dimensional geometrical applications in a manner that is extensible to three or higher dimensional geometry, and to topology. Even within two-dimensional geometry, only the most rudimentary primitives are included. However, because the vocabulary defines basic notions such as shape and curve in fully generality, class hierarchies covering additional topics can be added as extensions rather than modifications to this initial vocabulary.

Some items in this vocabulary, such as the classes Matrix, Polyline, SVGPath, and Circle, are derived from the geometric part of SVG.

The formulation of geometry in RDF (rather than in "raw" XML as in SVG or GML), allows geometric entities to participate fully in the RDF world: assertions can be made about geometric objects using vocabularies from the many disciplines that involve geometry. The initial application is geography, where it is used in conjunction with the RDFMap vocabulary. More comments about the use of RDF in geography can be found in the note: RDF versus GML.

Two RDF vocabularies are defined here: http://fabl.net/vocabularies/geometry/1.1/ for dimension-independent concepts, and http://fabl.net/vocabularies/geometry2d/1.1/ for two dimensional geometry; the namespace prefixes geom and geom2d represent these vocabularies in what follows.

OWL definitions of the vocabularies in RDF/XML syntax can be found at http://fabl.net/vocabularies/geometry/1.1/index.owl and http://fabl.net/vocabularies/geometry2d/1.1/index.owl

Example

Here is a RDFGeom file that contains just one line segment:

<?xml version="1.0" encoding="iso-8859-1"?> 
<rdf:RDF 
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:geom="http://fabl.net/vocabularies/geometry/1.1/"
  xmlns:geom2d="http://fabl.net/vocabularies/geometry2d/1.1/"
>

<geom2d:LineSegment rdf:about="http://example.org/geom/seg001">
   <geom:end0>
      <geom2d:Point>
         <geom:x>-123.8327</geom:x>
         <geom:y>46.1908</geom:y>
      </geom2d:Point>
   </geom:end0>
   <geom:end1>
      <geom2d:Point>
         <geom:x>-123.833</geom:x>
         <geom:y>46.1829</geom:y>
      </geom2d:Point>
   </geom:end1>
</geom2d:LineSegment>
</rdf:RDF>

2. Interpreted geometry

The intent of RDFGeom is to support representation of interpreted geometry. That is, an RDFGeom resource may serve to denote a geometric entity in some particular context, such as the centerline of a road in a geographic application, or a curve in a photographic image. When interpretations are assigned to RDFGeom resources, properties other than those contained in the RDFGeom specification will apply. For example,

<?xml version="1.0" encoding="iso-8859-1"?> 
<rdf:RDF 
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:geom2d="http://fabl.net/vocabularies/geometry2d/1.1/"
  xmlns:map="http://fabl.net/vocabularies/geography/map/1.1/"
>
<geom2d:LineSegment rdf:about="http://example.org/geom/seg001">
   <map:isCenterLineOf 
            rdf:resource="http://example.org/geography/roads/US/Oregon/Astoria/tenth_street"/>
   <map:srs resource=
            "http://fabl.net/vocabularies/geography/SRSCatalog/wgs84"/>
</geom2d:LineSegment>
</rdf:RDF>

asserts that seg001 is the center line of Tenth Street in Astoria Oregon, and that the segment is given in WGS84 (latitude/longitude) coordinates. This is a typical situation; most geometric data in computational applications has an intended denotation outside of pure geometry.

As a consequence of interpretation, shapes have identity that goes beyond their geometrical content. In pure geometry there is only one two dimensional point with x coordinate 1 and y coordinate 2; by interpreting geometry, this rule of identity, but nothing else, is sacrified.

3. Dimension

The dimension of a geometrical entity refers to the number of coordinates defining the space in which it is embedded, or for transformations, to the coordinate count of the space on which the transformation operates. The dimensionality of an entity refers to its own structure as a point set. For example, the dimension of a curve in made up of points with x,y,z coordinates is 3, but its dimensionality is one.

RDFGeom permits grouping of entitities of differing dimension.

Property: geom:minDimension range = int

is the minimum dimension of points making up a geometric resource, and

Property: geom:maxDimension range = int

is the maximum dimension of points making up a geometric resource

This mixed dimension approach follows the usual RDF practice of defining vocabularies as additive rather than exclusive. RDF vocabularies introduce new properties for describing resources; it is not normal to impose prohibitions on the mingling of vocabularies. An instance of such a prohibition would be barring assertion of the geom:z property for points in a shape that also contains points lacking this property. Concretely, in geographic applications, the altitude (that is, geom:z) of some locations but not others may be known; barring the inclusion of altitude if not known everywhere would be needlessly restrictive.

4. Classes and Properties

Class: geom:Point

Subclass of: geom:Shape

Property: geom:x; range = double for the domain geom:Point

Optional Property: geom:y; range = double for the domain geom:Point

Optional Property: geom:z; range = double for the domain geom:Point

double is the numerical data type defined by XML Schema dataypes. A geom:Point which possesses the geom:z property must possess the geom:y property as well.

Class: geom2d:Point

Subclass of: geom:Point,geom2d:Shape

Those members of geom:Point that possess both geom:x and geom:y properties are members of geom2d:Point. A geom2d:Point is not prohibited from possessing a geom:z property as well.

Class: geom:Shape

geom:Shape is the class of all geometrical forms. A geom:Shape always defines a set of points (called its "extension"), but is not identified with that set - due to the fact that RDFgeom is intended to represent interpreted rather than abstract geometry.

Class: geom2d:Shape

Subclass of: geom:Shape

geom2d:Shape is the class of shapes all of whose points belong to geom2d:Point; equivalently, it is the set shapes with geom:minDimension >= 2.

Class: geom:Transformation

Transformation is the class of all functions f with geom:Point as domain and range, where the value of f(p) depends only on the coordinates of p, not on any other properties that p may possess. (This condition is necessary in the context of interpreted geometry).

Class: geom2d:Transformation

Subclass of: geom:Transformation

geom2d:Transformation is the class of all functions with geom2d:Point as domain and range, where the value of f(p) depends only on the geom:x and geom:y properties of p.

Class: geom2d:Matrix

Subclass of: geom2d:Transformation

Corresponds to the matrix transform definition in SVG; we refer the reader to this SVG definition for the details. A geom2d:Matrix defines an affine transformation of the plane, given by properties a,b,c,d,e,f:

Property:a range = double for the domain geom2d:Matrix

Property:b range = double for the domain geom2d:Matrix

Property:c range = double for the domain geom2d:Matrix

Property:d range = double for the domain geom2d:Matrix

Property:e range = double for the domain geom2d:Matrix

Property:f range = double for the domain geom2d:Matrix

Class: geom:Group

Subclass of: geom:Shape

geom:Group represents a collection of geom:Shapes.

Property: elements; range = an rdf:Seq of Shape for domain Group

The extension of a group is the union of the extensions of the elements.

Class: geom2d:Group

Subclass of: geom:Group,geom2d:Shape

The elements of a geom2d:Group must be geom2d:Shape.

Class: geom:Curve

Subclass of: geom:Shape

A curve is, informally, a connected set of points with dimensionality 1. More formally, it is the range of a continuous function from an open, half-open or closed real interval [a,b] to geom:Point. The points on a curve must all have the same dimension.

Class: geom2d:Curve

Subclass of: geom:Curve,geom2d:Shape

geom2d:Curve is the class of curves whose points are of dimension 2.

Class:geom2d:Line

Subclass of: geom2d:Curve

Line is a straight line in two dimensions without end points.

Property: u; range = double for the domain Line

Property: v; range = double for the domain Line

Property: w; range = double for the domain Line

The line is the set of points (x,y) satisfying the equation u*x + v*y + w = 0
The vector (u,v) is normal to the line, and is required to be a unit vector (ie u*u + v*v = 1).

Class: geom:CurveSegment

Subclass of: geom:Curve

Property: end0 range = geom:Point for domain geom:CurveSegment

Property: end1 range = geom:Point for domain geom:CurveSegment

An geom:CurveSegment is a geom:Curve with distinct end points, geom:end0 and geom:end1. More formally, a geom:CurveSegment c is the range of a continuous function f from a closed real interval [a,b] to N-dimensional space, for N > 0, where c.geom:end0 = f(a) and c.geom:end1 = f(b), and where the distance between f(a) and f(b) is non-zero.

Class: geom2d:CurveSegment

Subclass of: geom:CurveSegment,geom2d:Curve

geom2d:CurveSegment is the the intersection of the classes geom:CurveSegment and geom2d:Curve

Class: geom:ClosedCurve

Subclass of: geom:Curve

A geom:ClosedCurve is a one-dimensional loop of points. More formally, it is the range of a continuous function f from a closed real interval [a,b] to N-dimensional space, where N >0 and f(a) = f(b).

Class: geom2d:ClosedCurve

Subclass of: geom:ClosedCurve,geom2d:Curve

geom2d:ClosedCurve is the intersection of the classes geom:ClosedCurve and geom2d:Curve

Class: geom2d:FilledCurve

Subclass of: geom2d:Shape

A geom2d:FilledCurve is the interior of a non-self-intersecting loop of points. Its boundary is a geom2d:ClosedCurve:

Property: geom:boundary; range = geom2d:ClosedCurve for domain geom2d:FilledCurve

Class: geom:LineSegment

Subclass of: geom:CurveSegment

The extension of geom:LineSegment s is the set of points on the straight line connecting s.geom:end0 and s.geom:end1.

Class: geom2d:LineSegment

Subclass of: geom:LineSegment, geom2d:CurveSegment

geom2d:LineSegment is the intersection of the classes geom:LineSegment and geom2d:CurveSegment

Class: geom:Polyline

Subclass of: geom:Curve

Corresponding SVG element: polyline

Property: geom:points range = rdf:Seq containing values of type geom:Point, for the domain geom:Polyline

All of the elements of geom:points must have the same dimension. The extension of geom:Polyline consists of the points lying on the segments <points[0],points[1]>, <points[1],points[2]> ... <points[ln-2],points[ln-1]> where ln is the length of points.

A Polyline may be a geom:ClosedCurve, or an geom:CurveSegment. In the former case, P.points[0] = P.points[length(P.points)-1], and in the latter P.end0 = P.points[0], and P.end1 = P.points[length(P.points)-1] are distinct.

geom2d:Polyline

Subclass of: geom:Polyline, geom2d:Curve

geom2d:Polyline is the intersection of the classes geom:Polyline and geom2d:Curve.

Here is a Polyline example

geom2d:Polygon

Subclass of: geom2d:FilledCurve

Corresponding SVG element: polygon

A geom2d:FilledCurve is a geom2d:Polygon if its geom:boundary is a geom2d:Polyline

Class: geom2d:SVGPath

Subclass of: geom2d:Curve

Property: geom2d:pathData; range = string for the domain geom2d:SVGPath

An geom2d:SVGPath defines a curve using the SVG path syntax. For example a geom2d:pathData value of "M 100 200 L 200 100 -100 -200" defines the piecewise linear curve starting at [100,200], ending at [-100,-200], and passing though [200,100]. The definition must specify a continuous curve, without gaps.

Here is an SVGPath example

Class:geom:Box

Subclass of: geom:Shape

A geom:Box consists of the points lying within bounds given by the following properties:

Property: xmin; range = double for the domain Box

Property: xmax; range = double for the domain Box

Optional Property: ymin; range = double for the domain Box

Optional Property: ymax; range = double for the domain Box

Optional Property: zmin; range = double for the domain Box

Optional Property: zmax; range = double for the domain Box

If a box has an minimum property (eg geom:ymin), it must have the corresponding maximum property (eg geom:ymax). If a box has bounds in z, it must have bounds in y as well.

Class:geom2d:Box

Subclass of: geom:Box, geom2d:Shape

geom2d:Box is the the intersection of the classes geom:Box and geom2d:Shape.

Class: geom2d:Circle

Subclass of: geom2d:ClosedCurve

Property: geom:center range = geom2d:Point for the domain geom2d:Circle

Property: geom:radius range = double for the domain geom2d:Circle

A geom2d:Circle consists of the points that lie at distance geom:radius from its geom:center.