View on GitHub

Hypermap-Registry

Hypermap Registry, remote map services made easy for your SDI

Tutorial

In HHypermap Registry it is possible to harvest map services (OGC and ESRI REST) in different ways. You can create services using a single endpoint or creating a list of endpoints. An endpoint could be defined as a server’s url address of services required for harvesting.

Here is a list of some sampe endpoint for each kind of servies:

All of these sample endpoints can be harvested and health checked by HHypermap Registry.

Assuming that you have HHypermap Registry installed and running in your development/production server (including fixtures), enter in your browser the url: http://your_url/registry. In case you are running Registry in a development server, the url corresponds to http://localhost:8000/registry. The request response will be the following page.

image Application index page

Accessing the administration panel.

In order to access to the administration panel, in your browser enter http://localhost:8000/admin. Access through your credentials (user: admin, password: admin). The server will respond with the administrative panel page (See figure below)

image Administrative panel

Harvest services from a single endpoint

HHypermap Registry is designed to create a service that contains information layers given a single endpoint url. To perform this, in the administrative panel, aggregator section, select Endpoints options. There you can check which endpoints have been added before and some other options. To add other endpoints, press the button Add endpoint. The following page will be shown

image Add new endpoint page response

image Adding a new endpoint to the database

The required fields to add an endpoint are url and catalog. After the new endpoint is added in the database, the Celery workers start the harvesting process. Hhypermap Registry fetches layers from a service, generates thumbnails and index each layer metadata to the search backend. image

Now it is possible to check in the HHypermap Registry page the created service and layers.

image

Harvest services from an endpointlist

Hhypermap registry has the ability to start the harvesting process of services, giving a list of endpoints within a text file. This text file must have on each line a service endpoint. For example:

http://worldmap.harvard.edu/
http://warp.worldmap.harvard.edu/maps
http://geonode.state.gov/
http://kgs.uky.edu/
http://servicesig102.lehavre.fr/arcgi...

Now, go to the administrative panel, Endpoint list section, add endpoint list. There, it is possible to choose the file to use, select the catalog and press save. After this, the application starts harvesting layers for each service independently and adds them into the search backend.

Note: Arcgis services have the option to fetch information layers from multiple endpoints within a folder. HHypermap registry comes with the option to create layers from a folder, giving only one of the endpoints that belong to the respective folder. This is possible checking the greedy option.

Visualization

Note: the map viewer, maploom, based on Angular is not anymore supported in HHypermap Registry since version 0.3.12. We are willing to have a new map viewer based on React at some point.

It is possible to access to the map viewer using the http://localhost/_maploom/ url. In order to visualize the layers harvested by HHypermap Registry, is necessary to press the equal sign button next to Registry in the upper left corner of the image below.

image Hypermap/registry visualization of layers main page

image Maploom registry Main view

With this tool the Exchange user is able to select preview and add layers into the map (see figure below).

zbkciztqro Select a layer, watch the preview and add to map

HHypermap Registry visualization tool comes with different types of filtering:

Filter by catalog:

xktxihhlyn

Filter by text:

hiuxr72s9g

Filter by time:

pvdntyqcce

Filter by area:

yfluybilt9

Note. In the figure presented below, the maploom registry has the ability to add multiple layers to the map in a simple way. It is just necessary to select the desired layers and press the Add button.

Select multiple layers at time

gbhkcptns5

Testing

How to connect with Hypermap features

There are tree ways to connect with hypermap functionalities:

1. Registry web app

Creating layers

Service detail page.

image

Celery monitor and search backend indexing

2. Search API

This document outlines the architecture and specifications of the HHypermap Search API.

API Documentation powered by Swagger

The goal of Swagger is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined via Swagger, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interfaces have done for lower-level programming, Swagger removes the guesswork in calling the service.

Technically speaking - Swagger is a formal specification surrounded by a large ecosystem of tools, which includes everything from front-end user interfaces, low-level code libraries and commercial API management solutions.

The swagger file can be found here: hypermap/search_api/static/swagger/search_api.yaml and will be hosted while Hypermap server is up and running on here http://localhost/registry/api/docs

image

Architecture

The Search API will connect to a dedicated Search backend instance and provide read only search capabilities.

  /registry/{catalog_slug}/api/
+---------------------------------+           +----------------------------------+
|                                 |           |                                  |
|   - filter params               |           |                                  |
|   by text, geo, time            |           |                                  |
|   facets params                 |  HTTP     |                                  |
|   - text, geo heatmap,          <----------->                                  |
|   time, username                |           |     Search backend               |
|   - presentation params         |           |                                  |
|   limits, pagination,           |           |                                  |
|   ordering.                     |           |                                  |
|                                 |           |                                  |
+---------------------------------+           +----------------------------------+

Parameters documentation

As Swagger is the API documentation per se, all filter, facets, presentations parameters, data types, request and response data models, response messages, curl examples, etc, are described in the Swagger UI http://localhost/registry/api/docs as presented in this screenshot:

image

3. Embebed CSW-T

Hypermap has the ability to process CSW Harvest and Transaction requests via CSW-T

pycsw is an OGC CSW server implementation written in Python.

pycsw fully implements the OpenGIS Catalogue Service Implementation Specification (Catalogue Service for the Web). Initial development started in 2010 (more formally announced in 2011). The project is certified OGC Compliant, and is an OGC Reference Implementation. Since 2015, pycsw is an official OSGeo Project.

Please read the docs at http://docs.pycsw.org/en/2.0.0/ for more information.

How to use

The following instructions will show how to use the different requests types:

1. Insert

Insert layers from a XML file located in data/cswt_insert.xml with request=Transaction, the file contains 10 layers.

curl -v -X "POST" \
    "http://admin:admin@localhost/registry/hypermap/csw?service=CSW&request=Transaction" \
     -H "Content-Type: application/xml" \
     -f "data:@data/cswt_insert.xml"

1. Retrieve

Return the 10 layers added before with request=GetRecords

curl -X "GET" \
    "http://admin:admin@localhost/registry/hypermap/csw?service=CSW&version=2.0.2&request=GetRecords&typenames=csw:Record&elementsetname=full&resulttype=results

3. Filter layers

Query records with mode=opensearch and q= parameter, in this example one layer is named “Airport”

curl -X "GET" \
    "http://admin:admin@localhost/registry/hypermap/csw?mode=opensearch&service=CSW&version=2.0.2&request=GetRecords&elementsetname=full&typenames=csw:Record&resulttype=results&q=Airport"

4. Ensure layers are also indexed in Search backend:

curl -X "GET" \
    "http://localhost/_elastic/hypermap/_search"