# Presentation: 134412

## GML - Geography Markup Language 

- Paul Daisey
- Geography Division
- U.S. Census Bureau
- pdaisey@geo.census.gov

- http://www.census.gov/geo/www/tiger/index.html
- http://www.opengis.net/gml/01-029/GML2.html

## Context			Content

-  OGC

-  Specifications

-  Web Mapping

-  Interoperability Program

-  Web Feature Server

-  Geography Markup Language

-  Design Goals

-  GML Evolution

-  GML RFC - DTD

-  GML v1 - RDF

-  GML v2 XML/Schema

-  ISO / DPC Harmonization

-  GML v3 Enhancements - RWG

- Context			Content

## OGC - Open GIS Consortium

- GML - Geography Markup Language

-  501c6 Not for profit membership organization

-  Founded in 1994 to promote interoperability

- - Among systems that process georeferenced data

- - Between these systems and mainstream computing

-  International membership (204)

- - Businesses

-  - Government Agencies

- - Academic institutions

- www.opengis.org

## Paths to Standards

- ISO

- National
- Standards
- Bodies

- OGC

- Vendors
-   .COM

- Agencies
-    .GOV

- Universities
-     .EDU

- Specifications

- International
- Standards

- GML - Geography Markup Language

## OGC Specifications Traditional Development Sequence

- Abstract Model
- Interface Implementation Specifications
- Simple Features
- Geographic Objects with Attributes, including Geometry
- SQL, COM, CORBA
- Gridded Coverages
- Distributed Catalog Services
- Formal Coordination with ISO TC211
- Standards-based COTS Software (SCOTS)

- GML - Geography Markup Language

## Enterprise GIS in OpenGIS Environment

**SCOTS**
**everywhere**

- GML - Geography Markup Language

- © 1998, Open GIS Consortium, Inc. All Rights Reserved

## OGC Geospatial Specifications for the WebFast Track Development Model

- GML - Geography Markup Language

-  Web Mapping Testbed

-  Interoperability Program

-  OWS - OGC Web Services Initiative

## Web Mapping Today

- Specialized Task-Specific Applications
- Relatively Easy to Use
- Limited Ability to
- Integrate Information from other sources
- Share Geoprocessing Services

- GML - Geography Markup Language

## Some (non-interoperating) Web Mapping Systems

**GeoMedia****TM ****WebMap**

**MapGuide****TM**

**MapObjects IMS**

**MapXtreme****TM**

**ELVIS**

**GIS Viewer**

**ModelServer Imager**

**Spatial Web Broker**

**CARIS Internet Server**

**OGDI**

**NetGIS**

**STAR Next Surf**

**TerraServer**

**Orthophoto Browser**

**Mapquest Internet**

**PARC Map Viewer**

**Internet Map Server**

**TIGER Map Server**

**GLOBE Visualization**

**EnviroMapper**

**GIS**
**DATA**

**GIS**
**DATA**

**GIS**
**DATA**

**GIS**
**DATA**

**GIS**
**DATA**

**GIS**
**DATA**

**GIS**
**DATA**

**GIS**
**DATA**

**GIS**
**DATA**

**GIS**
**DATA**

**GIS**
**DATA**

**GIS**
**DATA**

**GIS**
**DATA**

**GIS**
**DATA**

**GIS**
**DATA**

**GIS**
**DATA**

**GIS**
**DATA**

**GIS**
**DATA**

**GIS**
**DATA**

**GIS**
**DATA**

**X**

**X**

**X**

**X**

**X**

**X**

**X**

**X**

**X**

**X**

**X**

**X**

**X**

**X**

**X**

**X**

**X**

**X**

**X**

- GML - Geography Markup Language

## Web-Based Mapping Technology Vision

- Web servers and map viewer clients interact to:

** ****Discover, access and retrieve views from multiple servers**
**Display multiple layers of geographic data within a single web application**
**Query and Update**
**Provide interface for visualization, Decision Support, etc.**
**Support geocoded raster, vector, matrix, and other data**

**Notes:**
Here is a summary vision of Web-based Mapping. 

## User Interaction - Thicker Clients

