• No results found

Spectrum Technology Platform. Version 9.0. Spectrum Spatial Developer Guide

N/A
N/A
Protected

Academic year: 2021

Share "Spectrum Technology Platform. Version 9.0. Spectrum Spatial Developer Guide"

Copied!
258
0
0

Loading.... (view fulltext now)

Full text

(1)

Version 9.0

(2)
(3)

Chapter 1: Introduction...9

What Is Location Intelligence?...10

What Is the Location Intelligence Module?...10

Location Intelligence Module Capabilities...10

Chapter 2: Concepts...11

Spectrum Spatial Concepts...12

Named Resources...12

Repository...12

REST...12

RIA Controls...12

SOAP...12

Stages...12

Web Services...13

Named Connections...13

Mapping Concepts...13

Maps...13

Layers...13

Tables...14

Features...14

Labels and Legends...14

Themes...15

Styles...16

Geocoding...16

Routing...16

Coordinate Systems and Projections...16

Map Tiles...17

Rasters and Grids...17

MAPINFO_MapCatalog...17

Chapter 3: Architecture...19

Architecture Overview...20

(4)

Geometry Service...24

Map Tiling Service...25

Mapping Service...25

Named Resource Service...26

Catalog Service for the Web...27

Web Feature Service...28

Web Map Service...28

Accessing Location Intelligence Module Services...28

Via Stages...29

Via Web Services...29

Chapter 5: Working with RIA Controls...33

What Are the RIA Controls?...34

Getting Started with the RIA Controls...34

Developing with the RIA Controls...35

Using the RIA Proxy...35

Installing the RIA Proxy...36

Why Use the RIA Proxy?...37

Using the RIA Proxy in your Web Application...38

Chapter 6: Working With REST Services...41

What Are the REST Services?...42

REST Interfaces...42

Mapping REST Interface...43

Methods...43

Feature REST Interface...66

Methods...66

Map Tiling REST Interface...80

Methods...80

Objects...83

Common Data Types...85

Request URL Data Types...85

Chapter 7: Understanding Tables...87

Supported Data Sources...88

Uses for Tables...88

Chapter 8: Understanding Layers...89

(5)

Named Layer...91

FeatureLayer as an Overlay ...92

Line Linkage Layer...92

LineLinkageLayer in Named Map...93

Layer With Line Linkage...94

Label Layer...95

Layer With Labels...95

Graduated Symbol Layer...97

Graduated Symbol Theme Definition...98

Graduated Symbol Theme SOAP Request...99

Bar Chart Layer...100

Bar Chart Theme Definition...100

Bar Chart Theme SOAP Request...101

Pie Chart Layer...102

Pie Chart Theme Definition...103

Pie Chart Theme SOAP Request...104

Line Chart Layer...105

Line Chart Theme Definition...106

Line Chart Theme SOAP Request...107

Grid Layer...108

Grid Example...109

Modifying the Style with a FeatureStyleModifier...111

Style Override...111

Range Theme...113

Individual Value Theme...118

Dot Density Theme...120

Chapter 9: Using Styles...123

About Styles...124

Specifying Styles...124

Defining Named Styles...125

MapBasic Styles...125

MapBasicLineStyle...126

MapBasicAreaStyle...126

MapBasicPointStyle...128

MapBasicTextStyle...131

MapBasicCompositeStyle...132

Named Styles...132

Line Styles...132

Fill Styles...136

Point Styles...143

Font Styles...145

Symbol Styles...147

Image Styles...151

(6)

Fill Pattern Codes...162

Symbol Codes...162

MapInfo 3.0 Symbol Codes...163

Chapter 10: Rasters and Grids...165

Supported Capabilities for Rasters and Grids...166

Supported Raster Formats...166

Using Rasters and Grids...167

Grid Example...167

Chapter 11: How To's...171

Mapping...172

Design Your Map...172

Use a Map Created in MapInfo Professional...173

Create a Thematic Map...179

Add a Legend to Your Map...182

Accessing Data from a Database...183

Adding or Modifying a JDBC Named Connection...183

Map Tiling...184

Configuring the Map Tile Service...184

Creating a Named Tile Definition...187

Requesting a Map Tile...193

Generating Map Tiles...193

Using Tile Caching...195

Web Service Authentication...199

Using Basic Authentication...199

WMS Configuration...203

Step 1: Create Named Tables...203

Step 2: Create Named Layer...204

Step 3: Add Layers to WMS Configuration...205

Step 4: Create Layer Tree in WMS Configuration...207

Step 5: Test the WMS Configuration...208

Custom Symbols...211

Displaying Custom Symbols...211

Chapter 12: Migrating from Envinsa or MapXtreme Java...213

Architecture Considerations...214

Migration Tasks...215

Configuration...215

(7)

When to Use REST and SOAP...222

REST Samples...222

List the Named Tiles In the Repository...222

List the Named Maps In the Repository...223

SOAP Samples...224

Find the Nearest Five Subway Stations...224

Chapter 14: Common Object Types...231

Geometry Types...232

Geometry Examples...232

MapView Types...243

MapView Examples...243

Chapter 15: MapInfo Workspace (MWS) Description...247

What Is the MapInfo Workspace?...248

Structure of a Workspace...248

Header Section...248

Connection Section...249

DataSource Definition Section...251

(8)
(9)

1

Introduction

Welcome to the Spectrum™Technology Platform Location Intelligence Module Developer Guide. This guide will help you build a web mapping application or

embed mapping in an existing application using a variety of web services, capabilities, tools and sample code.

Addressed in this guide are:

• Web Services for Mapping, Feature, Map Tiling, and Geometry. • OGC-compliant Web Services for WMS, WFS and CSW

• Capabilities for rendering maps, searching for features, getting metadata about maps and features, performing spatial calculations and more

• APIs for the above capabilities

• Step-by-procedures for common tasks: using a MapInfo Professional workspace in Spectrum™Technology Platform, creating named resources, configuring

WMS, using map tiling

• Migration information for moving an Envinsa or MapXtrene Java application to Spectrum Spatial

• Demo pages for web service SOAP/REST requests • Sample applications in JavaScript, RIA controls • Code examples in Java and .NET

• Utilities for loading workspaces, generating tiles and validating geometries Additional Spectrum™Technology Platform and Location Intelligence Module

documentation is located online atsupport.pb.com.

In this section:

What Is Location Intelligence? . . . .10

What Is the Location Intelligence Module? . . . .10

(10)

What Is Location Intelligence?

Location intelligence is:

• An awareness of relationships between location information and business analysis and operations • The ability to use the understanding of geographic relationships to predict how it impacts a business

or organization

• The capability to react to how location influences an organization by changing business processes in order to minimize risk and maximize opportunities

