Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Welcome to PharoOWS documentation.

A variety of protocols and standards exist to enable communication with map servers and access geographic data in both raster and vector formats. Defined by the Open Geospatial Consortium (OGC), these protocols are fondamental to ensure interoperability between clients and servers.

PharoOWS supports the official OGC protocols along with some widely adopted de facto standards, offering tools for querying map servers and parsing the returned data.

Overview of supported protocols and standards

PharoOWS is split into several packages according to the supported protocols and standards:

PackageTypeSupported ProtocolsStatus
OWS-TMSDe facto standardTMSIn development
OWS-ServiceOfficial OGCWMS, WMTSIn development
OWS-APIOfficial OGC (modern)OGC API - ProcessesUpcoming

📢 PharoOWS is still in development, so new protocols and standards will be added over time.

Install

PharoOWS can be installed using Metacello:

Metacello new
  baseline: 'OWS';
  repository: 'github://ThalesGroup/PharoOWS:main';
  load.

Dependencies are:

Geospatial services: OGC Standards and de facto Protocols

Standard communication protocols with map servers can be divided into two main categories:

  • Official protocols defined by the Open Geospatial Consortium (OGC)
  • De facto protocols that have emerged due to widespread use (such as XYZ)

Formal OGC protocols

Traditional OGC Services

These services are based on SOAP or HTTP protocols with specific requests often constructed as URLs with parameters. They primarily exchange XML or other specialized formats (XML for requests/responses, images for maps). These standards have been widely used for many years to ensure geospatial interoperability.

http://mapserver?SERVICE=WMS&REQUEST=GetMap&LAYERS=layer0,layer1

Modern RESTful Services

These adopt a RESTful architecture based on modern web principles. They use simple HTTP methods (GET, POST, etc.) and return responses in JSON. This approach makes integration with applications easier due to its simplicity and compatibility with current web technologies. OGC API - Features is a key example of this new generation, providing standardized REST APIs for accessing vector data.

http://mapserver/collections/layer0/items.json

De facto standards

Although not officially standardized by organizations like the OGC, protocols such as TMS (Tile Map Service) and the XYZ URL scheme are widely adopted in web mapping. Their simplicity and compatibility with modern web technologies have made them essential de facto standards for serving map tiles.

Examples

WMS

| wms operations getmap layers size map |

"Create a WMS client targeting the IGN WMS server"
wms := OWSServiceWMS new.
wms url: 'https://data.geopf.fr/wms-r'.

"Introspect the server capabilities"
operations := wms operations.

# 'operations' is a XMLOrderedList(
#   a OWSServiceWMSOperation <GetCapabilities>
#   a OWSServiceWMSOperation <GetMap>
#   a OWSServiceWMSOperation <GetFeatureInfo>
# )

"Listing available image formats for maps"
getmap := operations detect: [ :request | request name = 'GetMap' ].
getmap formats.

# 'formats' is an OrderedCollection(
#   image/jpeg
#   image/png
#   image/tiff
#   image/geotiff
#   image/x-bil;bits=32
# )

"Listing available layers"
layers := wms layers.

# 'layers' is a XMLOrderedList(
#   a OWSServiceWMSLayer(ADMINEXPRESS-COG-CARTO.LATEST)
#   a OWSServiceWMSLayer(ADMINEXPRESS-COG.2017)
#   [...]
# )

"Download a raster map with two layers for a bounding box defined by EPSG:3857 coordinates"
map := wms
  map: { 'EL.GridCoverage'. 'FORETS.PUBLIQUES' }
  bbox: (-546079 @ 6126282 corner: -398839 @ 6212047)
  size: 800 @ 600
  epsg: '3857'
  format: 'image/png'.

# 'map' is a Bitmap