- Enhanced Clients (not HTML) access multiple map servers simultaneously
- Navigation, legend, and layer control functions
- Feature query capability
- Use remote views and local standards-based data.
**Create and update - field user updates over the web**
- Extend symbolization to allow flexible user-specific symbolization
- Support context-based views
- Extend interface to application map servers
- Discovery interface

- Three map servers accessed simultaneously using
- WMT MapServer Interface specifications.

## Web Mapping Phase 1 Results

- 4 Map-Server HTML / XML Services
- getCapabilities, getMap, getFeatureInfo, getData
- Defined, Developed, Demonstrated in 4 months
- Implemented in Commercial Product Prototypes
- Two OGC Specifications Developed
- WMS Web Map Server Interface
- GML Geography Markup Language (XML)
- Accelerated Standards Development Process

- GML - Geography Markup Language

##            Technology Innovation:Interoperability Program Fast-Track

- Cooperative R&D by Sponsors and Participants
- Sponsors
- Provide Research and Evaluation Funding
- Set Project Goals, Objectives, Components
- Participants
- Provide Technical Expertise
- Accomplish Project Tasks
- Provide In-Kind Support
- Equipment / Software / Staff / Services
- May Obtain Cost Reimbursement
- Demonstrate Geospatial Interoperability
- Develop OGC Specifications from the Results

- GML - Geography Markup Language

## IP 2001 – Testbeds, Pilots, and OGCNetwork

**Specification **
**Development**
**Program**

**OGC Testbeds**

**Infrastructure**
**(OGCNetwork)**

**Technology**
**Infusion**

**OGC Pilot Projects**

- Collaborative, applied R&D efforts develop, architect and test candidate specifications addressing Sponsor requirements.

- On-line OpenGIS® Reference Architecture developed during Testbeds, Pilots, and related activities.  Enables Sponsors to model future interoperable systems

- Candidate
- Specifications

- Comments

**GFST **

**WMT - 2**

**Many other **
**Testbeds**
**OpenLS, etc.**

**WMT USL**

**WMT MPP**

**GFSPP**

- Collaborative efforts apply commercial technology implementing OGC specifications to the real world, demonstrating utility and effectiveness.

## WFS - Web Feature Server

- GML - Geography Markup Language

-  Get Capabilities

-  Describe Feature Type

-  Get Features

-  Lock Feature

-  Transaction

-  - Insert

- - Update

- - Delete

- XML

- GML

- GML
- Schema

## Geography Markup Language Initial Design Goals

- GML - Geography Markup Language

-  Encode Geographic Information in XML

-  Enable Storage and Transport of Geographic Information

-  Include Properties and 2D Linear Geometry

-  Use OGC Model for Simple Geographic Features

-  Facilitate Sharing Geographic Information

-  Enable Linked Geographic Data Sets

-  Specify Content, not Presentation or Visualization

-  Support Transformation for Visualization - SVG, VMRL

## Geography Markup Language Evolution

- GML - Geography Markup Language

-  OGC RFC11 issued December 1999

-  Initiated by OpenGIS Web Mapping SIG

- - DTD based

-  GML v1 OGC Recommendation Paper approved May 2000

- - RDF based with DTD profiles

-  GML v2 OGC Recommendation Paper approved April 2001

- - XML/Schema based

-  Developed by GML SIG and IP Team Participants

## GML Goal Refinement

- GML - Geography Markup Language

-  Share, Link, Store and Transport Application Schemas 	 as well as Data Sets

-  Open, vendor-neutral framework for the definition 	   	  of Geospatial Application Schemas and Objects

-  Allow Profiles that support proper subsets of GML

-  Support Application Schemas for specialized domains	 and Information Communities

-  Extensible to support Portrayal and Analysis

-  Incremental and Modular foundation for Internet GIS

-  Interoperability of independently developed applications

## GML Document Structure 

- GML - Geography Markup Language

-  GML Documents contain Feature Collections

-  GML Feature Collection is itself a GML Feature

-  Complex Features may be composed of other Features

-  that has a Spatial Extent -- a Bounding Box

-  GML Feature is composed of properties,

- one or more of which may be a Geometry (Collection)

-  GML Geometry Collection is itself a GML Geometry

-  GML Geometry

- - contains coordinates
- - specifies a Spatial Reference System
-   in a separate document

## GML Content Model

- GML - Geography Markup Language

