0% found this document useful (0 votes)
20 views60 pages

OGC - Lecture

The document discusses the Open Geospatial Consortium (OGC) and its API standards aimed at enhancing interoperability in geospatial data and services. It covers various OGC API standards, including those for features, maps, and environmental data retrieval, providing a framework for accessing and managing geospatial information. The document emphasizes the importance of these standards for applications in disaster management, urban planning, and environmental monitoring.

Uploaded by

Ha Mai Huong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views60 pages

OGC - Lecture

The document discusses the Open Geospatial Consortium (OGC) and its API standards aimed at enhancing interoperability in geospatial data and services. It covers various OGC API standards, including those for features, maps, and environmental data retrieval, providing a framework for accessing and managing geospatial information. The document emphasizes the importance of these standards for applications in disaster management, urban planning, and environmental monitoring.

Uploaded by

Ha Mai Huong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 60

Climate change Adaptation using Digital

geospatial twins and Earth Observation


Geospatial Web
Applications
Introduction to OGC
APIs
DOCTOR NGUYEN THI THUY LIEN

DOCTOR TRINH THANH

F A C U LT Y O F C O M P U T E R S C I E N C E – P H E N I K A A U N I V E R S I T Y

EMAIL: [email protected]
Agenda
•About OGC
•OGC API standards
•OGC API Common
•OGC API Features (WFS)
•OGC API Maps (WMS)

3
OGC?
OGC stands for the Open Geospatial Consortium, an international
organization committed to developing open standards for geospatial content
and services, GIS data processing, and data sharing. The OGC's standards
are crucial for enabling interoperability among geographic information
systems (GIS), allowing for the seamless sharing and integration of
geospatial data and services across different systems and platforms.

https://www.ogc.org/ https://github.com/opengeospatial/ogcapi-records

4
OGC
1. Mission: The OGC aims to make geospatial information and services accessible and usable across different technologies
and organizational boundaries

2. Standards: APIs

3. Membership: The OGC includes a diverse membership of organizations from government, commercial, and academic
sectors. Members collaborate to create and promote standards that are openly available
◦ ArcGIS, Geoserver, Mapserver

4. Interoperability: By promoting the use of open standards, the OGC enhances the interoperability of geospatial data and
technologies. This interoperability is essential for a wide range of applications, including disaster management, environmental
monitoring, and urban planning

5. Innovation: The OGC encourages innovation by enabling the integration of new technologies and methodologies in
geospatial science. This supports advancements in areas such as Internet of Things (IoT), augmented reality (AR), and smart
cities.
5
OGC APIs
The Open Geospatial Consortium (OGC) develops and
maintains standards for geospatial and location-based
services. These standards ensure interoperability among
various systems and technologies. Here is an overview of
some OGC APIs standards:

6
OGC API standards
 OGC API – Common

OGC API – Features

 OGC API – Coverages

 OGC API – Records

 OGC API – Processes

 OGC API – Tiles

 OGC API – Maps

 OGC API - Environmental Data Retrieval

 OGC API – Styles

• OGC API – Routing


7
OGC API standards
OGC API – Coverages
The OGC API - Coverages is a specification developed by the Open Geospatial Consortium (OGC)
to provide standards for accessing, querying, and retrieving coverage data through web services.
A coverage is a "function which returns values from its range for any direct position
within its domain" (ISO 19123-1:2023). Coverages are represented by some binary or
ASCII serialization, specified by some data (en­coding) format. Arguably the most popular
type of coverage is that of a gridded coverage. Gridded coverages have a grid as their
domain set describing the direct positions in multi-dimensional coordinate space,
depending on the type of grid. Satellite imagery is typically modeled as a gridded
coverage
https://ogcapi.ogc.org/coverages/ https://ogcapi.ogc.org/coverages/overview.html

8
OGC API standards
OGC API – Records

The OGC API - Records standard is designed for managing and


retrieving metadata records. Metadata records are descriptive
information about data resources, such as datasets, services, and
collections. This API allows users to search, discover, and access
these records through a standardized web service.

https://ogcapi.ogc.org/records/

9
OGC API standards
OGC API – Processess

The OGC API - Processes standard provides a framework for accessing and
executing geospatial processing services via web APIs. This allows users to submit
processing jobs, such as data analysis or transformation tasks, and retrieve the
results once the processing is complete. This standard supports a wide range of
geospatial processes, facilitating interoperability and integration with other geospatial
services and applications.

https://ogcapi.ogc.org/processes/

10
OGC API standards
OGC API – Tiles

The OGC API - Tiles standard defines a way to retrieve geospatial data as
tiles, which are pre-rendered or dynamically generated images or data chunks
that cover a specific area of a map at a particular zoom level. This tiling
approach is commonly used in web mapping services to efficiently deliver map
data and allow for smooth navigation and interaction with large datasets.

