La présentation est en train de télécharger. S'il vous plaît, attendez

La présentation est en train de télécharger. S'il vous plaît, attendez

Vers national spatial data infrastructure training program Serving Transportation Data Through the NSDI Features, GML, and Application Schemas.

Présentations similaires


Présentation au sujet: "Vers national spatial data infrastructure training program Serving Transportation Data Through the NSDI Features, GML, and Application Schemas."— Transcription de la présentation:

1 vers. 20100924 national spatial data infrastructure training program Serving Transportation Data Through the NSDI Features, GML, and Application Schemas Features and the Geography Markup Language

2 national spatial data infrastructure training program Features and the Geography Markup Language 1 Learning Objectives After completing this lesson, you will be able to:  Define a Feature  Explain what an application schema is  Interpret simple UML diagrams  Describe the elements of the Geography Markup Language

3 national spatial data infrastructure training program Features and the Geography Markup Language 2 Features A feature is an abstraction of a real world phenomenon. A feature is geographic if it is associated with a location relative to the Earth. A digital representation of the real world can be thought of as a set of features. Discrete data entities whose position in space is described by geometric primitives such as points, lines or polygons, or topological primitives such as nodes, edges or faces, are features.

4 national spatial data infrastructure training program Features and the Geography Markup Language 3 Feature Attributes Features are defined by a set of descriptive attributes Attributes are defined by: name value data type  simple data types (integer, real, string, boolean, category)  more complex aggregated types (e.g., an array of integers)  other features

5 national spatial data infrastructure training program Features and the Geography Markup Language 4 Features that have the same attribute names and attribute types are said to be of the same Feature Type (or Class) Feature types are fully characterized by their name the names and types of their attributes Feature Types Road Green Road Orange Street Feature Type: Road

6 national spatial data infrastructure training program Features and the Geography Markup Language 5 Feature Instances A Feature Instance is a single representation or occurrence of a particular feature type: an “actual object” rather than a “kind of object” Feature instances are fully characterized by their feature type the values of their attributes Road Green Road Orange Street Feature Instances: Specific Roads

7 national spatial data infrastructure training program Features and the Geography Markup Language 6 Subclasses and Inheritance New feature types can be created from existing ones by adding more attributes This is one mechanism of creating subclasses of the original feature types Then the new feature type has new characteristics, and a new name, but it also still has the same attributes as the old one The new feature type is said to inherit those original attributes from the original class, or simply to inherit from the original class

8 national spatial data infrastructure training program Features and the Geography Markup Language 7 Instantiation and Abstract Classes The process of creating a feature instance from a feature type is called instantiation Some feature types may not be instantiated, but their subclasses may be instantiated This pattern arises quite frequently Classes that cannot be instantiated are referred to as abstract

9 national spatial data infrastructure training program Features and the Geography Markup Language 8 Example: Why Abstract Classes Suppose a model for transportation requires that routes of travel be divided into segments, where each type of segment represents the physical infrastructure for each mode of transport (rail, road, public transit, …) The segments have a number of attributes in common, e.g. length and alignment, but also several attributes that are particular to each mode of transport It may be desirable and efficient to create one feature type that contains only the attributes that are common among all the transportation modes However, it makes no sense to instantiate such a feature type, since it cannot actually represent a physical segment of a route of travel But it does make sense to instantiate subclasses that represent the physical characteristics of real-world segments for the various modes of transportation

10 national spatial data infrastructure training program Features and the Geography Markup Language 9 Feature Collections A Feature Collection is a collection of Features that can itself be regarded as a Feature it has its own feature type and distinct attributes in addition to the features it contains therefore, attributes can have values that are feature collections

11 national spatial data infrastructure training program Features and the Geography Markup Language 10 Geometry and Location Features can have attributes that represent shape (frequently called “geometry”) and location, often but not always, the shape and location of the feature itself In the models we consider, geometry and location are simply attributes like any other, and have no special status A feature is not require to have geometry A feature may have more than one geometry different shapes may be desirable for viewing at different scales, or for different kinds of analysis