- <Class>
-     <property>
-         <Class>
-             <property>
- 	     ....
- 	 </property>
-         </Class>
-     </property>
-     ....
- </Class>

-  Used for GML Features and Geometries

-  Forward Compatibility with future Semantic Web

## GML v2.0 Geometry Schema

- GML - Geography Markup Language

## GML v2.0 Feature Schema

- GML - Geography Markup Language

## XML/Schema (XSD)

-  Specification developed by W3C

-  Part 0: Primer       - http://www.w3.org/TR/xmlschema-0/

-  Part 1: Structures - http://www.w3.org/TR/xmlschema-1/

-  Three Proposed Recommendations

-  Part 2: Datatypes - http://www.w3.org/TR/xmlschema-2/

-  Will replace complex Document Type Definitions (DTD)

-  User-defined simple and complex types

-  Type inheritance / derivation by extension or restriction

-  Built-in and derived simple types

-  Supports XML Namespaces, XLink / XPointer / XPath

- GML - Geography Markup Language

## XML/Schema  Simple Type Definition

-  <xs:simpleType name="integer" id="integer">
-          <xs:annotation>
-                  <xs:documentation
-                       source="http://www.w3.org/TR/xmlschema-2/#integer"/>
-          </xs:annotation>
-          <xs:restriction base="xs:decimal">
-                  <xs:fractionDigits  value="0" fixed="true"
- 	 		 	id="integer.fractionDigits"/>
-          </xs:restriction>
-  </xs:simpleType>

- GML - Geography Markup Language

## XML/Schema  Complex Type Definition 

- XML/Schema  Complex Type Definition

- <xs:complexType name="localComplexType">
-        <xs:complexContent>
-               <xs:restriction base="xs:complexType">
-                     <xs:sequence>
-                         <xs:element ref="xs:annotation" minOccurs="0"/>
-                         <xs:group ref="xs:complexTypeModel"/>
-                    </xs:sequence>
-                    <xs:attribute name="name" use="prohibited"/>
-                    <xs:attribute name="abstract" use="prohibited"/>
-                    <xs:attribute name="final" use="prohibited"/>
-                    <xs:attribute name="block" use="prohibited"/>
-              </xs:restriction>
-       </xs:complexContent>
- </xs:complexType>

- GML - Geography Markup Language

## XML/Schema  Global Element and Attribute

- <xs:element name=”count" type=”integer">
- <xs:annotation>
-           <xs:documentation>How many there are<xs:/documentation>
-      </xs:annotation>
- </xs:element>

- <xs:attribute name="remoteSchema" type="uriReference">
-       <xs:annotation>
- 	<xs:documentation>
- 	         This attribute gives the location of the GML schema
-                         where an element is defined.</documentation>
-      </xs:annotation>
- </xs:attribute>

- GML - Geography Markup Language

## GML v2.0 in XML/Schema

-  Defines Complex Base Types for Geometry and Feature

-  XML/Schema for OpenGIS Geographic Features

-  Defines XLink Attribute Group for Property Associations

-  Content Model for Geometry and Feature Properties
- 	<Class>
- 		<property>
- 			<Class> ... </Class>
- 		</property>
- 		<remoteProperty xlink:href=“http://...”/>
- 	</Class>

-  Application Schema Types (e.g. TIGER/GML)
- - derived from GML Schema Types
- - follow GML Content Model

- GML - Geography Markup Language

## Defining, Encoding Features Without Geometry

- GML - Geography Markup Language

- <element name="Dean" type="ex:DeanType" />
- <complexType name="DeanType">
-      <sequence>
-            <element name="familyName" type="string"/>
-            <element name="age" type="integer"/>
-            <element name="nickName" type="string"
-                            minOccurs="0" maxOccurs="unbounded"/>
-     </sequence>
- </complexType>

- <Dean>
-     <familyName>Smith</familyName>
-     <age>42</age>
-     <nickName>Smithy</nickName>
-     <nickName>Bonehead</nickName>
- </Dean>

- XML

- XML/Schema

##    Defining   GML   Features Without Geometry

-    Defining   GML   Features Without Geometry

- GML - Geography Markup Language