https://ogcapi.ogc.org/tiles/

11
OGC API standards
OGC API - Environmental Data Retrieval

https://www.ogc.org/standard/ogcapi-edr/

The OGC API - EDR standard provides a set of APIs to query and retrieve a wide range of
environmental data, such as meteorological, oceanographic, air quality, and other types of
data that are crucial for environmental monitoring and analysis. This API facilitates the access
to specific subsets of large environmental datasets, enabling users to retrieve data based on
criteria such as location, time, and parameter.

12
OGC API standards
The main features of OGC API - EDR include:

Spatial Queries: Retrieve data for specific geographic areas, such as points,
polygons, or bounding boxes.

Temporal Queries: Access data for specific time ranges or intervals.

Parameter Queries: Filter data based on specific environmental parameters or


variables.

Interoperability: Standardized API enables integration with various systems


and applications, promoting data sharing and collaboration.

13
OGC API standards
OGC API – Common

OGC API - Common is a multi-part standard that documents the set of common
practices and shared requirements that have emerged from the development of
Resource Oriented Architectures and Web APIs within the OGC. Standards
developers will use these building-blocks in the construction of other OGC Standards
that relate to Web APIs.

https://ogcapi.ogc.org/common/

https://github.com/opengeospatial/ogcapi-common

14
OGC API – Common
https://github.com/opengeospatial/ogcapi-common

https://docs.ogc.org/is/19-072/19-072.html

15
OGC API – Common
Key Concepts of OGC API - CommonCore Principles:
◦ RESTful Design: The APIs follow REST principles, using standard HTTP methods (GET, POST, PUT, DELETE) and status
codes.
◦ JSON and HTML: JSON is used for data encoding, while HTML is used for human-readable documentation.
◦ Hypermedia: APIs provide hypermedia controls (links) to navigate between resources.

Common Elements:
◦ Landing Page: A common entry point for the API, providing links to available resources and endpoints.
◦ API Definition: Describes the API's capabilities, typically using OpenAPI specifications.
◦ Conformance Classes: Define sets of requirements that implementations must meet to be compliant with certain aspects of
the API.
◦ Collections: A common structure for organizing and accessing geospatial data, such as feature collections or coverage
collections.
◦ CRUD Operations: Standardized operations for creating, reading, updating, and deleting resources.

16
OGC API – Common

Geoserver

17
OGC API – Common

This demomstration is stored in Example1.html.

18
OGC API – Common

19
OGC API – Common

Landing page, this page is


Example of HTML with OGC hoted by geoserver
Fetch: exploring landing page
and collections

Retrieve data (in Json


format) from the landing page
Retrieve Metadata: Access
detailed metadata for a
specific collection.

Retrieve specific data from the


collection using standardized queries
and parameters

20
OGC API – Features

OGC API - Features (formerly known as WFS 3.0) is a standard by


the Open Geospatial Consortium (OGC) that defines a set of RESTful
web services for accessing geospatial features. It simplifies access to
geospatial data, making it easier to retrieve, query, and manipulate
feature data over the web using modern web technologies.

https://ogcapi.ogc.org/features/

https://github.com/opengeospatial/ogcapi-features/tree/master

21
22
https://github.com/opengeospatial/ogcapi-features

23
OGC API – Features

Key Concepts of OGC API - Features

Features: These are spatial entities with associated attributes. They can represent anything from a river
to a road segment or a building.

Collections: Collections are groups of related features. Each collection can be thought of as a dataset
or a table in a database.

Core Endpoints: The standard defines a set of core endpoints for accessing collections and features:
◦ /collections: Lists all available feature collections.
◦ /collections/{collectionId}: Provides metadata about a specific feature collection.
◦ /collections/{collectionId}/items: Retrieves features from a specific collection.
◦ /collections/{collectionId}/items/{featureId}: Retrieves a specific feature by its ID

24
OGC API – Features

1. Collections
◦ Definition: A collection is a group of geospatial features.
◦ Endpoints:
◦ GET /collections: Lists all available collections.
◦ GET /collections/{collectionId}: Retrieves metadata for a specific
collection.

25
OGC API – Features

2. Items
◦ Definition: Individual geospatial features within a collection.
◦ Endpoints:
◦ GET /collections/{collectionId}/items: Lists all features within a collection.
◦ GET /collections/{collectionId}/items/{featureId}: Retrieves a specific feature by ID.

26
https://codepen.io/cportele/pen/OJbrgKe

27
OGC API – Features

3. Querying Features
Filtering: Allows for querying features based on spatial, temporal, and attribute
criteria.

