64
Troubleshooting Guide Spectrum Spatial Analyst

Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Embed Size (px)

Citation preview

Page 1: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide

Spectrum Spatial Analyst

Page 2: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide

Settings for Spectrum Spatial and Spectrum Spatial Analyst Memory and pooling .................. 1

Setting up Proxy Server configuration for Analyst .................................................................. 7

Setting up custom bitmap symbols in Spectrum Spatial .......................................................... 9

Activating the ISAPI Redirection for Tomcat under IIS 7.5 for 64 bit Windows Server 2008 R2 13

Setting up the guest user and guest role in Analyst .............................................................. 23

Setting up and caching Tile Maps for Spectrum Spatial Analyst ............................................ 29

Setting up summary fields in SSA ......................................................................................... 53

Best Practices for use of Spatial Data in Analyst ................................................................... 56

Adding a network location to view the Spatial Repository in Windows 7 .............................. 60

Page 3: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 1

Introduction

A number of customers are deploying Spectrum Spatial and Analyst on a single server. The

purpose of this guide is to advise on our recommended specification and to document the settings

that can be changed for memory and pooling.

Recommended server specification

The recommended serer specification is

Windows 2012 Standard (64 Bit)

12GB RAM

8 Processor Cores

We also support Windows 2008 and Ubuntu 14 (with other Linux versions to be supported in

future)

With the default memory settings (described below) Spectrum and Analyst can potentially use up

to 9GB RAM (although in typical use it will be around 5 to 6 GB). With 12GB we ensure that at

least 3GB is available for Windows and other processes.

The default memory settings are also the recommended settings but they may need to be

increased in some cases as detailed below.

The number of cores is important because it enables (after the pool setting is configured below)

Spectrum Spatial to process concurrent requests during high levels of use. For example during

tile caching, having and using 8 cores will increase the caching speed for tile generation. Also

because Analyst makes concurrent requests for map images using a tile based scheme having

multiple cores will help with render speed and performance.

For very high levels of concurrent use it may be necessary to have more than 8 cores but we

recommend 8 for typical use in Local Government.

Page 4: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 2

Memory Settings – Spectrum Platform

The Spectrum Platform uses between 2GB and 4GB RAM and the setting is defined in the

wrapper.conf file located here (assuming a default install location)

C:\Program Files\Pitney Bowes\Spectrum\server\bin\wrapper\wrapper.conf

We recommend retaining the default settings unless other Spectrum Modules are being used in

addition to LIM

To change the settings edit this file in a text editor and then re-start the Spectrum Platform

Service

Page 5: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 3

Memory Settings - Spectrum Spatial/LIM

Spectrum Spatial has additional memory settings over and above that used by the Platform

The settings are configured in the java.vmargs file located here (on a default install path) C:\Program Files\Pitney Bowes\Spectrum\server\modules\spatial\java.vmargs

There is only one line specifying the maximum memory and the default is 1GB

This setting specifies memory for both of the two spatial components

The Mapping component consists of the Mapping, Tile and WMS services

The Feature component consists of the Feature, Named Resource, WFS and Geometry

Services

Each will use 1GB hence the total default memory use is 2GB

We recommend keeping the settings at 1GB, but in some cases where lager and more complex

data sets are used, with queries being executed by Spectrum Spatial (e.g. in case of TAB files use

rather than RDBMS such as Oracle where queries are usually pushed to the DB) there may be a

need to increase the memory.

To change the settings edit this file in a text editor and then re-start the Spectrum Platform

Service

Page 6: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 4

Memory Settings - Spectrum Spatial Analyst

Spectrum Spatial Analyst has three services and each uses 1 GB by default. We recommend

keeping these at 1GB. The memory settings are configured in the java options which can be seen

by running the following at the command line for each service whilst in one of the bin folders for

Analyst

tomcat7w //ES//AnalystAdmin

tomcat7w //ES//AnalystConnect

tomcat7w //ES//AnalystLocate

For example in in the Admin Bin folder you can issue any of the above commands

The memory settings can be edited and then saved using the properties dialog that is shown

After the change the services need to be restarted

Page 7: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 5

Pool Settings - Spectrum Spatial/LIM

Spectrum Spatial by default is configured to use one set if pooled components

This limits it to handling only one concurrent request at a time.

We recommend increasing the number of pools to match at least the number of processor cores

available. With the recommended server specification this means increasing the pool settings

from 1 to 8

The pool settings are configured using the Spectrum management Console as follows

In Management Console go to Modules > Location Intelligence > Remote Components

For each of the two components select it and then click modify

In the modify dialog enter the new pool value (e.g. 8) then click OK

If the pool is increased there is no need for a server re-start. If the pool is decreased then you will

need to re-start the Spectrum Platform service

Page 8: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 6

Tile Caching

One of the more intense uses of Spectrum Spatial is during caching of tiles for base maps

The command line cacher is able to make multiple concurrent requests to the tile service by

modifying the threads parameter.

Normally this is set at 1, but if the server is able to handle more threads (for example it can

handle at least 8 if the pool setting has been increased) then we recommend using the same

threads in the cacher.

For example

cache_builder.bat -url=http://localhost:8080/rest/Spatial/MapTilingService -

fileInput=C:\SpatialServer\TILING\MapTilingRequests.txt -image=png -threads=8 -

dirOutput=C:\SpatialServer\TILING\OUTPUT -username=admin -password=admin

During caching with 8 threads enabled you should see all 8 processor cores at around 80%

capacity. If only one thread is used then perhaps 2 or 3 processors may be utilised at a low level

Page 9: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 7

In some cases Analyst needs to make calls to external services from the server

This can include

Printing base maps from Bing, OSM Europa

Making calls to Bing Location Services

Making calls to test tile and WMS maps

Authenticated WMS maps

Where a proxy server is used at a customer site the proxy server needs to be added to the java

options of both the AnalystAdmin and AnalystConnect services as follows. This allows the

proxy to be passed as a system parameter to java process, and the local machine where spatial

service is installed is configured for no proxy use.

At the command prompt go to-

C:\Program Files\Pitney Bowes\SpectrumSpatialAnalyst\Tomcat7\AnalystAdmin\bin>

Enter tomcat7w//ES//AnalystAdmin

Add the following to the end of the java options

-Dhttp.proxyHost=bcproxy e.g. Proxy server host name

-Dhttp.proxyPort=3128 e.g. Proxy server port