Location Intelligence enables a business to measure, compare and analyze its data from business operations, in conjunction with external data such as transportation networks, regulatory jurisdictions, market characteristics or its own customers.

What Is the Location Intelligence Module?

The Location Intelligence Module enables an organization to rapidly integrate location information into business applications and processes. This enables organizations to create and embed maps, understand spatial relationships, and carry out spatial calculations. The Location Intelligence Module provides support for standards-based geospatial information sharing through support for certifiedOGCweb services. The Location Intelligence Module provides support for integration at three levels:

• Web application development - Rapid application development user interface components and JavaScript API

• Web service integration - Support for SOAP, REST and certifiedOGCweb services (WMS, WFS, CSW)

• Data integration - Batch and transactional integration of spatial data sources

The Location Intelligence Module is part of the Spectrum Spatial solution encompassing: • Location Intelligence Module

• Enterprise Geocoding Module • Enterprise Routing Module

Location Intelligence Module Capabilities

The Location Intelligence Module offers the following capabilities: • Map-based data visualization and analysis

• Feature querying and searching

• Geometry operations including measurements (area, perimeter, length), predicates (within, contains, intersects), geometry manipulation (union, buffer, intersection) and coordinate transformation Some of the things these capabilities enable you to do are:

• Determine which sites are nearest to a given location • Determine whether or not a location resides in a given area

• Query a spatial database using spatial functions as well as standard SQL functions

• Perform a variety of calculations on spatial data, such as determining the area of a polygon, determining the distance between two points, or measuring the perimeter of an area

(11)

2

Concepts

Before you start developing with Spectrum Spatial, it's helpful to understand both Spectrum Spatial concepts, as well as basic mapping concepts and how these concepts are implemented in Spectrum™Technology Platform. This chapter

discusses the common concepts you will come across as you learn Spectrum™

Technology Platform.

In this section:

Spectrum Spatial Concepts . . . .12

Mapping Concepts . . . .13

(12)

Spectrum Spatial Concepts

This section presents concepts of which you will need an understanding as you develop your applications with Spectrum™Technology Platform.

Named Resources

A resource can be a table, layer, map, tile, or style. In the Spectrum™Technology Platform, a named

resource is data to which a name has been given. This allows the resource to referred by its name and not its properties. Named resources must be stored in a central database called a repository.

For more information, see the Resources and Data section in the Spectrum™Technology Platform Spectrum Spatial Guide onsupport.pb.com.

Repository

The repository is a central document database that stores Named Resource definitions.

For more information, see the Resources and Data section in the Spectrum™Technology Platform Spectrum Spatial Guide onsupport.pb.com.

REST

Representational State Transfer (REST) is an architectural style that revolves around resources and the actions (analogous to verbs) that one can take with them. The "verbs" are provided by HTTP (for example, GET, PUT, or DELETE). In REST, resources can have one or more representation, typically HTML, JSON and image types. REST services are usually used from within a web application in a browser (for example, RIA or web controls).

RIA Controls

The RIA (Rich Internet Application) controls provide a set of browser-based user interface components for easily embedding maps and other location-based capabilities in web pages. The RIA controls can be used in a wide range of scenarios, from simply embedding maps in your web site to show locations, to creating rich web applications. Built entirely in JavaScript, the controls work without the need for any browser plug-ins and without having to write any server-side code. The RIA controls use Web 2.0 techniques to provide functionality such as seamless map panning and the ability to search and display information without requiring a web page refresh.

For more information, seeWhat Are the RIA Controls?on page 34.

SOAP

SOAP is short for Simple Object Access Protocol. A SOAP request message must be in the XML format that is defined by the SOAP specification.

Stages

To access Location Intelligence Module services via stages, you build and run a dataflow in Enterprise Designer that includes one of more Location Intelligence Module stages. Stages use a direct socket-based method to communicate with the corresponding Location Intelligence Module services.

(13)

Web Services

The Location Intelligence Module services are exposed as web services (interfaces for a service oriented architecture (SOA), in which Web-based applications dynamically interact with other Web applications using open standards such as SOAP or REST). To access Location Intelligence Module services via the web services, you construct an HTTP request and submit it directly to the web service. The HTTP request can be in the form of a SOAP request, a REST request, or a POST/GET request, and can be submitted directly from a web browser or from a client application.

Named Connections

A named connection describes the connection information to access a data source, such as a .TAB file or table in a remote database management system. It contains a name so that the connection can be referenced from a wide variety of places.

A named connection is not to be confused with named resources that are stored in the Spectrum™

Technology Platform repository. Named connections are created in the Management Console.

Mapping Concepts

Before you create a mapping application, it's helpful to understand basic mapping concepts and how these concepts are implemented in Spectrum™Technology Platform. This chapter discusses the common

concepts you will come across as you learn Spectrum™Technology Platform.

Maps

A map displays the spatial relationship among map features, such as town boundaries, customer locations, or power lines. The map visually orients you to where those features are and what they represent. In addition to features, elements on the map can include labels, titles, legends, and themes. Themes are created based on some action taken involving the features and information on the map.

Layers

Maps are made up of layers. Layers contain the rules that define how features are drawn on the map. The bottommost layer is drawn first and the topmost layer drawn last. Layers containing features that would obscure the features of other layers should be placed lower, respectively. For example, a layer of boundary regions should be placed beneath a layer of points.

(14)

Layers in Spectrum™Technology Platform can represent more than features. Layers can be raster or

grid images, seamless maps (joined maps), contain labels or user-drawn features, or contain a theme, such as a pie or bar chart.

To change how the layer is displayed, use astyle overrideortheme.

To learn about the types of layers that Spectrum™Technology Platform supports, see the Resources

and Data section in the Spectrum™Technology Platform Spectrum Spatial Guide onsupport.pb.com.

Tables

Tables are collections of features from a data source. Tables hold rows and columns of information that describe the features, including their geometry, style, and attributes.

Features

A feature is a row in a table. Features are defined by their data source, ID, style, attributes, and in the case of spatial features, geometry. Features are displayed on a map as a Feature Layer.

Searching features for additional information is one of the main uses of digital maps. In Spectrum™

Technology Platform features are returned in FeatureCollections as the result of a query.

Labels and Legends

Maps need text such as labels and legends to deliver the message of the map.

Labels describe the data in the feature table. They can be customized in many ways, including their visibility, position, style, and content. Themes that change the style and content can be applied to label layers. Use MI SQL expressions to generate custom label strings and rules.

Legends are cartographic elements that describe the features in a coded manner. For example, the legend may describe the boundaries as school districts, the lines as a power line network, or points as corporate office locations. Legends also contain a title to describe collectively what the map represents. Legends in Spectrum™Technology Platform are generated on the fly when a map is requested, and

