User Tools

Site Tools


Menu

 ?

About

Basic concepts and guidelines

User Guides

For users

For mappers

Technical

Learn about Dokuwiki

adding_maps_to_ckan

Adding maps to CKAN

Who is this guide for

  • ODM's Mappers working with Geoserver
  • Staff maintaining the spatial information rsources

What this guide teaches

  • How to create a new map layer on Geoserver
  • How to download the different data representations of a map layer
  • How to create a dataset map on CKAN and add the downloaded representations as its resources both linking and/or uploading them.

Things to know beforehand

Resources on CKAN can be linked or downloaded

Depending on the format and size of the downloaded files from geosever, editors will have to do the decision between linking the file (providing url) or uploading it into CKAN. As a rule of thumb, file formats that will be visualized automatically by ckan ( geojson, png, pdf) should be uploaded. Big-sized would preferably be linked.

Geoserver access requires login credentials

In order to complete some of the tasks indicated in this guide, users would need to have the corresponding access credentials to the geoserver instance. If you do not know or have them, contact an administrator

Creating a new map layer on geoserver

TODO: Please, complete this section specifying instructions on how to create a new map layer on Geoserver

Let's take as example the Layer titled Provinces on http://geoserver.opendevelopmentmekong.net/geoserver/index.html.

After clicking on the Layer preview menu on the sidebar and searching for the term Provinces, a similar screen as this one will be presented.

On the right side of the table we find a dropbox box that offers the possibility to export the layers in very different formats. The formats that we would be most interested in would be:

  • OpenLayers : An embeddable html window showing a map, on-click data details and zoom controls. This resource cannot be uploeaded so it needs to be linked.
  • Geojson: JSON formatted file with spatial information. Will be visualized nativelly by CKAN and it is convenient to be uploaded as resource in order to reduce load times.
  • PNG: Image representation of the map.Will be visualized nativelly by CKAN and it is convenient to be uploaded as resource in order to reduce load times.
  • PDF: PDF document with an image of the map on a page.Will be visualized nativelly by CKAN and it is convenient to be uploaded as resource in order to reduce load times.
  • KML: XML representaiton used mostly by Google Earth. Geoserver offers 3 possibilities ( network links, simple and compressed)

To discuss: Which one would be more convenient.

  • CSV: Comma separated values representation. Will be visualized nativelly by CKAN and it is convenient to be uploaded as resource in order to reduce load times.

(Insert image for dropdown box here)

In order to download one of them, the corresponding format just needs to be selected from the dropdown box.

Obtaining the link to them implies composing the correct URL to call, which is specific for each type of format and can be composed by replacing the placeholders <GEOSERVER_URL>, <NAMESPACE>, <LAYER_NAME>, <WIDTH>, <HEIGHT> and <FORMAT> form the following URLs:

WMS Service

WFS Service

Now that we have downloaded the resources or have noted down the links, we can create a new dataset, add its resources and assign it to the Maps group.

adding_maps_to_ckan.txt · Last modified: 2020/06/23 15:04 (external edit)