-Dhttp.nonProxyHosts=BC-SSAAPP-L001 e.g. Server where Analyst is

deployed

Repeat the same for tomcat7w//ES//AnalystConnect

Restart the services

Page 10: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 8

Going forward we should add the provision to pass the proxy, port and servers which don’t need

proxies from properties configuration.

Page 11: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 9

Custom symbols used in MapInfo Professional can also be added to Spectrum.

The process is also documented here

http://support.pb.com/help/spectrum/10.1/webhelp/en/Spatial/index.html#Spatial/source/Develop

ment/devguide/tutorials/custsymbols/steps.html

Step 1 Add the image files to a JAR file

You can add images to a jar file using the jar command line statement in a Command prompt.

The jar command is available if you have any version of java installed on the machine (JDK or

JRE)

Open the command line in Programs -> Accessories -> Command Prompt

You should run the jar command line in the folder where the images are actually located. This will avoid folder names being added to the jar file. If folder names are added you will need to manually edit the named layers which are added using the map uploader (as described in the help link above). You can add all images using wildcards as below where <myJarFileName> is the name of the jar file. jar cvf <MyJarFileName>.jar *.png

Or you can specify a single image. jar cvf <MyJarFileName>.jar <MyImageName>.png

Here is an example of adding all png files

c:\Maps\DTPLI\Symbols\Education POI\DTPLI>jar cvf SymbolsDTPLI.jar *.png

added manifest

adding: Map Icons_COM_KINDER.png(in = 15778) (out= 15204)(deflated 3%)

adding: Map Icons_EDU_P-12.png(in = 17274) (out= 16454)(deflated 4%)

adding: Map Icons_EDU_PRIM.png(in = 20862) (out= 20414)(deflated 2%)

adding: Map Icons_EDU_SECO.png(in = 18866) (out= 18366)(deflated 2%)

adding: Map Icons_EDU_SPEC.png(in = 21311) (out= 20867)(deflated 2%)

adding: Map Icons_EDU_UNIV.png(in = 16079) (out= 15414)(deflated 4%)

c:\Maps\DTPLI\Symbols\Education POI\DTPLI>

Here is a screen shot of adding a single image

Page 12: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 10

Step 2 Place the jar file onto the spectrum server

Place the JAR file in this directory: install_dir/server/modules/spatial/lib.

Step 3 restart Spectrum

You need to re-start Spectrum either using the taskbar icon or the services panel

Here is the services panel

Step 4 adding named resources

In order to use the custom symbols use the Spectrum Spatial Map Loader to upload a TAB file

and/or map where the TAB file is using the custom symbol(s). As long as the custom symbol has

the same name as the ones added to the jar file, then the symbol will be found and will be

rendered in the map image.

How to verify if the symbol is wrong if there are errors

If the symbol is not found and you get dialogs in Analyst when loading the map which uses a

custom symbol you can verify the error using the network panel in any of

Firebug in Firefox

Developer Tools in Chrome

Developer Tools in Internet Explorer

Re-load the Analyst application after starting the developer tools and selecting the network

panel.

Page 13: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 11

Here are the developer tools in Chrome

And this is the network panel showing some requests.

If there are errors you will see a red request which has failed. It will be a request to render the

legend.

Select the request and then choose to see the response that was returned. The response will

contain the error and specify the symbol name that was not found, example below where

helmet.bmp was not found.

Page 14: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 12

Page 15: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 13

Internet Server Application Programming Interface (ISAPI) filters are programs that you can add

to IIS to enhance Web server behavior. ISAPI filters receive every HTTP request made to the

Web server to provide additional functionality for the server, such as logging request

information, authenticating and authorizing users, rewriting URLs, and compressing Web

content to reduce bandwidth cost.

This section of the guide describes the steps necessary to set up an IIS website for forwarding the

requests to the Analyst web application deployed on Tomcat instances. This is done by installing

a custom ISAPI filter in IIS that understands how to use the AJP protocol (Apache JServ

Protocol) to communicate with Analyst.

IIS (Internet Information Server) role is installed on Windows Server 2008 R2

1. ISAPI install deploys a DLL called isapi_redirect.dll along with a couple of properties files and

adds them to the windows registry. Download the 64 bit isapi_redirect.dll from http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/

2. Copy the downloaded file to C:\\jakarta-tomcat (or any other path) 3. Create isapi_redirect.properties file in C:\\jakarta-tomcat. The file contains the following entries –

# Configuration file for the Jakarta ISAPI Redirector # The path to the ISAPI Redirector Extension, relative to the website # This must be in a virtual directory with execute privileges extension_uri=/jakarta/isapi_redirect.dll # Full path to the log file for the ISAPI Redirector log_file=C:\jakarta-tomcat\logs\isapi_redirect.log # Log level (debug, info, warn, error or trace) log_level=error # Full path to the workers.properties file worker_file=C:\jakarta-tomcat\conf\workers.properties # Full path to the uriworkermap.properties file worker_mount_file=C:\jakarta-tomcat\conf\uriworkermap.properties

Page 16: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 14

4. The workers.properties file specifies, for each “worker”, the location it gets redirected to and the protocol to use. The URIworkermap.properties file specifies the URL’s that are to be redirected and which “worker” to use

worker.properties – host IP and AJP post must be replaced with appropriate values

Uriworkermap.properties

worker.list=analyst_worker worker.analyst_worker.host=127.0.0.1 worker.analyst_worker.port=8009 worker.analyst_worker.type=ajp13