(15)

Themes

Themes are the mechanism by which you can change the display of a map. This can be as simple as overriding the current style of the features or more complex to show information from the underlying data in a visual way.

The main purpose of a thematic map is to graphically communicate a particular type of data that is associated with the map, such as population levels or temperature ranges. The particular type of data forms the theme of the map, and the theme can represent the data using shades of color, fill patterns, symbols, bar charts, and pie charts.

For example, a ranged theme shows color blocks where each color represents features on the map that meet the same criteria. A graduated symbol theme is useful for showing distributions of populations for example, with the largest symbol representing the largest population.

Themes can also be created for labels. For example, use a ranged label theme to show the relative population size among cities. The largest labels represent the cities with the largest populations.

(16)

Styles

Styles enable you to control the visual appearance of map features, labels, themes and legends. Each feature has a default style. To change the style, apply an override theme.

In Spectrum™Technology Platform the support for sparse styles allows you to change only the properties

you want and merge styles together to form a single style.

Geocoding

Geocoding is the process of determining the latitude/longitude coordinates of an address. A typical use of geocoded addresses is to display the data on a map and analyze the relationships among the data from a spatial point of view.

Any custom data that contains locational information, such as street address or postal code, can be geocoded. The process involves matching it against already geocoded records covering the same location. If an address match is made, the coordinates from the geocoded record are assigned to the custom record.

Routing

Another component available to developers of Spectrum™Technology Platform is routing. Driving

direction applications and those involved in planning routes for deliveries or laying cable, for example, utilize routing. Typically the goal is to locate the route by shortest distance or shortest travel time.

Coordinate Systems and Projections

Coordinate systems and projections are two important mapping concepts about which you should have a basic understanding. Projection refers to how a map is displayed on a flat surface such as a paper map or computer screen, while a coordinate system describes how map features are spatially arranged. Both are important considerations when developing applications, especially those where spatial precision and accuracy are important.

A projection is a method of reducing the distortion that occurs when objects from a spherical surface are displayed on a flat surface. There are two main trade-offs to be considered: the preservation of equal area, and the preservation of the true shape of a feature. There are many different types of projections, each designed to reduce the amount of distortion for a given area. Some projections preserve shape; others preserve accuracy of area, distance, or direction.

(17)

A coordinate system is a set of parameters that tells you how to interpret the locational coordinates for objects. One of those parameters is projection. Coordinates can be of two types: Spherical or Cartesian. Spherical relates to locations on the curved surface of the Earth, while Cartesian describes flat surface locations in two dimensions. Both are represented by x and y coordinates. The difference comes when calculating distance or area of features that represent real Earth locations such as streets or rivers (Spherical), or relative locations, such as a map of brain anatomy or a chess board (Cartesian). Knowing which coordinate system your map uses is an important consideration when developing applications. Analytical operations involving distance and area calculations, such as buffering, routing, and querying, use the coordinate system and projection to yield the correct results.

Map Tiles

Map tiles are portions of a map that are seamlessly joined on the fly while you are panning and zooming in the map window. Each pan and zoom is a call to the server to request the appropriate map tile(s). Only those that fit the bounds of the map view and match the zoom level are returned. Google Maps and Bing Maps are examples of applications that use map tiles.

Map tiles are created by dividing a map into levels that represents specific zoom levels. Level 0 is the entire map, Level 1 is one level zoomed out from the entire map and divided evenly into four tiles. Level 2 contains 16 tiles, which are the four tiles from Level 1 divided evenly. Level 3 are the 16 Level 2 tiles subdivided into 64 tiles. Levels 0-3 of a world map typically show global levels detail, while higher levels, are zoomed in to show street-level detail. Actual zoom levels are dependent on the bounds of the named map.

At very high levels (16 and above), the number of tiles is huge. For faster retrieval, you can pre-render the tiles if you know the map layers will not change. Or for more dynamic map tiles, you can cache them and provide an expiration date so that new tiles are generated when necessary.

Rasters and Grids

Raster and grid images are special kinds of layers. These are image files plus a registration point TAB file that allows the image to be rendered as a map layer. You can create a registration point file in MapInfo Professional.

A raster is typically a background layer used for reference: aerial photo, topo map, custom graphics. In Spectrum™Technology Platform, user-controlled properties of raster images include brightness, contrast,

opacity, grayscale and transparency.

A grid is an overlay layer that shows a continuous gradation of color to represent interpolated values from the underlying data. In Spectrum™Technology Platform user-controlled properties of a grid include

brightness, contrast, opacity, grayscale, transparency, and an inflection collection (how the colors are defined and spread).

SeeSupported Raster Formatson page 166 for further information.

MAPINFO_MapCatalog

A MAPINFO_MapCatalog is a server table that stores information about the location of spatial columns in a database management system. Each table in the database is represented as a row in the MapCatalog. Spectrum™Technology Platform does not require the use of a MapCatalog, but other MapInfo-based

products do. If there is no MapCatalog for the database, Spectrum™Technology Platform derives the

(18)
(19)

3

Architecture

This section describes the architecture of the Spectrum™Technology Platform

Location Intelligence Module. It provides an overview as well as an evolution of the basic architecture to an extended, more scaled-up version.

In this section:

Architecture Overview . . . .20

Architecture: Basic and Scaled Diagrams . . . .21

(20)

Architecture Overview

The following diagram shows an overview of the fundamental architecture of Spectrum™Technology

Platform Location Intelligence Module, prior to any development, extension, or scaling.

The architecture consists of the following components:

Repository

The foundation of the Spectrum™Technology Platform Location Intelligence Module is the repository.

It contains named resources such as named styles, named tables, named maps, named layers, and named configurations. See the Resources and Data section in the Spectrum™Technology Platform Spectrum Spatial Guide onsupport.pb.com.

Core Services

The core services that Location Intelligence Module provides are Mapping, Feature, and Geometry services. SeeLearning More About the Web Servicesfor more information on these core services.

OGC Services

(21)

Catalog Service for the Web (CSW)

Web Map Service (WMS)

Web Feature Service (WFS)

Map Tiling

The Map Tiling Service returns map tiles on the fly or from a tile cache at the user's request. SeeMap Tiling Servicefor more information on this service.

Named Resource

You can use the Named Resource Service to manage almost any type of named resource in the repository. See the Services section in the Spectrum™Technology Platform Spectrum Spatial Guide on

support.pb.com.

Architecture: Basic and Scaled Diagrams

The diagram below shows an example of the default, initial architecture of Spectrum™Technology

Platform Location Intelligence Module, where there is a single server on which Spectrum Spatial is installed. Everything, including the repository, image files, and tile cache on a single box in the same location as where the product is installed.

