General questions about spatial data services

Here we answer general questions about Lantmäteriet 's geodata services.

The services have a timeout of 60 sec. which means that you have to wait out the 'timeout time' to get an error message.

Production environment

Original database with updated geodata for the customer's use in their finished application or in their finished system.

Geodata services in this environment are normally available around the clock.

Verification environment

New functionality, changes to the information, etc. are first added to the verification environment so that users can test and adapt their application or system to the changes before entering the production environment.

The customer's testing and development may only take place against this environment.

Unplanned stops may occur.

Your agreement gives you access to both the production and verification environment for the current geodata service.

The production environment is intended for the customer's use in their finished application or system. The verification environment is only intended to be used for the development and testing of the application or system that uses the spatial data service.

To access Lantmäteriet's services, login with "basic authentication" or "Oauth2" via the API portal is required. Each 'system' must have its own user and password in order to be able to track logging of use.
When using so-called desktop clients, for example GIS software such as ArcMap or uDig, there is normally a configuration for users or redemption in the software in connection with connection to the service.
When developing our own clients for the services, we refer to documentation about the frameworks used to connect with 'basic authentication'.

Example with .NET

As an example, connection from .NET with WCF (Windows Communication Foundation) to a service with Basic Authentication via HTTPS is reported:
Define an authentication Schedule for binding in app.config or web.config in the application.

<binding name = 'addressSoap12'>
<textMessageEncoding messageVersion = 'Soap12' />
<httpsTransport maxReceivedMessageSize = '2000000' authenticationScheme = 'Basic' maxBufferSize = '2000000' />
</binding>

When the client is of the web application type, Lantmäteriet recommends a solution where the end user's browser makes service calls to Lantmäteriet's service via a so-called reverse proxy. This is to avoid that login information is sent directly from each user's browser, as previously mentioned, it is the 'system' that must log in and have users and passwords.
The reverse proxy is responsible for logging in and forwarding the calls to the service, which means that user data is not handled in the browser. There is plenty of software for this purpose, but it is also possible to develop yourself with a few lines of code in any development environment (for example Java, .NET, Php). The customer is responsible for developing or configuring this.

Picture example from FAQ General questions Geodata services

Example using Apache

Add to Apache configuration (where appropriate):

LoadModule proxy_module modules / mod_proxy.so
LoadModule proxy_http_module modules / mod_proxy_http.so

<Location / wmsproxy>
# Enter users and passwords in a Base64-encoded string according to the format 'Basic username: password'
RequestHeader set Authorization 'Basic dXNlcm5hbWU6cGFzc3dvcmQK'
</Location>

ProxyPass / wmsproxy [http://maps.lantmateriet.se/topowebbfast/wms/v1]

When a service reference is added to Visual Studio, Visual Studio itself downloads all linked schema (XSD) files contained in the WSDL document. ÅÄÖ in schedule files Visual Studio is not able to handle but instead it becomes the second character.

A simple solution is to manually download the XSD files from Lantmäteriet's schedule server, namespace.lantmateriet.se, and replace them that Visual Studio has downloaded. Then run the "Custom tool" on Reference.vb (or Reference.cs) to regenerate the classes and then ÅÄÖ will be handled correctly.

At present, open APIs, which you find under open data, have a connection with token service.

Via the API portal, you as a user of Lantmäteriet's direct access services have the opportunity to, among other things, manage authorization keys for the services you have access to.

Depending on the client/program, you can do it in different ways.

Option 1 - user: redemption @ urltilltjänsten.
Option 2 - Send the calls through a proxy server. The proxy adds users and redemption before the calls are sent to the service,

Basic login.

Oauth2 for direct access services via API portal.

Yes, all geodata services that are made available externally can be found by searching metadata on the Geodata portal (new window)

Under the heading Availability, Lantmäteriet's objectives regarding service levels are described.

Contents of this page may be automatically translated, we take no responsibility for the accuracy of the translation. Feel free to contact our customer support centre if you have any questions.

Read more about our website