12 national spatial data infrastructure training program Features and the Geography Markup Language 11 More About Geometry and Features Geographic features are those with properties that may be geometry-valued and are associated with a location on the Earth Simple features are features whose geometric properties are restricted to “simple” geometries, for which coordinates are defined in two dimensions and the curves are expressed as chains of linear segments (polylines)

13 vers. 20100924 national spatial data infrastructure training program Serving Transportation Data Through the NSDI Application Schemas

14 national spatial data infrastructure training program Features and the Geography Markup Language 13 An application schema Provides the formal description of the data structure and content required by one or more applications Consists of a set of feature types (classes) and their relationships Specifies the operations for manipulating and processing data by these applications Is expressed using a schema modeling language  e.g., Unified Modeling Language UML, a graphical, conceptual representation  or XML Schema, a text-based representation for XML implementations that emphasizes the data structure of an application schema Application Schema: Definition

15 national spatial data infrastructure training program Features and the Geography Markup Language 14 Application schemas help with Determining the necessary transformations between two datasets Translating semantics of transferred datasets with respect to users’ local data Assisting users of applications with similar data requirements in creating a common application schema for the interface between their systems and data. The Framework Data Standard is an application schema Application Schemas and the FDS

16 national spatial data infrastructure training program Features and the Geography Markup Language 15 A Brief Intro: the UML Class Diagram The Universal Modeling Language (UML) is a graphical language that assists with the design and analysis of object-oriented software systems The UML Class Diagram enables the depiction of feature types (classes) and their relationships The Class Diagram consists of symbols that represent the classes and a variety of connectors between the symbols that designate the type of relationship they have

17 national spatial data infrastructure training program Features and the Geography Markup Language 16 UML Class Diagram: Class Symbol > Class Name +attribute1_name: attribute1 type +attribute2_name: attribute2 type … Symbol for a Class (Feature Type) The UML symbol for a feature type (class) is simply a series of two or three boxes stacked one above the other, with text describing the class in the boxes The stereotype tells whether the class is a feature type, or abstract, or some other designation. The class name is written in italics if it is abstract, regular text otherwise. The third box lists the operations supported by the class. These are not relevant to the cases described in this material, so this box is usually not depicted. The second box lists the names and types of the feature’s attributes, separated by a colon. Note: the “+” sign at the beginning of an attribute simply indicates that it applies to all members of the class.

18 national spatial data infrastructure training program Features and the Geography Markup Language 17 UML Class Diagram: Relationships Class C Class D A relationship between two features in UML is indicated by a line between them. The type of relationship is indicated by the symbol at the end of the line. Class A Class B Class E Class F There is an association between class A and class B Class D is a subclass of class C Class E instances contain one or more class F instances

19 national spatial data infrastructure training program Features and the Geography Markup Language 18 Example: Simple Application Schema UML is frequently used to describe and document an application schema The following diagram depicts a simple application schema for a road network * Route RoadSegment Transportation Segment * Please note: this schema is purely instructional; it does NOT accurately depict any portion of the FDS model. However, it does borrow some names and notions from the FDS roads model. This application schema says that the RoadSegment feature type is a subclass of TransportationSegment, and that a Route is an aggregate of RoadSegments

20 national spatial data infrastructure training program Features and the Geography Markup Language 19 UML Helpful but Not Enough UML is used extensively in the FDS documents to illustrate concepts and relationships of which the model is composed Lesson 3 in this series refers to the UML diagrams in FDS Parts 7 and 7c to help explain the design of the model However, software systems in general cannot read UML diagrams, which are quite conceptual The actual information passed among computer systems is encoded in a text-based language

21 vers. 20100924 national spatial data infrastructure training program Serving Transportation Data Through the NSDI Geography Markup Language

22 national spatial data infrastructure training program Features and the Geography Markup Language 21 Geography Markup Language The Geography Markup Language (GML) is a text-based language developed to describe geographic features and related entities GML is built upon the Extensible Markup Language (XML) the student is encouraged to review the basics of XML if they are not already familiar for XML review materials, see http://www.w3schools.com/xml/default.asp http://www.w3schools.com/xml/default.asp GML has been widely accepted as a standard for communicating information about geographic features for consumption by humans - and between software systems GML is an OGC Standard, currently (June 2010) at version 3.2.1 GML is also ISO Standard 19136 http://www.opengeospatial.org/standards/gml