To scale Spectrum Spatial from one to three servers, each server leverages a single shared database server and image server to maximize efficiency and to avoid situations where an image or database resource is unavailable to one of the Spectrum Spatial servers. The file image server stores all images between multiple versions of Spectrum Spatial. All instances of Spectrum Spatial store images in a single location

(22)

For load balancing information, see the Adminstration section in the Spectrum™Technology Platform Spectrum Spatial Guide onsupport.pb.com.

(23)

4

Working With Spatial

Services

This chapter describes the spatial services, and how you can access the various spatial services. This section also shows you how to start using the spatial services in your applications.

In this section:

Learning More About the Web Services . . . .24

Accessing Location Intelligence Module Services . . . . .28

(24)

Learning More About the Web Services

This section provides a brief overview of each of the Location Intelligence Module web services.

Feature Service

Description

The Feature Service provides the ability to search spatial databases. It provides a set of common operations that you can use to query content, regardless of the underlying data provider. The advantage of this is that you can run the exact same operation against many different content stores (such as a native TAB file, an Oracle database table, or a SQL Server database table) by specifying different named tables; the same query will work on each table type.

The Feature Service provides operations that: • list all tables in the catalog

• describe specific tables in the catalog • search within a distance

• search intersects • search within a polygon • search for the nearest feature

• search using a custom MapInfo SQL query

Service URLs

The URL endpoint for the REST implementation of the Feature Service has the following general form: http://hostname[:portnumber]/rest/Spatial/FeatureService

The URL endpoint for the SOAP implementation of the Feature Service has the following general form: http://hostname[:portnumber]/soap/FeatureService

The URL for the Feature Service WSDL document has the following general form: http://hostname[:portnumber]/soap/FeatureService?wsdl The URL for the Feature Service demo page has the following general form:

http://hostname[:portnumber]/Spatial/FeatureService/DemoPage.html

Documentation

Geometry Service

Description

The Geometry Service provides a simplified interface to perform Geometry Service measurements, conversions, and operations. The Geometry Service provides four different types of capabilities: • Aggregate (buffer, centroid, envelope, union, intersection, convex hull, difference, symdifference) • Transformation (coordinate transformations)

(25)

• Measurement (area, distance, length, perimeter) • Predicate (contains, intersects, within)

This service provides a set of common operations that you can use to perform operations on content, regardless of the data provider. One advantage is that you can run the exact same operation against many different content repositories (e.g., a native TAB file, an Oracle table, or a SQL Server table) by specifying different named tables; the same operation will work on each table type. Using the Geometry Service, you only need to worry about the request, not the location or type of data in the repository. The Geometry Service is based on the well known mathematical concepts described in the OGC Simple Features Specification.

Service URLs

The URL endpoint for the Geometry Service has the following general form: http://hostname[:portnumber]/soap/GeometryService

The URL for the Geometry Service WSDL document has the following general form: http://hostname[:portnumber]/soap/GeometryService?wsdl The URL for the Geometry Service demo page has the following general form:

http://hostname[:portnumber]/Spatial/GeometryService/DemoPage.html

Map Tiling Service

Description

The Map Tiling Service dynamically generates subsets of a map on a per-request basis. This subset is called a tile. The tiles generated from the Map Tiling Service can be used individually, or combined to form larger maps, in applications for seamless map interaction. This service provides fast, simple, light-weight map rendering where more complex map rendering can be performed using the Mapping Service.

The Map Tiling Service allows the hosting of multiple maps that can be used to generate the tiles. These named maps are located in one or more map repositories. Each map hosted by the Map Tiling Service can have a specific configuration that defines how the map will be used to create tiles.

The built-in pluggable caching mechanism is an important feature of the Map Tiling Service. When this caching is turned on, tiles are stored so serving of tiles to the client is both faster and less resource intensive. This also allows the pregeneration of tiles and pointing the Map Tiling Service to this cache.

Service URLs

The URL endpoint for the Map Tiling Service has the following general form: http://hostname[:portnumber]/rest/Spatial/MapTilingService

Mapping Service

Description

The Mapping Service provides a simplified interface to perform Mapping Service rendering, themes, overlays, and conversions. The Mapping Service provides both simple operations that are more frequently used, or more complex operations that require higher levels of customization.

(26)

• list and get all maps, layers, styles, or tables in the repository

• conversion methods between real world coordinates, XY, and screen coordinates • screen calculations such as length

• navigation methods such as zoom, and pan • render maps and layers

• overlay, override, and theme maps

• customize your map with legends, watermarks, and other adornments.

In the past, mapping required the use of many map layers and map definitions to access data. With the addition of the table model and repository, data access and mapping is independent. The tables define the data access, and the repository takes care of the table management. Therefore, with the Mapping Service, you are able to render maps and perform mapping operations without the worry of where the data is located.

Service URLs

The URL endpoint for the REST implementation of the Mapping Service has the following general form: http://hostname[:portnumber]/rest/Spatial/MappingService

The URL endpoint for the SOAP implementation of the Mapping Service has the following general form: http://hostname[:portnumber]/soap/MappingService

The URL for the Mapping Service WSDL document has the following general form: http://hostname[:portnumber]/soap/MappingService?wsdl The URL for the Mapping Service demo page has the following general form:

http://hostname[:portnumber]/Spatial/MappingService/DemoPage.html

Documentation

Named Resource Service

Description

The Named Resource Service provides the ability to work with resources in the repository. It provides a set of common operations that you can use to add, list, update, delete, and search resources in the repository. The advantage of this is that you can administer the repositories resources at the service level, with a simple SOAP API that allows you to manage your content.

The Named Resource Service provides operations that: • list all resources (or a subset) in the repository • add a resource to the repository

• modify a resource that exists in the repository • delete a resource from the repository

• read a resource from the repository to return the definition • search for resources in the repository

(27)

Service URLs

The URL endpoint for the Named Resource Service has the following general form: http://hostname[:portnumber]/soap/NamedResourceService

The URL for the Named Resource Service WSDL document has the following general form: http://hostname[:portnumber]/soap/NamedResourceService?wsdl

The URL for the Named Resource Service demo page has the following general form:

http://hostname[:portnumber]/Spatial/NamedResourceService/DemoPage.html

Catalog Service for the Web

Description

The Catalog Service for the Web (CSW) provides the ability to search, retrieve, and update collections of descriptive information (metadata) about geospatial data, services, and related resources. Catalogs are used to register metadata that conform to a specific information model or standard. You then have the ability to search for geospatial data and services in very efficient ways.

The CSW provides operations that: • describe the service capabilities

• describe the information models (schema) supported by the catalog • search within the catalog

• get records based on a particular ID • insert, update, or delete catalog entries • batch retrieval and conversion of metadata

The Catalog Service for the Web is anOGC-compliant web service.