Endpoints:
◦ GET /collections/{collectionId}/items: Supports query parameters for filtering
features (e.g., bbox, datetime, limit, offset).

28
OGC API – Features

Modifying Features
◦ Creating Features: Adds new features to a collection.
◦ POST /collections/{collectionId}/items: Creates a new feature.
◦ Updating Features: Modifies existing features.
◦ PUT /collections/{collectionId}/items/{featureId}: Updates a feature.
◦ Deleting Features: Removes features from a collection.
◦ DELETE /collections/{collectionId}/items/{featureId}: Deletes a feature.

29
OGC API – Features

An extension in geoserver

30
OGC API – Features

31
OGC API – Features

Example 2: Get all collections from Geoserver via OGC API


Feature

This code is stored

in Example2.html

32
OGC API – Features

Example 2:

33
Example 2
Landing page, this is accessed from
Geoserver

Request all collections from


Geoserver via OGC API -
Feature

Retrieve data in Json format

34
Example2
Resutls are obtained from
Collections (OGC API)

35
Example2
Landing page, this is accessed from
Geoserver

Request all metadata of one


Collection from Geoserver via
OGC API -Feature

Retrieve data in Json format

36
Example2

37
Example 2
Landing page, this is accessed from
Geoserver

Request a specific feature from


a particular collection from
Geoserver via OGC API -
Feature

Retrieve data in Json format

38
Example 2

39
Example 2
Landing page, this is accessed from
Geoserver

Request a specific feature Id


from one feature (which is
collected from a particular
collection from Geoserver via
OGC API –Feature)

Retrieve data in Json format

40
We use collectionID: top:states

41
OGC API Features
Example 3. This example is similar to Example 2. However, the
results will be in Table format (in HTML)

This code of this example is stored in Example3.html

42
Example 3

43
OGC API Features
Example 4. This example shows how to make a query for a feature in a
collection. (This code of example is stored in Example 4)

44
OGC API Features
Example 5. This example illustrates how to select features based on a fitering condition
(this code is stored in Example5.html)

45
OGC API Features
Example 6. This example presents the way a feature can display on a map using the OGC API
(This code is stored in Example 6)

46
OGC API Map
The Open Geospatial Consortium (OGC) API - Maps
specification defines a standard interface for accessing
geospatial map services via web APIs. This API allows
clients to request map images from a server using well-
defined endpoints and parameters. The OGC API - Maps is
part of the broader OGC API suite, which aims to modernize
and simplify access to geospatial data and services.

47
OGC API Map

48
https://github.com/opengeospatial/ogcapi-maps

49
OGC API Map
1.Base URL and Endpoints:
1. The base URL is the entry point to the API. For example,
http://localhost:8080/geoserver/ogc/maps.
2. Endpoints are appended to the base URL to perform specific actions. Common endpoints
include:
1. /collections: List the available map layers (collections).
2. /collections/{collectionId}/map: Retrieve a map image for a specific layer.

2.Collections:
1. A collection represents a geospatial dataset or layer that can be visualized as a map. Each
collection has a unique identifier (collectionId).

50
OGC API Map
3. Parameters for Map Requests:

•Bounding Box (bbox): Defines the geographical area to be covered by the map. It is
specified as a comma-separated list of four values: minLon,minLat,maxLon,maxLat.

•Width and Height: Specifies the dimensions of the requested map image in pixels.

•Coordinate Reference System (CRS): Specifies the spatial reference system for the
map. Commonly used CRS is EPSG:4326.

•Format (f): Specifies the format of the returned map image. Common formats include
image/png, image/jpeg, etc.

51
OGC API Map
4. Query Parameters Example:

GET /ogc/maps/v1/collections/{collectionId}/map?bbox=-
130,24,-
66,50&width=800&height=600&crs=EPSG:4326&f=image/png

52
OGC API Map
5. Additional Features:

•Styles: You can apply different styles to the map layers to


customize the appearance of the map.

•Feature Information: You can retrieve attribute information of


specific features on the map using the GetFeatureInfo request,
usually triggered by clicking on the map

53
OGC API Map
An extension of GeoServer

54
OGC API Map

55
OGC API Map

56
OGC API Map
Example 7. This example is to show how to display a feature(stored in Geoserver) via
OGC API MAP. This code is stored in Example7. html

57
Landing page

Example 7.

Choosen layername
(a feature stored in
Geosever)
Coordinate
Reference System

Reques a the map


from Geoserver via
OGC API Map

58
Example 8
Example 8. This example is to show how to display a feature(stored in
Geoserver) via OGC API MAP, and add two functions (zoom in and Zoom
out). This code is stored in Example8. html

59
Example 9
Example 9. This example is similar to Example 8, and updated a Pan function. This code is stored
in Example9.html

60

You might also like