RDFGeom (RDF Geometry Vocabulary)



This version: http://www.mapbureau.com/rdfgeom1.1/revision1.html
Revision 1[1]
Status: experimental
Previous Version: http://www.mapbureau.com/rdfgeom2d1.0/revision2.html
Chris Goad, September 2004
cg@mapbureau.com



Table of contents

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

Point

Shape

Transformation

Matrix

Group

Curve

Line

OpenCurve

ClosedCurve

FilledCurve

Segment

Polyline

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.

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:Segment 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:Segment>
</rdf:RDF>

Note: An earlier attempt at defining geometry in RDF took the form of a "port" of the geometric part SVG into RDF. After about 1 year's experience, I have decided against this approach, because of lack of extensibility: SVG commits to 2D; neither would the SVG-based vocabulary extend easily to topology. Even so, several items from SVG have been retained.

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:Segment 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:Segment>
</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 on N-dimensional space, for N > 0.

Class: geom2d:Transformation

Subclass of: geom:Transformation

geom2d:Transformation is the class of all functions on the plane.

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

Optional property: transform; range = Transformation for domain Group

If a Group has a transform property, its extension consists of the union of the results of applying the given transform to the extensions of its elements; otherwise, its extension is the untransformed union of the extensions of the elements. If a transform is defined, the geom:minDimension of the Group must be greater than or equal to the dimension of the tranform.

Class: geom2d:Group

Subclass of: geom:Group,geom2d:Shape

The elements of a geom2d:Group must be geom2d:Shapes, and its transform a geom2d:Transform.

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:OpenCurve

Subclass of: geom:Curve

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

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

An geom:OpenCurve is a geom:Curve with distinct end points, geom:end0 and geom:end1. More formally, a geom:OpenCurve 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:OpenCurve

Subclass of: geom:OpenCurve,geom2d:Curve

geom2d:OpenCurve is the the intersection of the classes geom:OpenCurve 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: boundary; range = geom2d:ClosedCurve for domain geom2d:FilledCurve

Class: geom:Segment

Subclass of: geom:OpenCurve

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

Class: geom2d:Segment

Subclass of: geom:Segment, geom2d:Curve

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

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:OpenCurve. 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:Polyling and geom2d:Curve.

Here is a Polyline example

Note that a polygon is a geom2d:FilledCurve whose 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.

[1]A modification in an RDF vocabulary is called a revision rather than a new version if it adds to the vocabulary without changing the meaning of preexisting terms. Revisions do not require use of a new URI for the vocabulary.
Copyright 2004, Map Bureau. All rights reserved.