Service URLs

The URL endpoint for the POST/GET implementation of the Catalog Service for the Web has the following general form:

http://hostname[:portnumber]/rest/Spatial/CSW

The URL endpoint for the SOAP implementation of the Catalog Service for the Web has the following general form:

http://hostname[:portnumber]/soap/CSWService

The URL for the Catalog Service for the Web WSDL document has the following general form: http://hostname[:portnumber]/soap/CSWService?wsdl

The URL for the Catalog Service for the Web demo page has the following general form: http://hostname[:portnumber]/Spatial/CSWService/DemoPage.html

(28)

Web Feature Service

Description

The Web Feature Service is used for searching, obtaining metadata descriptions, querying, and filtering spatial data (feature types) at the service level. The XML interface and syntax follow the WFS 1.0.0 OGC specification. Both SOAP and HTTP POST/GET requests are supported. As a result, a standard compliant WFS client, such as MapInfo Professional, can access data by submitting an XML request through HTTP to display it on a map or to get vector geometries for calculations.

Use the Web Feature Service to help perform a search for features within a given distance from a point (or other type of geometry). For example, a real estate application determines a realistic value for a home by comparing the distance of it to numerous features, including railroad tracks, highways, shopping malls, and police stations. This application would call WFS to select a highway feature and a home (a point). The application would then calculate distance values for proprietary rating calculations. The Web Feature Service is anOGC-compliant web service.

Service URLs

The URL endpoint for the Web Feature Service has the following general form: http://hostname[:portnumber]/rest/Spatial/WFS

Web Map Service

Description

The Web Map Service (WMS) allows software clients to reference map images over the Internet or a private intranet. The WMS implementation is based on the WMS 1.1.1 and 1.3.0 OGC specification. Using HTTP requests, the WMS provides georeferenced data to a client that displays this data as an image. Georeferenced data is information associated with maps that describe the real world extents of specific features and the projection upon which it is based.

The images can be provided as GIF, JPEG, PNG, and other image formats. The Web Map Service is anOGC-compliant web service.

Service URLs

The URL endpoint for the Web Map Service has the following general form: http://hostname[:portnumber]/rest/Spatial/WMS

Accessing Location Intelligence Module Services

There are two distinct ways to access the services provided by the Location Intelligence Module. The first way is to construct a dataflow in Enterprise Designer that includes one or more Location Intelligence Module stages.

The second way is to submit an HTTP request directly to a Location Intelligence Module web service, from either a web browser or from a client application.

(29)

Via Stages

To access Location Intelligence Module services via stages, you build and run a dataflow in Enterprise Designer that includes one of more Location Intelligence Module stages. The stages use a direct socket-based method to communicate with the corresponding Location Intelligence Module services. The following Location Intelligence Module stages are available in the Enterprise Designer:

• Closest Site – Determines which sites are closest to a given location.

• Find Nearest – Locates the points of interest (POI) that are nearest to a given location. • Point In Polygon – Determines whether or not a location resides in a given area.

• Query Spatial Data – Allows you to query a spatial database using spatial functions as well as standard SQL functions.

• Read Spatial Data – Allows you to access spatial data in a variety of commonly-used spatial data formats.

• Spatial Calculator – Performs a variety of calculations on spatial data, such as determining the area of a polygon, determining the distance between two points, or measuring the perimeter of an area, among other functions.

• Spatial Union – Returns a geometry object which represents the union of two input geometry objects. • Write Spatial Data – Allows you to insert data into a named table as output of a job.

For more information about these stages, see the the Stages section in the Spectrum™Technology

Platform Spectrum Spatial Guide onsupport.pb.com.

Via Web Services

To access Location Intelligence Module services via the web services, you construct an HTTP request and submit it directly to the web service. The HTTP request can be in the form of a SOAP request, a REST request, or a POST/GET request, and can be submitted directly from a web browser or from a client application.

The Location Intelligence Module services are exposed as the following web services: • Feature Service – Provides the ability to search spatial databases.

• Geometry Service – Provides a simplified interface to perform Geometry Service measurements, conversions, and operations.

• Map Tiling Service – Generates map tiles that can be combined to form larger map images. • Mapping Service – Provides a simplified interface to perform Mapping Service rendering, themes,

overlays, and conversions.

• Named Resource Service – Provides the ability to work with resources in the Location Intelligence Module repository.

• Catalog Service for the Web*– Enables an application to publish and search collections of descriptive information (metadata) for data, services, and related information.

• Web Feature Service*– Used for searching, obtaining metadata descriptions, querying, and filtering spatial data (feature types) at the service level.

• Web Map Service*– Enables software clients to reference map images over the Internet or a private intranet.

For more information about each of the web services listed above, seeLearning More About the Web Serviceson page 24.

Request Types

Depending on the web service, you can submit an HTTP request to a Location Intelligence Module web service in one of the following forms:

• a SOAP request • a REST request • a POST/GET request

(30)

that is defined by the SOAP specification.

REST is short for Representational State Transfer. A REST request message is contained in the query string parameters of an HTTP request.

A POST/GET request message can be structured either as query string parameters submitted via HTTP GET, or as an XML-formatted message submitted via HTTP POST. The XML-formatted message is identical to a regular SOAP request, but with the SOAP XML wrapper removed.

Many of the web services can accept requests in more than one form. For example, the Feature Service can accept either a SOAP request or a REST request. Some services, however, can accept a request in only one form. For example, the Map Tiling Service can accept only a REST request, and the Web Map Service can accept only a POST/GET request.

The following table lists the types of request that each web service can accept.

POST/GET REST SOAP Web Service Feature Geometry Map Tiling Mapping Named Resource

Catalog Service for the Web * Web Feature*

Web Map*

Web Service Documentation

To see the documentation for each Location Intelligence Module web service, refer to the the Services section in the Spectrum™Technology Platform Spectrum Spatial Guide onsupport.pb.com.

Using a Client Application

This section describes the steps required to create a client application (such as a Java client) that accesses the Location Intelligence Module web services using SOAP requests.

About Stub Code

To create a client application that can invoke the Location Intelligence Module web services, you use a tool to generate the stub code for the application. The tool generates the stub code from the web service operations described in a service's Web Services Description Language (WSDL) document. Once the stub code has been generated, its methods provide a proxy for the web service operations.

WSDL URLs

To generate the stub code for your client application, you need to tell your stub code generator where to find the web service's WSDL document. The URLs for the WSDL documents will vary from installation to installation, but all installations have the following basic patterns:

• http://on.premise.domain/soap/MappingService?wsdl • http://on.premise.domain/soap/FeatureService?wsdl • http://on.premise.domain/soap/GeometryService?wsdl • http://on.premise.domain/soap/NamedResourceService?wsdl • http://on.premise.domain/soap/CSWService?wsdl

