Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Table of Contents

Introduction

Geographic Information Systems have an interesting problem domain, much like with programming GIS Hacks are involved in modeling the real world.

  • Programmers model with Software (and use abstractions like Object and Class).
  • Geographers model with Maps (and use abstractions like Feature and FeatureType).

There is more then one way to do it, programers used to use procedures, geographers used to use a pen and paper. Lets get on with it.

...

Ack - try and stay awake. Nothing is as silly as trying to explain why creating a model is useful. Why create a model when you could solve a real problem?
Well for starters models are simpler and more flexable.

  • A Geographer could model what it would be like to flood a river, this is much more pragmatic then driving around with sticks of dynamite and blowing up a few dikes (although perhaps not as much fun). Hacking models is easier then hacking reality.
  • A programmer can model code (using UML diagrams and such), hacking the model is often a lot quicker then hacking the code.

One can also view "proper" Object-Oriented programming as constructing a model of a problem space in the real world - and then using it to solve actual problems. There is even a branch of practice called Model Driven Development & Domain Driven Design to try and steer us back in the direction of OO prinicples.

...

What to we want (aka what is our task) - Geographic Markup Language:

  • GML3 - this is the "mandate" mentioned at an IRC meeting a couple of months ago.
    • Programers would use UML2 these days (right?)

Here are some of the constructs in GML that we need to ensure we handle well:

  • Feature - something that can be drawn on a map
    • Programers would call these objects (or instances if that makes you happy)
  • FeatureType - kind of thing on a map.
    • Programmers would call these classes
  • FeatureCollection
    • a bunch of features, can also be considered a "Feature" (Cause you can draw it on a map)
    • Programers would consider this a data structure
  • id - formally FID or "FeatureID"
    • used to unqiuely identify the Feature, the real world object

These are informal working definitions, for a formal definition consult a specification.

...

The exact requiremetns are outlined here:

In breif:

  • complex type support
  • subset of geometry types

There is some discussion of references and dealing multiple feature collections and feature references.

...

The XPath view of a document is limited to the following:

  • nodelists

To support this model we do not need the full set of validation constructs requried for GML3 (such as choice, restrictions or even multiplicity).

...

Node breakdown of example:

Root:

  • xml-stylesheet type="application/xml" href="sco.xsl"
    • gml:FeatureCollection
    • gml:boundedBy: Envelope
    • gml:featureMember
      • sco:wq_plus
        • sco:sitename: BALRANALD WEIR
        • sco:measurement
          • sco:determineand_description: 16/JAN/94
          • sco:result: Turbidity
        • sco:measurement
          • sco:determineand_description: 24/JAN/94
          • sco:result: Turbidity
        • sco:location: Point( 22, 134.5399658, EPSG:4283 )
        • sco:nearestSlimePit: Point( 22.1,143.53399658, EPSG:4283 )
        • sco:sitename: RWWQ004
    • gml:name: My Boreholes

Points of interest:

  • Root node is not the same as the root element
  • Root node contains the entire document including the xml-stylesheet (xmlns and xmlns:prefix are not covered though)

Location Paths:

Similar to unix shell:

...

Schema

Model

Collection

ID

 

 

 

 

 

 

 

 

 

 

 

Reference: GML-3.1.pdf

  • Page 67 for Feature
  • Page 68 & 528 for FeatureCollection
  • Page 530 for "Annex E UML-to-GML Application Schema Encoding Rules"

GML3 includes a more complicated Geometry model then supported by JTS. Higher order geometries (like surface) are supported in addition to curves and topologies.

...

Section
Column

Schema

Model

Collection

ID

 

 

 

 

 

 

 

 

 

Column
  • As you can see the GeoTools 2.0 schema model far outstrips its Modeling abilities.
  • Multiplicity is supported as attribute arrays
  • Collections are not considered Feature in their own right.
    Schema indicates multiplicity support, resulting values indistingishable from support of complex content such as a list.
  • supertype support and name/index attribute access inconsistent, in practicel terms super type is unsupported
  • Feature indicates xpath support (but not implemented)
  • FeatureType indicates xpath support (but not implemented)

GeoTools 2.1

Section
Column

Schema

Model

Collection

ID

 

 

 

 

 

 

 

 

 

 

 

Column
  • GeoTools 2.1 added support for restrictions
    • by use of facets (defined as a series of Filter associated with an AttributeType)
  • Collections are now considered a Feature
    • Cannot determine allowable child features from collection feature type schema.

GeoAPI 1.0

Section
Column

Schema

Model

Collection

ID

Column

Not yet reviewed

...

Section
Column

Schema

Model

Collection

ID

 

 

 

 

 

 

Column
  • FeatureType is mustable? Until frozen/used?
  • Support for Object Attributes
  • FeatureCollection is considered a Feature
  • FeatureCollectionType incomplete
    • Cannot determine allowable child features

DeeGree

Section
Column

Schema

Model

Collection

ID

 

 

 

 

 

 

Column

GPL toolkit actually able to take on complex GML, used as an input to the GeoAPI model. The model supports complex types but the implementations do not seem to follow, at least not on the head of their repository.

...

Section
Column

Schema

Model

Collection

ID

 

 

 

Column
  • Simple FeatureType model, FeatureType is non mutable.
  • Support for Object Attributes
  • Collections are allowed children of a single type.
  • Collections are not considered Feature in their own right.
  • Collections are held in memory

GML2 & GML3

Section
Column

Schema

Model

Collection

ID

 

 

 

 

 

 

 

 

 

 

 

Column

GML3 makes the transition to ISO based Geometries.