- <element name="Dean" type="ex:DeanType"
-                 substitutionGroup="gml:_Feature" />
- <complexType name="DeanType">
-     <complexContent>
-           <extension base="gml:AbstractFeatureType">
-               <sequence>
-                   <element name="familyName" type="string"/>
-                   <element name="age" type="integer"/>
-                   <element name="nickName" type="string"
-                                   minOccurs="0" maxOccurs="unbounded"/>
-               </sequence>
-           </extension>
-      </complexContent>
- </complexType>

- Schema

## Encoding GML Features Without Geometry

- GML - Geography Markup Language

- <Dean fid="D1123” >
-     <gml:description>A nice old chap</gml:description>
-     <familyName>Smith</familyName>
-     <age>42</age>
-     <nickName>Smithy</nickName>
-     <nickName>Bonehead</nickName>
- </Dean>

- <Dean>
-     <familyName>Smith</familyName>
-     <age>42</age>
-     <nickName>Smithy</nickName>
-     <nickName>Bonehead</nickName>
- </Dean>

- XML

- GML

## Defining, Encoding GML Geometry

- GML - Geography Markup Language

-  Point
-  LineString
-  LinearRing
-  Polygon
-  MultiPoint
-  MultiLineString
-  MultiPolygon
-  MultiGeometry

- <element name="coord" type="gml:CoordType" />
- <complexType name="CoordType">
-       <sequence>
-            <element name="X" type="decimal"/>
-            <element name="Y" type="decimal" minOccurs="0"/>
-            <element name="Z" type="decimal" minOccurs="0"/>
-       </sequence>
- </complexType>

- <Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
-       <coord><X>5.0</X><Y>40.0</Y></coord>
- </Point>

## Defining Geometry Properties in GML/Schema

- GML - Geography Markup Language

-  <element name="_geometryProperty" type="gml:GeometryPropertyType"
-                  abstract="true"/>
- <complexType name="GeometryPropertyType">
-     <annotation>
-       <documentation>A simple geometry property encapsulates a geometry element.
-          Alternatively, it can function as a pointer (simple-type link) that refers to a
-          remote geometry element. </documentation>
-     </annotation>
-     <sequence minOccurs="0">
-       <element ref="gml:_Geometry"/>
-     </sequence>
-     <attributeGroup ref="gml:AssociationAttributeGroup"/>
-   </complexType>

## Defining Geometry Properties in GML/Schema

- GML - Geography Markup Language

-  <element name="pointProperty" type="gml:PointPropertyType"
-                  substitutionGroup="gml:_geometryProperty"/>
- <complexType name="PointPropertyType">
-     <annotation>
-       <documentation>Encapsulates a single point to represent position,
-                                   location, or centerOf properties.</documentation>
-     </annotation>
-     <complexContent>
-       <restriction base="gml:GeometryPropertyType">
-         <sequence minOccurs="0">
-           <element ref="gml:Point"/>
-         </sequence>
-         <attributeGroup ref="gml:AssociationAttributeGroup"/>
-       </restriction>
-     </complexContent>
- </complexType>

## Defining Features with Geometry in GML/Schema

- GML - Geography Markup Language

- <element name="Dean" type="ex:DeanType" substitutionGroup="gml:_Feature"/>
- <element name="deanLocation" type="gml:PointPropertyType"
-                 substitutionGroup="gml:pointProperty"/>
- <complexType name="DeanType">
-      <complexContent>
-           <extension base="gml:AbstractFeatureType">
-                 <sequence>
-                      <element name="familyName" type="string"/>
-                      <element name="age" type="integer"/>
-                      <element name="nickName" type="string"
-                                      minOccurs="0" maxOccurs="unbounded"/>
-                      <element ref="ex:deanLocation" />
-                 </sequence>
-           </extension>
-      </complexContent>
- </complexType>

## Encoding GML Features with Geometry

- GML - Geography Markup Language

- <Dean fid="D1123” >
-     <gml:description>A nice old chap</gml:description>
-     <familyName>Smith</familyName>
-     <age>42</age>
-     <nickName>Smithy</nickName>
-     <nickName>Bonehead</nickName>
-     <deanLocation>
-         <Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
-             <coord><X>5.0</X><Y>40.0</Y></coord>
-         </Point>
-     </deanLocation>
- </Dean>