(31)

Generating Stub Code for a Java Client

Use the following steps to generate the stub code for a Java web services client application, using the wsimporttool that is included with the Java Development Kit.

1. Open an xterm or command prompt window and change to the directory that contains the wsimport

program, usually JDK_install_dir/bin/.

2. At the command prompt, type wsimport -s source_dir -d classes_dir URL_TO_WSDL

and press Enter.

For example, to generate stub classes for the SAAS version of the Named Resource Service, you might enter the following command:

wsimport -s output/source -d output/classes

http://dev.pb.com/NamedResourceService/services/NamedResourceService?wsdl After the command has been executed, the generated source .java files are placed within the directory you specified with the -s option, and the compiled .class files are placed within the directory you specified with the -d option.

Adding a Web Reference in Eclipse

To develop Java programs that consume Location Intelligence Module web services in Eclipse, you first create a reference to the web service in your Java project. When the reference is created, the client-side stub code required to use the web service is generated.

1. Start Eclipse.

2. On the File menu, select New > Project.

The New Project wizard opens.

3. In the New Project wizard, select Java > Java Project.

Click Next.

4. In the Project Name field, enter the name you want to give your project.

Click Finish to close the wizard.

The new project folder appears in the Package Explorer.

5. In the Package Explorer, right-click on the project folder you created in the previous step. On the

pop-up menu, select New > Other. The New wizard opens.

6. In the New wizard, select Web Services > Web Service Client.

Click Next.

7. In the Service Definition field, enter theURL to the web service's WSDL document. Select Develop Client on the slider bar.

Click Finish to close the wizard.

The stub code for the web service is generated in the project folder.

Adding a Web Reference in Visual Studio

Before you can use web reference facilities in your C# program code, you must first add the web reference to your Visual Studio project.

Use the following steps to add a web reference to any of the Location Intelligence Module web services.

1. Start Visual Studio.

(32)

3. In the New Project dialog box, enter the desired settings, then click OK.

4. In the Solution Explorer pane, right-click on References. On the pop-up menu, select Add Web Reference.

The Add Web Reference dialog box opens.

5. In the Add Web Reference dialog box, enter theURL to the web service's WSDL document. After you have entered the URL, click the Go button. Documentation for the web service then appears under the URL field.

6. In the Add Web Reference dialog box, note the web reference name provided in the Web Reference Name field, then click the Add Reference button.

The web reference is added to the project.

After you have completed these steps, you can see the new web reference in the Solution Explorer pane.

Using a Browser-based Application

You can create powerful mapping applications that run entirely in a web browser, using the RIA controls installed with Spectrum™Technology Platform. SeeWorking with RIA Controlson page 33 for a

(33)

5

Working with RIA Controls

You can create powerful mapping applications that run entirely in a web browser, using the RIA controls installed with Spectrum™Technology Platform. This section

describes what the RIA controls are, and how to get started using the RIA controls in your web applications.

In this section:

What Are the RIA Controls? . . . .34

Getting Started with the RIA Controls . . . .34

Developing with the RIA Controls . . . .35

Using the RIA Proxy . . . .35

(34)

What Are the RIA Controls?

The RIA (Rich Internet Application) controls provide a set of browser-based user interface components for easily embedding maps and other location-based capabilities in web pages. A JavaScript API is also provided which, together with the user interface components, enable you to create custom browser-based mapping applications.

The RIA controls can be used in a wide range of scenarios, from simply embedding maps in your web site to show locations, to creating rich web applications. Built entirely in JavaScript, the controls work without the need for any browser plug-ins and without having to write any server-side code. The RIA controls use Web 2.0 techniques to provide functionality such as seamless map panning and the ability to search and display information without requiring a web page refresh.

The following controls are available:

Description Control

A user interface control containing descriptive information about features appearing on a map. It also provides the means to show and hide individual overlays on a map.

LegendControl

A non-user interface control, that lets developers write Javascript code to call the FeatureService REST API. This control can be FeatureService

used to query tables for features. Search results are returned as GeoJSON FeatureCollections. The search call is performed asynchronously.

A non-user interface control, that lets developers make

FeatureService REST calls against multiple tables simultaneously. MultiTableFeatureService

This is a convenience class, allowing a feature search on multiple tables which is useful when a feature search is triggered by interactions with a map, that typically display the features of multiple tables stacked on top of each other. For example, a SearchNearest against TABLE1 and TABLE2 at a given point (x,y).

An easy way to display either a MappingService NamedMap or a TileService map tile on an OpenLayers map.

OpenLayers layer types

Template formatting controls for developers to display JSON data in an OpenLayers popup (for example) but intelligently styled. For Generic data formatting

example, a Table name underlined, field names in italics, and field values in bold.

REST-ful service control for developers to send cross-domain calls to the REST services. These calls will be performed as

asynchronous XMLHttpRequest calls. REST Services

Getting Started with the RIA Controls

The RIA controls are installed with Spectrum™Technology Platform. To get started using these controls,

you are provided with the following:

• Java Servlet Proxy download located athttp://localhost:8080/ria-examples/riaproxy/riaproxy.war

• IIS (.NET) Proxy download located athttp://localhost:8080/ria-examples/riaproxy/riaProxy.zip

• Controls JavaScript hosted athttp://localhost:8080/ria/ria.js

• JavaScript API Documentation hosted athttp://localhost:8080/ria/api/. • RIA example application hosted athttp://localhost:8080/ria-examples/.

(35)

Using these resources and the instructions provided in this guide, you will be able to get the RIA proxy installed in your environment, run the example RIA controls, and start developing your own

RIA-control-based application.

To use the RIA controls with Bing Maps, including using the examples, you will need a Bing Maps key. To register, go to theBing Maps Account Center.

Note:

Developing with the RIA Controls

To develop with the RIA controls on your own machine or to place applications developed with RIA controls on another server, you will need to install the RIA proxy. The following link from Yahoo provides background information on why proxy pages are needed:

http://developer.yahoo.com/javascript/howto-proxy.html

The RIA proxy is required to start working with the RIA controls. Simply reference the relevant JavaScript file hosted by Spectrum™Technology Platform in your html pages, and the browser takes care of the

rest. To get started developing an RIA-control-based application:

1. Install a web application server (for example, Tomcat) on your machine.

2. Create a new service folder in your webapps (or equivalent) directory of your newly installed

application server for your application (for example, a folder called "myapp" located in C:\apache-tomcat-7.0.39\webapps).

3. Download the riaproxy.war file from SpectrumTechnology Platform and copy it to your webapps

(or equivalent) directory to install it.

