ERDAS APOLLO Essentials 2015 Web Map Tile Service (WMTS): custom tile matrix sets
ii
Custom Tile Matrix sets 2015 Intergraph Corporation and/or its affiliates. All Rights Reserved. Printed in the United States of America. The information contained in this document (the Work ) is the exclusive property of Intergraph Corporation ( Intergraph ). The Work is protected under United States copyright law and other international copyright treaties and conventions, to include the Berne and Geneva Phonograms Conventions, the WIPO Copyright Treaty, and the World Trade Organization. No part of the Work may be reproduced, stored, or transmitted in any form or by any means, electronic or mechanical, including photocopying and recording, or by any information storage or retrieval system, except as expressly permitted in writing by Intergraph. All such requests should be sent to the attention of Manager of Customer Education of the Hexagon Geospatial Division of Intergraph ( Hexagon Geospatial ) at the following address: Hexagon Geospatial 5051 Peachtree Corners Circle Norcross, Georgia 30092-2500 USA Phone: 770 / 776-3651 Fax: 770 / 776-3694 Support Services: 800 / 953-6643 Customer Education: 800 / 373-2713 Web: www.hexagongeospatial.com Warning The Work, and the software that is the subject of the Work, including icons, graphical symbols, file formats, and audio-visual displays, may be used only as permitted under license from Intergraph; contain confidential and proprietary information of Intergraph and/or third parties which is protected by patent, trademark, copyright and/or trade secret law; and may not be provided or otherwise made available without proper authorization. The Work may not be reproduced in any manner, including for resale or redistribution, without the prior written permission of Intergraph. Use of the software during the training course shall be in accordance with the End User License Agreement ("EULA") delivered with the software. Neither the software nor the software documentation may be reproduced in any manner, without the prior written permission of Intergraph. About This Manual The Work is an instructional document designed to be an integral part of the training course offered by Hexagon Geospatial. Hexagon Geospatial believes the information in the Work is accurate as of its publication date. Any specifications cited in the Work are subject to change without notice. The information and the software discussed in the Work are subject to change without notice. Intergraph is not responsible for any errors that may appear in the Work. Intergraph, the Intergraph logo, ERDAS, ERDAS IMAGINE, IMAGINE Essentials, IMAGINE Advantage, IMAGINE Professional, IMAGINE VirtualGIS, GeoMedia, ImageStation, Video Analyst, Stereo Analyst, TopoMouse, Hexagon Smart M.App, and Power Portfolio are trademarks of Intergraph Corporation. Hexagon and the Hexagon logo are registered trademarks of Hexagon AB or its subsidiaries. Other brands and product names are trademarks of their respective owners. Acknowledgments Some of the imagery and data provided in the Work are courtesy of Hexagon Geospatial. iii
iv
Table of Contents Table of Contents... v Web Map Tile Service (WMTS) using ERDAS APOLLO Essentials... vii Customizing WMTS Tile Matrix Sets... 9 Create a custom tile matrix set... 11 v
vi
Web Map Tile Service (WMTS) using ERDAS APOLLO Essentials Introduction A WMTS enabled server application can serve individual map tiles of spatially referenced data using tile images with pre-defined content, extent, and resolution. The main feature of WMTS is that it is a tile based server which serves maps divided into tiles. Each tile is then packaged as a set of tiles which is known as a tile matrix set. In a tiled map layer, the representation of the space is constrained in a discrete set of parameters. A tile matrix set defines these parameters. Each tile matrix specifies: The scale of the tiles as a scale denominator which is defined with respect to the standardized rendering pixel size. This recommended size is 0.28 mm. The width and height of each tile pixels. The top left (minimum x, maximum y) corner of the bounding box of the tile matrix (that is, the CRS coordinates of the top left corner of the top left pixel of the top left tile). The width and height of the tile matrix in tile units (that is, number of tiles). Each tile matrix set defines its own set of scale levels corresponding with the contained tile matrices. Each layer references one or more tile matrix sets. The main benefits and the reasons why you may consider using WMTS are listed below. It is a standard way to serve tiled images, that is, OGC compliant. Possible to use image overlays. When used with OTDF can be very fast. Has caching functionality thus increasing serving speed. Using WMTS is much the same as WMS whereby GetCapabilities and GetTile (instead of a GetMap) requests are made to the server. Tutorial Data Set The data used is the data which is embedded with the ERDAS APOLLO Essentials installation (default folder: C:\Program Files\Hexagon\ERDAS APOLLO\storage\data). Tutorial Prerequisites ERDAS APOLLO Essentials 2015 with the Essentials Console A Web browser The Geospatial Portal vii
viii
Customizing WMTS Tile Matrix Sets Section Objective The objective is to create and to display a custom tile matrix set. Tools used ERDAS APOLLO Essentials Console Notepad++ (http://notepad-plus-plus.org) The Geospatial Portal
10 Customizing WMTS Tile Matrix Sets
Create a custom tile matrix set Objective: The objective is to create and to enable an appropriate custom tile matrix set on a dataset. Task 1: Enable an already implemented tile matrix set Objective: ERDAS APOLLO Essentials ships with the several well-known tile matrix sets: Global CRS84 Scale Global CRS84 Pixel Google CRS84 Quad Google Maps Compatible (ESPG:3857) However, it is also able to customize your own tile matrix sets. Some customized tile matrix sets are already implemented. 1. To add a tile matrix set in a WMTS layer, go in the Administration console 2. Choose the dataset in the Default folder > SampleIWS > Images > usa > sandiegoairphoto_lossless.jp2 3. In the WMTS part, check the tile matrix set you want (well known) or add an available custom tile matrix set. For example, add GoogleMapsCompatibleExt:epsg:3857 and click on Apply 11
4. Check if the custom tile matrix has been correctly added: a) Click on WMTS to get the URL of the get capabilities, b) Use Ctrl+F to find the right layer, c) Go to the related <TileMatrixSetLink>. All the possible Tile matrix sets are present in the getcapabilities. However, it does not mean that every layer support every tile matrix set. To check is a tile matrix set is enable for a layer, the tile matrix set should be present under the layer marker. 12 Customizing WMTS Tile Matrix Sets
Task 2: Custom tile matrix set creation ERDAS APOLLO Essentials also allows to add your own customized tile matrix set. We will add a customized tile matrix set suitable for the sandiegoairphotolossless dataset. The tile matrix set will implement the native SRS of the dataset (EPSG:26916). 1. Open the Administration Console. 2. Select the sandiegoairphotolossless dataset (Default folder > SampleIWS > Images > usa > sandiegoairphoto_lossless.jp2) and verify the native dataset: ESPG:26911 (NAD83 / UTM zone 11). 3. Go to folder C:\Program Files\Hexagon\ERDAS APOLLO\config 4. Open the file wmtstilematrixsetsinfo.xml with Notepad++. Open Notepad++ with Adminstrator rights to be able to save it. 13
5. Edit the file to add the custom tile matrix set. There are 3 possibilities: a) Specifying set of scale denominators followed by a comma as the delimiter. b) Using the pyramid method by specifying the number of levels and the highest resolution ground pixel size (must be square). ERDAS APOLLO Essentials will automatically calculate each level based on the power of 2 scaling. c) Specifying a wellknownscaleset name ( wellknownscaleset= ). The scale denominator refers to a screen scale. As all the screens have different resolutions, the scale system is based on the OGC convention with a screen pixel of 0.28mm (approx. 90.7dpi). For instance, to display a 1m resoltion image at screen scale 1:1 (1 screen dot = 1 img pix), the scale denominator of 3571 has to be set: scale = 0.28mm 1m = 0.00028 = 1 = 1/3571 1 0.00028 6. The XML file contains templates for each method, just copy one to create the custom tile matrix set. For example, use the sample with the scale of denominators. Copy one with the scale of denominators it and paste it at the end of the file, before the </WmtsTileMatrixSets> marker. 14 Customizing WMTS Tile Matrix Sets
7. Modify the unique identifier and the alias (ID, Alias) by SansDiego:epsg:26911. 8. Modify the SRS with EPSG:26911, <ScaleSet CoordRefSys="epsg:26911">. 9. Open your Web Browser and go to http://spatialreference.org/ref/epsg/ 10. Search the SRS EPSG:26911 and look at the Projected Bounds. 11. Copy it and fill the <Tops> and <Lefts> marker in the XML file. In the spatial reference Web page, the projected bounding box is given by the left-bottom and the right-top corners. So you need the last coordinate (Top) and the first (Left) to fill the XML markers. Left Top 12. Keep Tile and Matrix widths and heights (resp. 256 and 1). 15
13. Save the file (don t forget the administrator rights). 14. Restart IIS by taping in the command prompt (with admin. Rights): IISRESET to take the modifications into account. 15. Open the Administration Console to check if the new Tile Matrix Set is available. 16. Select it: move it to the In Use panel and click Apply. 17. Click on the WMTS link, your browser opens and check if the customized tile matrix set is inside the definition of the sandieoairphotolossless layer. 16 Customizing WMTS Tile Matrix Sets
18. Copy the getcapabilities URL. 19. Open a WMTS viewer, we will use the GeoSpatial Portal. So with your browser go to http://localhost/apollo-ess-portal/iws.aspx (or to http://localhost/apolloportal/apollopro.aspx if you have the Advantage or Professional version of APOLLO). 20. Go to data sources tab, define a data source, chose WMTS and paste the getcapabilities URL. 17
21. Click on Register and choose layers. 22. Check sandiegoairphoto_lossless.jp2 and display. 23. In the left panel, go to Settings and choose the SRS EPSG:26911 (Search and then Add to list). 18 Customizing WMTS Tile Matrix Sets
24. Go to map Content, on the left of the layer, click on the arrow and select Fit layer. 25. If everything has been done right, the image should be there. 19