## Defining Feature Collections in GML/Schema

- GML - Geography Markup Language

- <element name="CityModel" type="ex:CityModelType"
-                substitutionGroup="gml:_FeatureCollection"/>
- <element name="River" type="ex:RiverType" substitutionGroup="gml:_Feature"/>
- <element name="Road" type="ex:RoadType" substitutionGroup="gml:_Feature"/>
- <complexType name="CityModelType">
-     <complexContent>
-           <extension base="gml:AbstractFeatureCollectionType">
-                 <sequence>
-                      <element name="dateCreated" type="month"/>
-                 </sequence>
-           </extension>
-     </complexContent>
- </complexType>

## Defining Feature Collections in GML/Schema

- GML - Geography Markup Language

- <complexType name="RiverType">
-       <complexContent>
-               <extension base="gml:AbstractFeatureType">
-                     <sequence>....</sequence>
-               </extension>
-       </complexContent>
- </complexType>
- <complexType name="RoadType">
-       <complexContent>
-               <extension base="gml:AbstractFeatureType">
-                     <sequence>.....</sequence>
-               </extension>
-       </complexContent>
- </complexType>

## Encoding GML Feature Collections

- GML - Geography Markup Language

- <CityModel fid="Cm1456">
-       <dateCreated>Feb 2000</dateCreated>
-       <gml:featureMember xlink:type="simple"
-               xlink:href="http://www.myfavoritesite.com/rivers.xml#Rv567"/>
-       <gml:featureMember xlink:type="simple"
-               xlink:href="http://www.myfavoritesite.com/rivers.xml#Rv568"/>
-       <gml:featureMember>
-               <Road fid="Rd812">....</Road>
-       </gml:featureMember>
- </CityModel>

- With Remote Association Members

## Distributed GML Feature Collections

- GML - Geography Markup Language

- <fema:Hurricane fid=”H1456">
-       <name>Kurt</name>
-       <dateTime>2000-08-21T13:20:00-06:00</dateTime>
-       <noaa:stormMember xlink:type="simple"
-               xlink:href="http://www.noaa.gov/stormsurge.xml#S567"/>
-       <ace:leveeMember xlink:type="simple"
-               xlink:href="http://www.ace.gov/levees.xml#Lv568"/>
-      <fl:hospitalMember xlink:type=“simple”
- 	xlink:href=“http://www.fl.state.us/hospitals.xml#H235”/>
-       <dot:interstateMember xlink:type=“simple”
-               xlink:href=“http://www.dot.gov/interstates.xml#I95”/>
-       <tgr:countyMember xlink:type=“simple”
-               xlink:href=“http://www.census.gov/counties.xml#SC12011”/>
- </fema:Hurricane>

- With Shared Features for FGDC - NSDI - Digital Earth

## GML v3.0 RWG Work Items

-  ISO 19107 Geometry and Topology

-  ISO 19115 Metadata

-  Units of Measure

-  Japanese Database Promotion Committee (DPC) G-XML
-  Harmonization: Spatial Locator, Location Of Interest
-  Web site in English
- _http://__gisclh__.__dpc__.or.__jp__/__gxml__/contents-e/index.__htm_
-  Inquiry to
- _gxml__@__dpc__.or.__jp_

- GML - Geography Markup Language

-  Temporal

-  Namespaces and Schema Registration

-  Default Styling

-  Coverages

-  Coordinate Systems

-  GML Model and Syntax

-  v2 Compatible

## Slide 41

## G-XML Ver.2 - Ver.3 Goal

- Other standards
- OGC  GML
- ISO/TC211
- POIX ... etc.

**Harmonization**

- Ver.1

- Easier to use
- More advanced to use

**Global standard**

## Point & Direction based G-XML

- Describes the information of **a certain point at certain time**

- attribute

- time or span

- OptionalAttribute

- G-XML elements or attributes

- Direction

- TemporalLocator

- SpatialLocator

- direction

- location

## Point & Direction based G-XML

## GML v3.0 Revision Working Group

-  Spatial Locator  (from G-XML)

-  Location of Interest (from G-XML)

- - Coordinate Location

- - Street Address

- - Spatial Locator

- - Direction and Distance

- - Digital Content

- GML - Geography Markup Language