For information on how to download and install the RIA proxy, and on why you must use the proxy, seeUsing the RIA Proxyon page 35. For information on how to use the RIA proxy with your web application, seeUsing the RIA Proxy in your Web Applicationon page 38.

4. Restart your application server.

5. Create your application pages in the service folder that you created in the webapps (or equivalent)

directory, using the functionality of the Spectrum™Technology Platform JavaScript API.

You can use the RIA examples that ship with Spectrum™Technology Platform as a starting point

for your application. View the page source of the examples here:http://localhost:8080/ria-examples/. a) Save the source to the myapp folder you created above.

For example, to include searchNearest in your application, right-click in the Search Nearest content frame to display the source.

b) Rename the .jsp file to index.htm.

c) Edit proxy.properties to contain the following:

trusted.base.url=https://<yourspectrumspatialserverhost_port> auth.type=basic

anonymous_username=guest

d) Restart Tomcat and browse to your application at http://localhost:8080/myapp

Using the RIA Proxy

Several RIA controls depend on a server side component to be fully functional. For example, the FeatureService calls a server in order to query spatial data that isn't directly available in the browser. However, due to security restrictions that are put in place by all modern browsers, it is not possible to call any arbitrary server on the web.

The RIA controls require a proxy in order to work around those security restrictions. The following sections describe why this is necessary and how a proxy can be used for your own application development.

(36)

Installing the RIA Proxy

Spectrum™Technology Platform ships with two proxy implementations, one for Java Servlet containers

(2.4 and higher) and one for IIS. Decide which proxy to install, then verify the installation was successful.

Java Servlet Proxy

To install the Java Servlet proxy:

1. Download the proxy binary from your SpectrumTechnology Platform installation at:

http://localhost:8080/ria-examples/riaproxy/riaproxy.war.

2. Deploy the WAR file to a web application server of your choice. Refer to the documentation of the

application server for details on deploying WAR files. If you are using Apache Tomcat, this involves copying the WAR file into the %CATALINA_HOME%\webapps directory. As long as automatic application deployment is enabled and you keep the WAR file name intact, the proxy will be made available under the default context path of riaproxy.

If you decide to deploy the proxy under a different context path, be sure to provide the correct value when following the step to define the path to the proxy in your web application. This step is defined in the section:Define the Path to your Proxyon page 38

Note:

3. Once the proxy has been installed, set a trusted base URL. URLs that do not start with this value

will not be relayed by the proxy. This is necessary to prevent the proxy from being abused to request resources from other domains than the one required by the RIA controls. To configure this:

a. Open the proxy.properties file located within the ..\riaproxy\WEB-INF folder (for example,

C:\apache-tomcat-7.0.39\webapps\riaproxy\WEB-INF).

b. Set the value of the trusted.base.url property to http://servername, where servername is a

placeholder for the hostname RIA is installed on; for example, trusted.base.url=http://localhost:8080.

c. Restart the proxy application.

4. To enable HTTP Basic Authentication, set the following properties in the proxy.properties file, replacing

username and password with the actual login credentials to be used by the proxy:

a. auth.type=basic

b. anonymous_username=username c. anonymous_password=password

This performs HTTP basic authentication against the RIA server-side component on behalf of but transparent to the client. Requests by the client to the proxy are not protected and

Note:

additional steps have to be taken if that is necessary. Refer to the documentation of your application server for further details.

IIS Proxy

The IIS proxy requires IIS6 or IIS7. If IIS7 is installed, it is also necessary to install the IIS6 Compatibility Components. A description of how to install these components can be found here:

http://technet.microsoft.com/en-us/library/bb397374(v=exchg.80).aspx. To install the IIS proxy:

1. Download the proxy binary from your SpectrumTechnology Platform installation at:

http://localhost:8080/ria-examples/riaproxy/riaProxy.zip.

2. Unzip the file and run setup.exe to install the proxy into IIS. You can deploy it to a web application

server of your choice. Refer to the documentation of the application server for details on deploying WAR files.

The configuration of the IIS proxy is equivalent to the Java Servlet proxy, in that you need to configure the base URL and authentication. The only difference is the configuration file is

(37)

located at …\ProxyService\Web.config. The Web.config file is an XML file and configuration properties are set with <add> elements nested inside the <appSettings> element of the file; for example, <add key=”trusted.base.url” value=http://localhost:8080/>.

Verification

Once you have installed the proxy and set it to forward the requests to the RIA application, you can test it by accessing the RIA JavaScript file, ria.js directly and through the proxy. Suppose RIA is installed on 'myserver' on port 8070 and the proxy is installed on the localhost using the default name of riaproxy on default port 80, the two URLs are as shown below:

• http://myserver:8070/ria/ria.js

• http://localhost/riaproxy/proxy.aspx?url=http%3A%2F%2Fmyserver%3A8070%2Fria%2Fria.js Compare the pages loaded by the two URLs and make sure they are same.

Why Use the RIA Proxy?

The same-origin policy is a security restriction on what web content JavaScript code can interact with. Essentially, it dictates that a running script can only interact with data coming from the same origin as the server hosting the page or application upon which the code is running. This is especially important for applications using AJAX (Asynchronous JavaScript and XML) techniques like RIA controls as it means that our requests may only be made back to the host server.

The RIA controls require a proxy in order to work around those security restrictions. The following sections describe why this is necessary and how a proxy can be used for your own application development.

Origin Concept

The origin in the same-origin policy means the same host, but there are a few specifics that should be noted. The following table illustrates whether the same origin when compared with a base origin of www.example.com:

Note Same-Origin URL

Same protocol and host true

http://www.example.com/dir/page.html

Same protocol and host true

http://www.example.com/dir2/other.html

Same protocol and host but different port false http://www.example.com:81/dir2/other.html Different protocol false https://www.example.com/dir2/other.html Different host false http://en.example.com/dir2/other.html

Different host (exact match required) false

http://example.com/dir2/other.html

Different host (exact match required) false

http://v2.www.example.com/dir2/other.html

Why is this Important?

In order to host applications on a different machine than directly on the server hosting RIA controls, we need a way to bypass the same-origin policy. This is particularly useful during application development, where developers typically want to run their code on a local machine. The local machine will typically use a hostname of localhost, or a machine name, and the server with the controls will have a different hostname, therefore and entirely different origin.

To achieve this, a proxy has been provided that will forward requests to a remote host and appear to the browser to still be in the domain. The Java proxy can be deployed to any Java servlet container that implements the Servlet 2.4 specification or higher.

The proxy simply takes a URL as a parameter and requests the page, passing the contents back to the requester. Given the proxy is installed on a server of a local machine on port 80, you can access the

(38)