23 national spatial data infrastructure training program Features and the Geography Markup Language 22 Attributes: A Note About Terminology The term “attribute” has two meanings in the context of the material we are now discussing, so it is important to clarify how it is used in these lessons Attributes as discussed thus far are feature attributes, which document the characteristics and state of a feature feature attributes are characterized by a name and a type feature attributes are sometimes referred to as “feature properties,” or just “properties” In the context of XML, the term “attribute” is a syntactical construct that describes an XML element, and is indicated using its own notation We will use the term “XML element attributes” to distinguish them from feature attributes GML uses a few XML element attributes, and we shall encounter some of them in this material

24 national spatial data infrastructure training program Features and the Geography Markup Language 23 GML Instance and Schema Documents GML documents can describe feature instances, not just classes Such documents are called GML instance documents, or simply instance documents When your data are delivered to your customers, they will be delivered as GML instance documents GML documents that define classes (GML feature types) are written in the XML Schema language Also simply called “XML Schema” XML Schema is itself written in XML The GML schema for the FDS is written as XML Schema

25 national spatial data infrastructure training program Features and the Geography Markup Language 24 GML and XML Schema GML itself is an XML Schema These lessons will not attempt an overview or even an instructional introduction to XML Schema However, some understanding of XML Schema is important for understanding GML, and to understand the FDS Transportation Schemas Therefore, later lessons provide a few examples to help the student understand how to read and use the XML Schema documents that describe the FDS and GML itself It is also recommended that the student refer to http://www.w3schools.com/schema/default.asp for a tutorial and links to further documentation about the XML Schema language http://www.w3schools.com/schema/default.asp

26 national spatial data infrastructure training program Features and the Geography Markup Language 25 Some Notes About GML GML defines a variety of object types Features Coordinate reference systems Geometry (simple and complex) Topology Time Units of Measure Generalized values An GML object cannot contain another object directly - it must have a property (a feature attribute) that contains that object as a value. This is similar to the class-property model employed by another modeling language, the Resource Description Framework (RDF) It is also similar to the entity-relationship pattern typically used in Relational Database Management System (RDBMS) design and analysis

27 national spatial data infrastructure training program Features and the Geography Markup Language 26 More Notes About GML As in UML or in the abstract, the state of a GML feature is defined by the values of its properties A property may be geometric and geolocated A GML feature may have multiple geometric properties, or none Semantics (meaning) are provided by context of application, not inherent to the GML document however, it is good practice to name a property according to the role of its value or the relationship it defines

28 national spatial data infrastructure training program Features and the Geography Markup Language 27 GML Application Schemas The GML language provides base types only Feature types for a particular application are defined in an XML Schema document that defines a language - a GML Application Schema - of interest to a particular information community e.g., the Framework Data Standard The conceptual role of an application schema is to define a catalog of feature types relevant to the information community. The operational role of an application schema is to validate XML instance documents containing information of interest to the community. this will be an optional but worthwhile step in implementing your data as part of the NSDI this topic is presented in Lesson 4 An application schema need not import GML in its entirety. guidelines on how to use just a subset of GML, and stylesheets for automating the process (written in XSLT, an XML-based transformation language), are provided in an appendix to the GML specification document.

29 national spatial data infrastructure training program Features and the Geography Markup Language 28 Example: A GML Instance Document <RoadSeg xmlns:roads=“http://frameworkwfs.usgs.gov/framework/schemas/gmlsf1/Roads.xsd”http://frameworkwfs.usgs.gov/framework/schemas/gmlsf1/Roads.xsd” xmlns:gml=“http://www.opengis.net/gml”http://www.opengis.net/gml” id="RS1" > 20100416T13:00 open 4712.07 4712.5 -127.66326 38.3016 -127.69532 38.43101 -127.76317 38.49026 Here we have a GML document that describes the length and location of a Road Segment named “RS1.” Snippets from this document appear in the following slides