- - Temporal Locator

## GML 3.0 Schedule

- April TC Meeting
- Document key issues and problem areas
- Get sample/starting point documents.
- Assess available resources
- June TC Meeting
- Draft Schemas in each topic area
- Initial resolution of problem areas (may have conflicting schemas)
- Resolution of GML Model & Syntax issues
- July Tech Work Group Meeting (July 16-18 Vancouver)
- Set of draft schemas
- Key issues resolved
- Start on the specification (TOC, Outline)

## GML 3.0 Schedule

- August – September 2001
- Electronic mail discussion of issues – text/schema revisions
- Pending document for October TC
- Draft Specification for October TestBed (DPC)
- September TC
- Formal presentation of specification (SIG)
- Discussion Paper
- GML RWG meeting
- December TC
- RWG Vote on specification
- Publication of GML 3.0

## GML - Geography Markup Language 

## Prototype GML v2 Schemafor U.S. Census TIGER/Line files

- Open Source
- Java Translator

- File
- Formats

- TIGER/Line

- Modeling TIGER/GML

- Tiger/GML

- Use Cases

- GML - Geography Markup Language

## TIGER/Line File Relationships

- 1

- A

**Notes:**
TL File              Contents
    1           Complete Chain Basic Data
    2           Complete Chain Shape Coordinates
    3           Complete Chain Geographic Entity Codes
    4           Index to Alternate Feature Identifiers
    5           Complete Chain Feature Identifiers
    6           Additional Address Range and Zip Code Data
    7           Landmark Features
    8           Polygons Linked to Area Landmarks
    9           Key Geographic Location Features
    A          Polygon Geongraphic Entity Codes
    C          Geographic Entity Names
    H          TIGER/Line ID History
    I           Link Between Complete Chains and Polygons
    P          Polygon Internal Point
    R         TIGER/Line ID Record Number Range
    S          Polygon Additional Geographic Entity Codes
    Z         ZIP+4 Codes

## Modeling TIGER/Line in GML

## TIGER/Line to TIGER/GML Translator

-  Open GIS Interoperability Program 2000 Task

-  Open Source Java command line utility

-  Available online at http://www.gmlcentral.com/tiger/

-  Converts Tiger/Line files for one U.S. County per call

-  os> translate tgr11001.zip  tgr11001.xml

-  os> generateSVG tgr11001.xml gml2svg.xsl tgr110001.svg

## TIGER/GML Use Cases

-  Access via OGC Web Feature Server (WFS)

-  Update via GIS WFS Client / Server

-  GML / WFS Web Transaction Processing

-  Display via OGC Cascading Web Map Server (WMS)

- A.  Public Access: NSDI 101

- B.  Partner Update: NSDI at Work

## TIGER/GML WFS Access Scenario

- WFS
- Client

- WFS

- User

- Get Capabilities

- Capabilities

- Describe Feature Type

- GML Schema

- GML

- Get Features

- Save
- As

## TIGER/GML WMS Display Scenario

## TIGER Web Mapping Update Scenario

- Continuous updates by State and Local Governments

- Local Data

- Provider

- U.S. Census

- Bureau

- Continuous TIGER Update

## TIGER Update Events

- Change to State or Local Governmental Unit Boundary
- Construction of a New Residential Subdivision
- Construction or Demolition
- Apartment Building
- Condominium
- Spatial Enhancement of Local GIS Database

## TIGER/GML GIS/WFS Update Scenario

- GIS
- WFS
- Client

- WFS

- State,
- County,
- Municipal
- Government

- Get Features

- GML

- Put Features

- GIS Import

- GIS Update

- GIS Export

- TIGER

- Batch Update

## TIGER/GML WFS Transaction Scenario

## TIGER/GML v3.0 Possible Enhancements 

-  Shared Geometries

-  Topology to support Cascaded Updates

-  Spatial Locators to encode Addresses

-  Metadata in GML format

-  Units of Measure

-  Location of Interest “Map Spots” for Residential Structures

## Geography Markup Language (GML)

- Paul Daisey
- Geography Division
- U.S. Census Bureau
- pdaisey@geo.census.gov

- http://www.census.gov/geo/www/tiger/index.html
- http://www.opengis.net/gml/01-029/GML2.html