http://localhost/riaproxy?url=http://myserver:8765/some/path/example.html. The result sent by the proxy will be the same as if the target URL was accessed directly. The important difference is the second URL will be seen by a browser as part of the local domain http://localhost/ instead of http://myserver:8765/. Please note that the URL parameter needs to be encoded properly to follow the syntax rules of Internet URLs (conf. RFC 1738: Uniform Resource Locators).

Using the RIA Proxy in your Web Application

This section describes how to use the RIA proxy in your web application.

Import ria.js

The first step is to import OpenLayers and the main RIA JavaScript library. This can be done as follows:

<script type="text/javascript"

src="http://localhost:8080/ria/openlayers/OpenLayers.js"></script> <script type="text/javascript"

src="http://localhost:8080/ria/ria.js"></script>

Replace localhost:8080 with the actual hostname and port number RIA is installed on.

Define the Path to your Proxy

To indicate that cross-domain calls should be routed through a proxy, the path to the proxy has to be registered like this:

ria.RestService.addProxy("/riaproxy?url=");

Rather than calling a URL to a different domain directly, the RIA library code will append the encoded URL to the end of the path registered above and use the result to perform the request. The proxy takes the URL from the request parameter (by default url) , requests the resource associated with it and sends the result back to the RIA library code without any modifications. The exact path passed to the addProxy() method depends on which proxy is being used and how the proxy was deployed.

The path above is the default for the Java Servlet proxy. For the IIS proxy, use the path /riaproxy/Proxy.aspx?url=.

Note:

Code Sample

A simple page for performing a Feature Search:

<!DOCTYPE html> <html> <head> <script src="http://localhost:8080/ria/openlayers/OpenLayers.js"></script> <script src="http://localhost:8080/ria/ria.js"></script> </head> <body> <button onclick="search();">Search</button> <script> ria.RestService.addProxy("/riaproxy?url="); function search() {

var fs = new ria.search.FeatureService( "http://localhost:8080/rest/Spatial/FeatureService");

(39)

table: "/Samples/NamedTables/WorldcapTable", geometry: new OpenLayers.Geometry.Point(12.875977, 47.813155), srs: "epsg:4326", attributes: ["Capital"], withinDistance: "2000 mi", distanceAttributeName: "dist", maxFeatures: 10 }); d.addCallback(function(result) {alert(result.features.length + " result(s)")}); } </script> </body> </html

Test this sample web application by viewing it in your browser and clicking Search.

A dialog appears that displays the results of the Feature Search:

In a web debugger such as Fiddler, you can see a listing of the 10 results:

{"type":"FeatureCollection","Metadata":[{"type":"String","name":"Capital"}, {"type":"Double","name":"dist"}],"features":[{"type":"Feature","properties" :{"Capital":"Ljubljana","dist":143.84489998699985}},{"type":"Feature","properties" :{"Capital":"Vienna","dist":161.4848812627603}},{"type":"Feature","properties" :{"Capital":"Vaduz","dist":163.332701859974}},{"type":"Feature","properties" :{"Capital":"Prague","dist":173.87473824107374}},{"type":"Feature","properties" :{"Capital":"Bratislava","dist":198.09553406882614}},{"type":"Feature","properties" :{"Capital":"Zagreb","dist":201.31855154101802}},{"type":"Feature","properties" :{"Capital":"Bern","dist":260.92616074609}},{"type":"Feature","properties" :{"Capital":"San Marino","dist":267.4791030110629}},{"type":"Feature","properties"

(40)
(41)

6

Working With REST Services

This chapter describes the REST services and how you can access them.

In this section:

What Are the REST Services? . . . .42

Mapping REST Interface . . . .43

Feature REST Interface . . . .66

Map Tiling REST Interface . . . .80

Common Data Types . . . .85

(42)

What Are the REST Services?

The REST services are a set of services you can call in your web application to access the functionality of Spectrum™Technology Platform. There are three services that can be accessed using a REST API:

• The Mapping Service provides a simplified interface to perform Mapping Service rendering, legends, and resource queries. The Mapping Service provides both simple operations that are more frequently used, or more complex operations that require higher levels of customization.

• The Feature Service provides the ability to search spatial databases, and named resources within the repository. It provides a set of common operations that you can use to query content, regardless of the underlying data provider.

• The Map Tiling Service dynamically generates subsets of a map on a per-request basis. This subset is called a tile. The tiles generated from the MapTiling Service can be used individually, or combined to form larger maps, in applications for seamless map interaction. This service provides fast, simple, light-weight map rendering.

REST Interfaces

The REST interfaces are what you use to access the Spectrum™Technology Platform functionality from

within your web application. The following table describes which REST Interface you use to access a particular service.

Use this REST Interface... To access this service...

Mapping REST Interfaceon page 43 Mapping Service

Feature REST Interfaceon page 66 Feature Service

Map Tiling REST Interfaceon page 80 Map Tiling Service

To get more detailed descriptions of the REST services, see the spatial REST interface WADL on your system: http://localhost:8080/rest/Spatial?_wadl&_type=xml

The REST API is essentially just a set of URLs your web application can send as HTTP GET requests. Each URL defines a request to a particular method of a particular interface. Your application then gets back a response, usually in the form of a JSON object or map image, from the corresponding REST Interface. The returned JSON object can be parsed by your web application to extract and process the requested information.

Using the Spectrum

Technology Platform REST API

Using the REST API in your web application is a two-step process:

1. Build the URL you need to make an interface request (and send it via HTTP GET). 2. Process the contents of the JSON object or image returned in the interface response.

The REST API defines the format of the URLs needed to make interface requests, and the format of the JSON objects returned in the response.

Request URL Format

The URL of a REST API request has the following general form:

http://host:port/rest/Spatial/ServiceName/pathParam;matrixParam&queryParam

References

Related documents

The long term effects of rejuvenation was determined through periodic testing of dynamic modulus through-out an accelerated oven aging protocol that exposed gyratory compacted

In this work, the feasibility of three thorium-based fuel cycles ( 232 Th- 233 U, 232 Th- 239 Pu, and 232 Th-U) in a hybrid system formed by a Very High

Finally and most importantly, interventional techniques such as opto- and chemo-genetics are required to causally verify the molecular and neuronal mechanisms of functional

The next step is to configure Spectrum to use a common repository database for the cluster. This ensures that named resources, geographic metadata and configuration settings are

The estimator based on the work by Xing and Ganju gives an unbiased estimate for the covariance but not for the correlation, especially when only a small number of blocks is

After the Albanians in Kosovo received American support to create an independent state under the control of ethnic Albanians, Albanian Macedonians who resided in northwest regions

Although this question began with ‘identify’ and requires an answer of a depth appropriate to that command word, some candidates missed marks by giving

And, as I’ve already stated in the above-mentioned chapter, “some of the RC d’Orient documents are hinted about at the Martinist S:::I::: initiation (3º) within