/connect=analyst_worker /connect/=analyst _worker /connect/*=analyst _worker

5. The Registry Key on IIS machine should have this entry

[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector] [HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0] extension_uri=/jakarta/isapi_redirect.dll log_file=c:\\jakarta-tomcat\\logs\\isapi_redirect.log log_level=error worker_file=c:\\jakarta-tomcat\\conf\\workers.properties worker_mount_file=c:\\jakarta-tomcat\\conf\\uriworkermap.properties

6. Install ISAPI filters

6a) On the taskbar, click Start, point to Administrative Tools, and then click Server Manager.

6b) In the Server Manager hierarchy pane, expand Roles, and then click Web Server (IIS).

6c) In the Web Server (IIS) pane, scroll to the Role Services section, and then click Add Role

Services.

6d) On the Select Role Services page of the Add Role Services Wizard, select ISAPI Filters, and

then click Next.

6e) On the Confirm Installation Selections page, click Install.

6f) On the Results page, click Close.

7. Configure ISAPI filter

7a) Open IIS Manager => Server => ISAPI and CGI Restrictions

Page 17: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 15

7b) Select the isapi_redirect.dll, and choose a description – also activate Allow extension path to

execute

Page 18: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 16

7c) Open the Website where you want to activate the redirect and open the option ISAPI Filters

7d) Add an ISAPI Filter with the following configuration:

Filter name: isapi_redirect (for example)

Executable: click on "..." and change to the isapi_redirect.dll folder and choose the "isapi_redirect.dll"

7e) Right click on the site and choose Add Virtual Directory under your Website.

Page 19: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 17

7f) Name it "jakarta" and choose the path to the isapi_redirect.dll

7g) Now open the Handler Mappings on the just created Virtual Directory and click on Edit Feature Permissions

Page 20: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 18

7h) Activate Execute

7i) Restart the Tomcat Service and the IIS Web-Server

8. SSL Configuration The steps for configuring Secure Sockets Layer (SSL) for a site include the following:

Get an appropriate certificate.

Create an HTTPS binding on a site.

Test by making a request to the site.

Optionally configure SSL options, that is, by making SSL a requirement. Please follow the steps provided below to enable SSL using IIS Manager - 8a) Obtain a certificate Select the server node in the treeview and double-click the Server Certificates feature in the list view:

Page 21: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 19

8b) When choosing a certificate, consider the following: Do you want end users to be able to verify your server's identity with your certificate? If yes, then either create a certificate request and send that request to a known certificate authority (CA) such as VeriSign or GeoTrust or obtain a certificate from an online CA in your intranet domain. Self-signed certificates are certificates created on your computer. They're useful in environments where it's not important for an end user to trust your server, such as a test environment. 8c) Click Create Self-Signed Certificate... in the Actions pane.

Enter a friendly name for the new certificate and click OK.

Now you have a self-signed certificate. The certificate is marked for "Server Authentication" use; that is, it

uses as a server-side certificate for HTTP SSL encryption and for authenticating the identity of the server.

8d) Create an SSL binding

Select a site in the tree view and click Bindings... in the Actions pane. This brings up the bindings editor

that lets you create, edit, and delete bindings for your Web site. Click Add... to add your new SSL binding

to the site.

Page 22: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 20

The default settings for a new binding are set to HTTP on port 80. Select https in the Type drop-down

list. Select the self-signed certificate you created in the previous section from the SSL Certificate drop-

down list and then click OK.

Now you have a new SSL binding on your site and all that remains is to verify that it works.

8e) Verify the SSL binding

In the Actions pane, under Browse Web Site, click the link associated with the binding you just created.

Page 23: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 21

Internet Explorere (IE) 7 and above will display an error page because the self-signed certificate was

issued by your computer, not by a trusted Certificate Authority (CA). IE 7 and above will trust the

certificate if you add it to the list of Trusted Root Certification Authorities in the certificates store it on the

local computer, or in Group Policy for the domain.

Click Continue to this website (not recommended).

8f) Configure SSL settings

Page 24: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 22

Configure SSL settings if you want your site to require SSL, or to interact in a specific way with client

certificates. Click the site node in the tree view to go back to the site's home page. Double-click the SSL

Settings feature in the middle pane.

8g) Restart the Tomcat Service and the IIS Web-Server On the Stratus Tomcat Server – tomcat needs to be set up to accept AJP requests on port 8009 as follows <directory where tomcat is installed>\conf\server.xml

Page 25: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 23

Background The purpose of the guest account in Analyst is to allow some map configurations to be made available to users without them having to log in. Guest access is an option that can be chosen at install time. However it can also be configured after installation. The settings chosen at install time are held in a properties file and can be amended at any time. There are two main steps to creating the account First in Analyst

Analyst needs to be configured to enable guest access

A guest user name and password needs to be added which Analyst will use. Secondly in Spectrum

The guest user needs to be added to Spectrum Spatial with the same user name password that was specified in Analyst

A guest role needs to be created. This must be called “AnalystGuestRole”

The guest user is added to the guest role Once this configured the administrator can use the Analyst Admin Console to assign permissions on map configurations to the AnalystGuestRole. Anyone browsing to Analyst will be automatically logged in (there is no log in prompt) as the guest user. Any map configurations assigned to the AnalystGuestRole will be available for them to choose and view. If the user has an account in Analyst and wishes to login they can click the sign in link and enter their user name and password. They will then have access to whatever additional map configurations are assigned to their roles.

Setting up in Analyst Open the shared.properties file in a text editor. The shared properties file is usually located here C:\Program Files\Pitney Bowes\SpectrumSpatialAnalyst\customerconfigurations\_global_\shared.properties

Edit the following entries and ensure that access.public.enabled is “true” and not “false” Access.authenticated.enabled should always remain “true”

access.authenticated.enabled = true access.public.enabled=true

Edit the following properties to specify the guest user account, In this case I have called the user “AnalystGuestUser” but the user can have any name and password.

anonymousUsername=AnalystGuestUser

Page 26: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 24

anonymousPassword=Password1

Analyst needs to be re-started for the settings to take effect. You can re-start the 3 Analyst services using the services panel under Control Panel -> Administrative Tools -> Services Select each of the AnalystConnect and AnalystAdmin services, and click he stop service button (the black square). Once they are stopped then select each of the services and click the start service button (the green arrow)

Setting up in Spectrum Run the Spectrum Management Console (desktop application) and log in

Go to Security -> Roles, click Add and enter the name of the role to be used for guest access. Do not give the role any permissions at this stage. The role’s permissions are managed in Analyst Admin Console. Below I have called the role as AnalystGuestRole. Note that the role name must be AnalystGuestRole.

Page 27: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 25

The guest role is now added

Page 28: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 26

Then go to Users, click Add and enter the name and password of the guest user. Make sure that this is the same name and password (ensuring case sensitivity is retained) as the guest user specified in the shared.properties file. Also ensure that the user is added to the guest role (and no others) by ticking the guest role. Then save the user.

Below the guest user is added

Page 29: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 27

Assigning permissions in Admin Console In admin console assign permissions to the guest role to one or more map configurations and click save. If needed ensure that Find Nearest, Query and Base Map permissions are also assigned.

Page 30: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 28

When any user browses to Analyst they will be allowed in without the login prompt being shown as the “guest” user. They will have access to the map configurations that were assigned to the guest role. The user can use the sign in link if they wish to sign in as a different Analyst user.

Page 31: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 29

Introduction

This section explains how to create tile maps for use with Analyst. Tile maps are rendered using

the Spectrum Spatial Maptiling service which can have server side caching enabled for storing

tile map images. Caching can significantly enhance performance of rendering maps and is suited

for base maps which do not change often.

The process follows these steps

1. Upload the Named Map, Layers and Tables to Spectrum using the Spectrum Spatial uploader

2. Create a folder for holding the tile cache on the file system

3. Create the Named Tile in Spectrum Management Console

4. Enable caching for the Spectrum Spatial Maptiling Service

5. Testing the tile service requests

6. Cache the tile Images using the Spectrum Tile Generator tool

Step 1 Create the TAB files

The first step is to add the named resources to Spectrum.

Ensure that the TAB files for the maps are on the file system and visible to the Spectrum

server. Normally they will be held on the Spectrum Spatial Server itself. For ease of

management we recommend placing them in a sub folder called TileMaps

Open them in MapInfo Professional and apply any zoom layer settings required (for example

to show less detailed layers as a user zooms out).

Using the Spectrum Spatial Uploader, upload the named resources to Spectrum Spatial. For

ease of management we recommend placing the resources into a separate repository folder

called TileMaps. The upload process will create the Named Map, Named Layers and Named

Tables for the maps.

At this point it should be possible to use the maps using the Mapping Service.

Step 2 Create a folder for holding the cached map images

Secondly a folder should be created where the cached map images will be held. The disk

requirements of the folder will vary depending on how many map levels need to be cached and

how many maps need to be cached. Below the TileCache folder is placed on the same location (E

drive of the server) as the map data.

Page 32: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 30

Step 3 Create the Named Tile in Spectrum Management Console

A named tile can be created for each named map using the spectrum management console. To

create a named tile you will need to know the extents you wish to use (which should be square

extents), the projection and which image types you wish to support.

The projection used will need to be the same projection as any raster layers added to the map as

Spectrum Spatial will not be able to re-project raster layers into another projection. If the map

contains only vector layers then you can choose any supported projection.

We recommend choosing only one image format for each named tile. PNG is best for map data

with many colours. GIF generates smaller cache file sizes but only supports 256 colours. JPEG is

best for Aerial imagery as it generates a smaller file size and the lossy nature of jpeg, which may

add small artefacts to line drawn maps does not affect the image quality. We recommend using

“jpeg” rather than “jpg” as Spectrum will fail to render tile images if only “jpg” is used as a

mime type. The issue is covered in this Jira case http://jira/browse/MID-16541

To use “jpg” you will need to add both “jpg” and “jpeg” as mime types, generate the cache

specifying “jpg” and then pick “jpg” in the Stratus admin console when choosing the tile rather

than “jpeg”. Picking “jpeg” will cause Spectrum to re-generate the cache as jpeg and you will

have both jpg and jpeg images cached eventually.

If you use jpeg you can add jpeg as a mime type and generate the cache specifying jpeg. In

admin console “jpeg” will be the only option for the tile cache format.

Further help on creating Named Tiles is available here

http://support.pb.com/help/spectrum/9.0/webhelp/en/spatial/index.html#LIM/source/NamedTiles

/whatis.html

Page 33: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 31

Named Tiles

Location Intelligence Module Map Tiling Service uses named tiles to render maps. The

named tiles are stored in the repository located in the NamedTiles directory under the root

repository. For example, a default installation will place the named tile definition files at

http://localhost:8080/RepositoryService/repository/default/NamedTiles. Named tiles

reference a named map that is used for the map display of the tile.

For adding named tiles, you must already have a named map defined. You can create or

modify named maps using the Named Map tool in the Management Console, or manually

creating the named map and uploading it to the repository. For information on adding Named

Maps, see Named Maps.

Note: Only a user account with a spatial-admin role has the ability to add resources using the

Management Console. For more information on assigning permissions, see the

Administration section in the Spectrum™ Technology Platform Spectrum Spatial Guide on

support.pb.com.

Adding or Modifying a Named Tile

1. Open the Management Console.

2. Expand Modules > Location Intelligence > Tools then click Named Tiles.

3. Click Add or Modify. The Add Named Tile or Update Named Tile dialog box will

appear.

4. If you are adding a new Named Tile, enter the name of the new named tile including the

repository path and name for the named tile resource in the Name field. You must

prepend the name of the named tile with where in the repository the named tile is going to

be created. For example, if you are creating the WorldTile named tile and are creating this

named tile in the NamedTiles folder in the repository, the name you would enter in the

Name field would be /NamedTiles/WorldTile. You cannot modify the name of an

existing named tile resource. Changing the name of an existing resource would cause any

services or jobs that reference the resource to fail.

5. In the Description field add a metadata description of the named map. This information is

presented to the user when a getDescription call is sent to the Map Tiling Service.

6. In the Named map field enter the name of the named map to be used as the source of the

name tile. Either enter the name of the named map including the repository path of the

Page 34: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 32

resource in the repository, or use the repository browser button and select the named map

from the repository.

7. In the Coordinate system field enter the coordinate system projection to host the named

map. The Map Tiling Service will transform the named map into the projection defined.

The projection is defined using the EPSG format. Either enter the coordinate system

EPSG code, or use the coordinate system browser button and select a supported

coordinate system.

8. In the Minimum level field enter the minimum zoom level to host the map. Must be

greater than zero.

The level, in combination with the tile width, tile height, and bounds of the named map,

determines the zoom level of the tiles to be returned. The level shows how close the map

image is to the Earth. Level 1 is the furthest away and is composed of one tile that the

entire map will be drawn into. Level 2 is composed of 4 tiles, 2 across and 2 down. Each

tile is a quarter of the entire map. Level 3 is composed of 16 tiles, 4 across and 4 down,

and so on. The higher the level specified, the closer to the Earth the map image appears.

For example, levels 1 to 3 usually show global or hemispheric detail, levels 4 to 15 show

county/state/province level of detail and some larger cities, levels greater that 15 show

street level views.

What the levels actually display is dependant on the named map hosted by the Map Tile

Service. For example, a level of 1 for a world map would be zoomed out to show the

entire world. However, if you have a named map of only a city (for example, New York,

Toronto, or London), a level of 1 would be zoomed out to show a street level map.

9. In the Maximum level field enter the maximum zoom level to host the map.

10. In the Width field enter the width of the tiles in pixels. Must be greater than or equal to 16

and must be a number that can be calculated from a 2n equation (for example 24=16,

25=32, 28=256).

11. In the Bounds fields enter the north, east, south, and west bounds of the tile. These are

oordinates in the coordinate system specified by the Coordinate system field.

12. In the Mime types field enter the available image types of tiles generated by the tile server

for the named map. This is a comma separated list of image mime types. For example:

image/png,image/jpeg,image/gif

13. In the Expiry date field enter the date on which the client should delete the tile from the

cache, and request a new copy from the server. The ExpiryDate value must be specified

in a W3C formatted date string as YYYY-MM-DD. The expiry date has effect only when

using external caching software such as Squid or Apache.

14. In the Resolution field enter the resolution of the tile images in dots per inch (the number

of individual dots that can be placed within the span of one linear inch). If not specified,

the GlobalMapResolution for the MapTiling Service is used. The minimum dpi you can

Page 35: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 33

define is 72, anything less would render a poor quality image. If a value less than 72 is

defined, the service will throw an exception.

15. In the Map rendering field select the rendering quality (anti-alias) of the tile images

generated for non raster maps.

Speed—Choose this option if you desire quicker return of map tiles. The image

quality will not be as high, as the anti-aliasing will be turned off.

Quality—Choose this option if you desire higher quality map tiles. Anti-aliasing is

turned on, so there will be improvements to image rendering, however there will

be a time increase for tiles to be returned due to the additional image processing.

16. In the Raster rendering field select the rendering quality (anti-alias) of the tile images

generated for raster maps.

Speed—Choose this option if you desire quicker return of map tiles. The image

quality will not be as high, as the anti-aliasing will be turned off.

Quality—Choose this option if you desire higher quality map tiles. Anti-aliasing is

turned on, so there will be improvements to image rendering, however there will

be a time increase for tiles to be returned due to the additional image processing.

17. In the Render labels field select if you would like the service to render LabelLayers when

generating a tile.

True—Choose this option if you would like labels on your tiles for label layers in

this map

False—Choose this option if you do not want labels rendered on your tiles for

label layers in this map.

18. In the Pad factor field enter the number of additional tiles around rendered tile to

generate. The pad factor is used to prevent the clipping of labels when a label crosses a

tile boundary. The PadFactor controls the amount of space is rendered around the

requested tile with 0 meaning no padding, 1 meaning padding of 1 tile around the

requested tile and so on. If a PadFactorpreference is not specified, the global preference in

the configuration will be used. If neither is specified, the default is 1.

19. In the Background opacity field enter the level of background opacity (transparency) for

the tile images. The background opacity is defined on a scale from 0.0 (zero) to 1.0.

Where 0.0 is completely transparent and 1.0 is completely opaque. For example a value

of 0.75, would be 75 percent transparent.

20. Click OK.

The named tile resource is now available for use in the MapTiling Service.

Deleting a Named Tile

Page 36: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 34

1. Open the Management Console.

2. Expand Modules > Location Intelligence > Tools then click Named Tiles.

3. Highlight the named tile you want to remove and click Delete. You will receive a

confirmation message asking if you wish to delete the named tile.

4. Click OK to confirm.

Below are two example named tiles and the corresponding Named Tile XML that was created.

Step 4 Enable caching for the Spectrum Spatial Maptiling Service

Page 37: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 35

By default the Spectrum Spatial Maptiling service is not configured to cache map images for tile

requests. It can be enabled by editing the MapTilingConfiguration file as described in the

following help.

http://support.pb.com/help/spectrum/9.0/webhelp/en/Spatial/index.html#Spatial/source/Services/

map_tiling/cache/enablepluggablecache.html

Enabling Pluggable Tile Caching

To enable the pluggable tile cache in the Map Tiling Service:

1. Use a standard WebDAV protocol tool to access the repository (e.g., Windows

WebFolders, DAVExplorer, etc.) and copy the configuration file from the repository to a

directory on your local machine. The Map Tiling Service configuration file is located at

http://localhost:8080/RepositoryService/repository/default/Configuration/MapTilingConfi

guration.

2. Open the local MapTilingConfiguration file in any text editor.

3. In the Cache section, set enabled to true. <Cache enabled="true">

4. Set the diskPath property to the location where your tiles are stored.

Since this location not only stores your pre-generated tiles, but also stores tiles that are

generated by the tiling service, this directory must be writable by the user account that

launches the Spectrum™ Technology Platform.

<Property name="diskPath" value="C:/Program Files/Pitney

Bowes/Spectrum/server/modules/spatial/TileCache"/>

5. Optionally modify the tilePathPattern property to define how tiles are stored in the

diskPath directory structure. The file structure in the cache is define by the three

properties :diskPath/tilePathPattern/tileNamePattern.

You can use the key words (mapName, level, row, column, mimeType) to set the path

format.

<Property name="tilePathPattern" value="mapName/level/row"/>

6. Optionally modify the tileNamePattern property to define how tiles are named in the

diskPath directory structure. The file structure in the cache is define by the three

properties :diskPath/tilePathPattern/tileNamePattern.

Page 38: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 36

You can use the following three tileNamePattern values (row.mimeType,

column.mimeType, row-column.mimeType) to set the name format.

<Property name="tileNamePattern" value="column.mimeType"/>

7. Upload the modified configuration file back to the same location (and name) in the

repository using your WebDAV tool.

8. Use the Spectrum™ Technology Platform JMX Console to invoke the new configuration

for the service. For instruction on how to reload the configuration using the JMX

Console, see Reload the Service Configuration using JMX Console.

The pluggable tile cache is now enabled. You can now use your pre-generated tiles at the

location you specified.

Once the MapTilingConfiguration file has been changed you need to reload the tile service as

described in this help

http://support.pb.com/help/spectrum/9.0/webhelp/en/Spatial/index.html#Spatial/source/Administ

ration/config/repository/restartjmx.html

Reload the Service Configuration using JMX Console

Once you have modified a service configuration, you must reload the configuration in the

repository using the JMX Console. The JMX console allows you to reload and administer a

service, without having to restart the application container.

To reload the service configuration:

Access the JMX Console using the following URL: http://localhost:8080/jmx-

console/

Under the Domain: Spatial section, select the administration link for the service. For

example, Spatial:name=Administration,type=MapTiling Service.

Click the Invoke button for the reloadConfiguration operation.

Page 39: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 37

You will get a message on the status of the invocation.

Here is an example of the changes made. We recommend that the value for the zeroBasedTile is

set to false. This setting determines whether the first tile level (and tile naming scheme) for the

cache folders starts with a 0 or a 1. The tile generator used in the next step is currently unable to

generate a zero based tile. Also setting this to false will ensure that the tile cache folders are the

same as the tile levels used in the tile REST API, which also start at level 1.

Before

After

Below are screen shots of invoking the tile service after making the above changes.

Go to the JMX Console page and login

Page 40: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 38

Click on the MapTilingService item (highlighted below)

Then click invoke-

Page 41: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 39

The following page will show after a short while with a successful reloading of the configuration

Step 5 Testing the Tile Service Requests.

The tile service can be tested using REST API requests in any web browser to list, describe and

get maps. Examples are shown below with sample json responses.

http://stratusopwin2k8:8080/rest/Spatial/MapTilingService/mapList.json

{"Response":["/Samples/NamedTiles/UK_REGNSTile","/Samples/NamedTiles/WorldTil

e","/Samples/NamedTiles/UKCountriesTile","/Samples/NamedTiles/USATile","/My

Tile With Space/UKCountriesTile","/My Tile With Space/UK_REGNSTile","/My Tile

With Space/USATile","/My Tile With Space/WorldTile","/Sikhars Tiles/My

Tiles/Aerial","/TileMaps/NamedTiles/CamdenAerial","/TileMaps/NamedTiles/Camde

nMastermap"]}

http://stratusopwin2k8:8080/rest/Spatial/MapTilingService/TileMaps/NamedTiles/CamdenAerial

/description.json

Page 42: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 40

{"Response":{"mapName":"/TileMaps/NamedTiles/CamdenAerial","description":"Cam

denAerial","namedMapLocation":"/TileMaps/NamedMaps/CamdenAerial","coordSys":"

epsg:27700","minimumLevel":1,"maximumLevel":12,"tileWidth":256,"tileHeight":2

56,"bounds":{"maxX":533000,"maxY":190000,"minX":522000,"minY":179000},"output

Types":["image/jpeg"],"mapExpirationDate":"Thu Dec 31 00:00:00 IST

2015","mapResolution":96,"mapRendering":"QUALITY","rasterRendering":"QUALITY"

,"renderLabels":false,"mapPadFactor":1,"backgroundOpacity":null}}

http://stratusopwin2k8:8080/rest/Spatial/MapTilingService/TileMaps/NamedTiles/CamdenMaste

rmap/description.json {"Response":{"mapName":"/TileMaps/NamedTiles/CamdenMastermap","description":"

CamdenMastermap","namedMapLocation":"/TileMaps/NamedMaps/CamdenMasterMap","co

ordSys":"epsg:27700","minimumLevel":1,"maximumLevel":12,"tileWidth":256,"tile

Height":256,"bounds":{"maxX":533000,"maxY":190000,"minX":522000,"minY":179000

},"outputTypes":["image/gif"],"mapExpirationDate":"Thu Dec 31 00:00:00 IST

2015","mapResolution":96,"mapRendering":"QUALITY","rasterRendering":"QUALITY"

,"renderLabels":false,"mapPadFactor":1,"backgroundOpacity":null}}

http://stratusopwin2k8:8080/rest/Spatial/MapTilingService/TileMaps/NamedTiles/CamdenMaste

rmap/1/1:1/tile.gif

http://stratusopwin2k8:8080/rest/Spatial/MapTilingService/TileMaps/NamedTiles/CamdenAerial

/1/1:1/tile.jpeg

Page 43: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 41

Step 6 Cache the tile Images using the Spectrum Tile Generator tool

Once the tiles are working the Tile Service will automatically cache a tile image, on first request,

into the folder specified for the tile cache.

If the tile maps are complex and slow to render you may wish to generate a tile cache before

letting end-users access them. You can use the Spectrum Tile Generator utility which is available

from the Spectrum landing page under the Spectrum Spatial page and then the Utilities tab.

The tile generator is a command line utility which will make requests to the Tile Service and

then place the returned image directly onto the file system.

The help for the tile generator is here http://support.pb.com/help/spectrum/9.0/webhelp/en/Spatial/index.html#Spatial/source/Utilities/tilebuilder/introduction.html

Tiling Generator The Tiling Generator is a command line utility that enables a user to execute batch runs to generate tiles. There are three options available when using this utility:

Generate a file that contains the tile levels to be created.

Use the file created above and create the tiles to seed the cache.

Directly use the parameters to generate the tiles and seed the cache. No input file is

needed for this option. Tiles need to be generated on the server. The Tile Generator requires the JAVA_HOME variable to be set to the location of the installed JDK. By running cache_builder.bat with no parameters or with the -help parameter, you will get more details about the options above.

Page 44: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 42

Creating a Tiling Request File with Tile Generator

Generating Tiles from a File with Tile Generator

Generating Tiles Directly with Tile Generator Creating a Tiling Request File with Tile Generator Description This process generates a tiling request file used to generate tiles. Parameters To create this file, use the following options:

Parameter Required Description

-fileOutput <fileOutput> yes Path and name of the file the generated requests

will be saved to.

-level <level> yes Level(s) to generate tiles for(e.g., comma

separated 1,2,6 or range 1-10).

-map <map> yes Named tile resource used to create tile(s) in the

repository( e.g., /NamedTiles/WorldTile).

-mbr <mbr> no Minimum Bounding Rectangle(MBR) to be used

to generate tiles.

-password <password> yes Password to access the repository.

-url <url> yes Specifies the URL to the MapTiling Service.

-username <username> yes User to access the repository.

Example This request will calculate and generate a file that contains tile level information. This request will not generate tiles, only the file.

cache_builder.bat -url=http://localhost:8080/rest/Spatial/MapTilingService -

fileOutput=C:\SpatialServer\TILING\MapTilingRequests.txt -map=/NamedTiles/WorldTile -

level="1,2-4" -mbr="-20000000, -20000000, 20000000, 20000000" -username=admin -

password=admin

Generating Tiles from a File with Tile Generator Description This process generates tiles using a request file. Parameters To generate tiles, use the following options:

Page 45: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 43

Parameter Required Description

-dirOutput <dirOutput> yes Path to the directory the generated tiles will be

saved to.

-fileInput <fileInput> yes Path and name of the request file to generate the

tiles.

-image <image> yes Image type of tiles (e.g., png).

-password <password> yes Password to access the repository.

-threads <threads> no Number of threads to use to generate the tiles.

-url <url> yes Specifies the URL to the MapTiling Service.

-username <username> yes User to access the repository.

-cache <cache> no Setting the cache to false causes the Tile

Generator to set the HTTP cache-control header

to “no-cache” in every tile request. This can be

used to flush the cache of tiles in a proxy server

between clients and the Map Tiling Service.

-proxy <proxy> no Connects the Map Tiling Service to a caching

server. This can also be achieved using -url if the

proxy server is configured with Map Tiling

Service as an origin server.

Example This request will read from the request file and generate tiles

cache_builder.bat -url=http://localhost:8080/rest/Spatial/MapTilingService -

fileInput=C:\SpatialServer\TILING\MapTilingRequests.txt -image=png -threads=1 -

dirOutput=C:\SpatialServer\TILING\OUTPUT -username=admin -password=admin

Generating Tiles Directly with Tile Generator Description This process generates tiles directly without using a request file by specifying all parameters in the command. Parameters To generate tiles, use the following options:

Page 46: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 44

Parameter Required Description

-dirOutput <dirOutput> yes Path to the directory the generated tiles will be

saved to.

-image <image> yes Image type of tiles (e.g., png).

-level <level> yes Level(s) to generate tiles for(e.g., comma

separated 1,2,6 or range 1-10).

-map <map> yes Named tile resource used to create tile(s) in the

repository( e.g., /NamedTiles/WorldTile).

-mbr <mbr> no Minimum Bounding Rectangle(MBR) to be used

to generate tiles.

-password <password> yes Password to access the repository.

-threads <threads> no Number of threads to use to generate the tiles.

-url <url> yes Specifies the URL to the MapTiling Service or

proxy if it is configured with Map Tiling as an

origin server. If MapTiling is running an internal

cache, then the tiles will get served from this

cache as usual.

-username <username> yes User to access the repository.

-cache <cache> no Setting the cache to false causes the Tile

Generator to set the HTTP cache-control header

to “no-cache” in every tile request. This can be

used to flush the cache of tiles in a proxy server

between clients and the Map Tiling Service.

-proxy <proxy> no Connects the Map Tiling Service to a caching

server. This can also be achieved using -url if the

proxy server is configured with Map Tiling

Service as an origin server.

Example This request will generate tiles by specifying all parameters (no request file is used).

cache_builder.bat -url=http://localhost:8080/rest/Spatial/MapTilingService -image=png -

level="1,2-4" -threads=1 -map=/NamedTiles/WorldTile -mbr="-20000000, -20000000,

20000000, 20000000" -dirOutput=C:\SpatialServer\TILING\OUTPUT -username=admin -

password=admin

Page 47: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 45

Generate cache

The cache can be generated using the spectrum Tile Generator which is documented here

http://support.pb.com/help/spectrum/9.0/webhelp/en/Spatial/index.html#Spatial/source/Utilities/t

ilebuilder/introduction.html

Below is an example of the two cache generator commands that were run. These create cache for

levels 1-10 and target the same folder as the tile service has been set up for. The cache builder is

designed to save the image to that folder. Hence if cache is enabled for the tile service both the

cache builder and tile service will save the image – it will get saved twice. You can choose to

create the cache to a different folder using the cache builder and then copy it to the server at a

different time.

Page 48: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 46

cache_builder.bat -url=http://stratusopwin2k8:8080/rest/Spatial/MapTilingService -image=gif -

level="1-10" -map=/TileMaps/NamedTiles/CamdenMastermap -

dirOutput=\\stratusopwin2k8\e$\TileCache\TileMaps\NamedTiles\CamdenMastermap -

username=admin -password=admin

cache_builder.bat -threads=4 -url=http://stratusopwin2k8:8080/rest/Spatial/MapTilingService -

image=jpeg -level="1-10" -map=/TileMaps/NamedTiles/CamdenAerial -

dirOutput=\\stratusopwin2k8\e$\TileCache\TileMaps\NamedTiles\CamdenAerial -

username=admin -password=admin

Add the Named Tile to a map configuration in Admin Console

Page 49: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 47

APPENDIX

Creating the Named Tile in Enterprise Manager

Page 50: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 48

Using Bitkinex to copy a resource out, edit it and copy it back in

Main Page

Example settings for my server (win02092)

Page 51: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 49

The page showing the resources (after double clicking the server in the list on the main page)

Page 52: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 50

Using Windows to connect to the repository over wevdav (slower than bitkinex)

Page 53: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 51

Page 54: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 52

Page 55: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 53

SSA can be set up to reference 5 summary fields in MapInfo tables. If any of these fields exist then they are displayed in a pre-determined format. The summary fields support the display of an in-line thumbnail image, and the ability to add hyperlink. The fields are defined in the Admin Console

Below we define 5 fields:-

Here is the data shown in MapInfo Pro for a sample table that contains the fields. Note that not all of the 5 fields need to be present, although below we do have all 5 present in the table. The names of the fields can by anything as long as each field’s name is correctly entered above, For example if the Image URL field is called “Photograph” in the TAB file then you would enter “Photograph” as the field name in the Admin Console.

Page 56: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 54

The fields are presented in the call out in a formatted manner as follows. The Title field is displayed at the top. The Link field, if present, is used to add a hyperlink to the title. In this case the link takes you to a web page with more information about that record. The image field needs to contain a link to a suitably sized thumbnail graphic. The Key value and Description are displayed also.

Page 57: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 55

In addition to the summary fields, it is also possible to enable the display of all other fields from tables. This can be achieved by ticking off the “show only summary fields in callout” option in the admin console on the Settings tab. Any fields that are not defined as summary fields will then be included in the call out underneath the summary fields. If no summary fields are present the call out still displays the other fields.

Page 58: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 56

This section provides a background to map rendering in Analyst and some recommendations on

ensuring fast and optimal performance. There are two aspects of performance:-

Best practises for use of data:-. Map render performance is partly a factor of data complexity.

The more processing needed to render a map image the more time it will take to perform the

rendering.

Best practises for use of Analyst. Understanding the behaviour of the Analyst application can

be useful when creating map configurations.

How data affects map render performance

No two data sets are the same and each will have different impact on map rendering

performance. Whilst in general larger data sets can take more time to render there are other

aspects of data that also have an effect:-

The number of records in a table that are visible and within the map view

The complexity of the map features (a simple building outline with 4 nodes will render

quicker than a river flood boundary with 100,000 nodes)

The projection of the data (data that needs to be re-projected to align with base mapping will

take longer to render)

Best Practise recommendations for Data

If you are finding that map render times are not acceptable please consider whether any of these

recommendations may help.

Zoom layering data with many records: A map image that contains many 10,000s of

geometries will render more slowly. Displaying large amounts of data is computationally more

intensive as it requires Spectrum Spatial to retrieve a larger number of geometries from the table

or database and render them on the map. Also when a map containing this number of geometries

is shown the base map is obscured and the map can look cluttered. In order to mitigate this issue

we recommend applying appropriate zoom layer settings to the layer in MapInfo Professional

before the Named Map is uploaded added to Spectrum. Open the data in MapInfo Professional

and make sure that the map Window is the same size as a map tile in Analyst (approximately 512

x 512 pixels note that it does not need to be exact). Zoom in until there are no more than around

10,000 (for polygons/lines) or 25,000 (for points) records for a layer at its densest location.

Zoom layer settings should be added to ensure the layer is visible only from this level down.

Page 59: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 57

Providing alternative ways to show information: Sometimes it is useful to see the pattern of

distribution of density of data. For example there may be 100,000s of customer records and

showing them all allows their distribution to be seen. However rendering a map which shows

100,000s of records is not performant. An alternative approach would be to create a different

layer to show density (perhaps a thematic map by county or other region, or a grid map). These

approaches allow the data density to be shown much more performantly. The original customer

layer can still be enabled when the user zooms in allowing them to get information on individual

customer records if needed.

Complex Geometries: Some data has geometries with many 10,000s nodes. Flood boundaries

are typical of this kind of data set and some datasets can have polygons which have over 400,000

nodes. When rendering a map even if the user is zoomed in, if the complex feature is within the

map view then all of the nodes will be returned to Spectrum Spatial when rendering the map.

There are two mitigations for this issue; thinning the geometries or splitting them.

Thinning Complex Geometries: Where the level of detail is not needed we recommend that

complex geometries are thinned using MapInfo Pro prior to upload. We have seen cases where

customers have used very detailed polygon boundaries for regions. One example was a map of

French departments which were drawn to high detail, each department containing 100,000’s of

nodes. Thinning the data to contain around 1,000 nodes per department did not affect the map

detail which was intended to be seen for the whole of France as a thematic map but improved

render time significantly.

Splitting Complex geometries: Where the level of detail is needed (such as flood boundaries

needing to be shown at property level) we recommend that the geometries are split into multiple

smaller geometries. There is no hard and fast rule, but if records contain more than around

30,000 to 50,000 nodes then some consideration should be given to splitting these geometries.

To split a large number of records in MapInfo Professional you could create a grid and split the

data using the grid.

Data in different projections: Many Analyst customers use Bing and OSM mapping for the

base map which are the Popular Visualization or Spherical Mercator projection (epsg:3857).

However the overlay data to be shown is usually in a different projection. In these cases Analyst

will request that the images are returned in the same projection as the base map so that they align

correctly. Spectrum Spatial will perform a co-ordinate transformation on the geometries to re-

project then into the required projection prior to rendering the map. This process can take time

and the more complex the data the longer it can take. To mitigate this issue we recommend that

data is saved in MapInfo Professional to the projection used for Analyst. This can be done using

the “File > Save Table As” menu option and clicking the projection button to choose a new

projection. For use with Bing and OSM pick “Projections of the World > Popular

Visualisation”.

How Analyst renders maps

Page 60: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 58

For backgrounds maps Analyst will usually use the Spectrum Spatial Map Tiling Service or a

third party source such as Bing or OSM. 256 x 256 pixel map tiles are returned and in all these

cases the tiles are cached server side and generally will perform well.

For business maps (uploaded by customers and shown in the legend) Analyst renders data live

and makes a series of 542 x 542 pixel map image requests for each map in the legend. For

example below we have two maps each with two layers. A map group relates to one Named Map

loaded into Spectrum.

Map images are placed adjacent to each other on the map window to complete the whole map.

The images are placed overlapping by 15 pixels to ensure map symbols do not appear cropped at

the edges. Below we see that 6 map requests are needed to fully cover the map window, which

results in a total of 12 map requests (6 for “Conservation Map” and another 6 for “Spaces and

Trees Map”).

The use of browse caching mitigates the issue to some extent. Once a map image is returned it is

cached locally in the users browser for 2 minutes hence as the user pans and zooms and returns

to the same location the cached map image is used. However if more map groups are present

then more requests are made. We have had cases where a customer has around 70 map groups. If

all of these were turned on by the user in the legend, and they had not previously browsed any of

them in their current session, Analyst would make 420 requests to render the map.

Map Group

Map Group

Layers

Layers

512 pixels

70

0 p

ixel

s

1300 pixels

Page 61: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 59

Best practise recommendations for use of Analyst

The following will help performance:-

Set map to initially invisible: When creating map configurations ensure that the maps are set to

“initially invisible” in the Analyst admin console. This will ensure that when a user first browses

to Analyst they will not have to wait for a potentially a large number of map requests to render

before the page is completed. Users can enable/disable maps once the page is loaded. Initial load

times are important for a user’s initial perception of the application.

Add more layers into map groups: When creating maps in MapInfo Professional try to group

multiple layers into them rather than having one layer per map. Users can still be given the

ability enable and disable the display of individual layers within a map if needed. But by having

tem in the same map it reduces the number of map render requests made.

Page 62: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 60

The protocol used is webdav

Follow these steps and then to copy the named resources simply copy them from the location in

Windows Explorer

If the Windows 7 machine is different but on the network use the machine name rather than

localhost

e.g. http://servername:8080/RepositoryService/repository/default

Page 63: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 61

Page 64: Spectrum Spatial Analyst Troubleshooting Guidesupport.pb.com/help/analyst/6.0/Spatial Analyst Administration...Troubleshooting Guide 2 Memory Settings – Spectrum Platform The Spectrum

Troubleshooting Guide 62