30 national spatial data infrastructure training program Features and the Geography Markup Language 29 GML Instance Document: General Notes xmlns:roads=“http://frameworkwfs.usgs.gov/framework/schemas/gmlsf1/Roads.xsd”http://frameworkwfs.usgs.gov/framework/schemas/gmlsf1/Roads.xsd” xmlns:gml=“http://www.opengis.net/gml”http://www.opengis.net/gml” An XML version line must be included in every XML document, including GML instance documents, so that software knows how to interpret it: The object name at the beginning of many of the XML elements is preceded by its namespace identifier and a colon. Namespaces eliminate the danger of confusion in case the same object name is used in more than one schema. Namespace identifiers are defined in each document via “xmlns” declarations. The syntax is demonstrated in the following snippet. More information about these general issues may be found in any comprehensive XML tutorial, such as http://www.w3schools.com/xml/default.asp

31 national spatial data infrastructure training program Features and the Geography Markup Language 30 Feature Definition and XML Attributes <RoadSeg xmlns:roads=“http://frameworkwfs.usgs.gov/framework/schemas/gmlsf1/Roads.xsd”http://frameworkwfs.usgs.gov/framework/schemas/gmlsf1/Roads.xsd” xmlns:gml=“http://www.opengis.net/gml”http://www.opengis.net/gml” id="RS1" > …. The definition of a GML feature starts with the name of the feature, followed by XML element attributes as required by the application. Note the notation for XML element attributes: an attribute name, followed by the attribute value in quotation marks, within the same set of angle brackets as the feature type name, immediately following the feature type name. Multiple XML attributes within a single element are separated by whitespace. The opening type declaration is followed by the various feature attributes of the feature (not shown in above snippet), The declaration ends with the closing symbol for the feature, a slash followed by the feature type name, all enclosed in angle brackets.

32 national spatial data infrastructure training program Features and the Geography Markup Language 31 Feature Attributes and XML Attributes … 20100416T13:00 open 4712.07 4712.5 -127.66326 38.3016 -127.69532 38.43101 -127.76317 38.49026 … Elements declaring the feature attributes (properties and their values) of the feature occupy the center of the feature declaration The meanings of these attributes will be discussed in the next Module Do note, however, that several of the feature attribute elements include XML element attributes, such as “uom,” which declares the unit of measure (in this case, feet) in which the associated length is reported

33 national spatial data infrastructure training program Features and the Geography Markup Language 32 LineString, srsName, and Dimension … -127.66326 38.3016 -127.69532 38.43101 -127.76317 38.49026 … The geometry of the Road Segment described in our example is a LineString, a sequence of straight lines connected at the coordinates given in the posList, or position list The spatial reference system to which the coordinates refer is declared in the XML attribute “srsName,” in the form of an EPSG code The “dimension” XML attribute tells software or human readers that the coordinates in the position list (the gml:posList) are to be interpreted as coordinate pairs, not as triplets as they would be for a three-dimensional LineString

34 national spatial data infrastructure training program Features and the Geography Markup Language 33 About GML Revisions The GML standard has undergone a few revisions The current version is GML 3.2.1 GML 3.2.1 is identical to ISO Standard 19136 Many products support one or more versions of the GML 2 series These lessons deal mostly with the Simple Features profile of GML 3, otherwise known as GML 3 Level 0 (GML3L0)

35 national spatial data infrastructure training program Features and the Geography Markup Language 34 Resources Many resources are available on the Web The Wikipedia article on GML is informative, accurate, and current (as of June 2010) http://en.wikipedia.org/wiki/Geography_Markup_Langu age A particularly useful site for explaining GML and related topics (in the context of a different application schema), is https://www.seegrid.csiro.au/twiki/bin/view/Xmml/WebH ome

36 national spatial data infrastructure training program Features and the Geography Markup Language 35 The Framework Data Standard, Part 7: Transportation Next Lesson


Télécharger ppt "Vers national spatial data infrastructure training program Serving Transportation Data Through the NSDI Features, GML, and Application Schemas."

Présentations similaires


Annonces Google