ERDAS APOLLO...14 Adding a custom coordinate system to ERDAS APOLLO 7. Convert degree into radian...
Transcript of ERDAS APOLLO...14 Adding a custom coordinate system to ERDAS APOLLO 7. Convert degree into radian...
ERDAS APOLLO Add a custom coordinate system to ERDAS APOLLO
ii
iii
Add a custom coordinate system to ERDAS APOLLO
© 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.
iv
v
Table of Contents
Table of Contents ............................................................................................................. v
Add a custom coordinate system to ERDAS APOLLO .................................................... vii
Adding a custom coordinate system to ERDAS APOLLO ............................. 11
Add the custom CRS to ERDAS APOLLO Essentials ..................................... 13
Adding a custom CRS to ERDAS APOLLO Advantage/Professional............. 19
vi
vii
Add a custom coordinate system to ERDAS APOLLO
Tutorial Objective The tutorial‘s goal is to describe how to add a custom coordinate reference system (CRS) to ERDAS APOLLO and to the Geospatial Portal.
The ERDAS APOLLO products is built on different levels (Essentials and Advantage) and different services, so the tutorial explains how to customize them. The Geospatial Portal also is also taking place in the tutorial.
Tutorial Data Set The tutorial data is based on a sample image located by default in the installation directory:
<APOLLO_Home>\storage\data\sampleimages\geodetic\usademo.ecw
A custom projection has been defined for the tutorial with the parameters:
Given name Lambert az equal area 0N 105W
Given custom code
12345
Proj. type Lambert azimuthal equal-area
Datum WGS84
Center of proj. lat. 45° N
Center of proj. long.
105° S
False origin. X 0 m
False origin. Y 0 m
The tutorial data (usademo.ecw) has been reprojected using ERDAS IMAGINE with the parameters provided above (rigorous transformation). The result has been clipped to get a “rectangular” image. The file name is:
“usademo_azlb45n105w_clip.ecw”
Tutorial Text Conventions There are several conventions used throughout the tutorial:
Coordinate Reference System: CRS.
Dialog box names, field names, and button names are depicted using Bolded Text.
<APOLLO_HOME> refers to the ERDAS APOLLO main installation folder path. With a
default installation, it is C:\Program Files\Hexagon\ERDAS APOLLO.
viii
Tutorial Prerequisites This tutorial is part of the ERDAS APOLLO Advanced training. It means that some basic understanding of ERDAS APOLLO is needed.
A valid installation of ERDAS APOLLO Advantage is also required.
ix
Adding a custom coordinate system to ERDAS APOLLO
Section Objective This section is intended to explain how to add a custom coordinate reference system (CRS) to ERDAS APOLLO. “Custom” means that the coordinate system is user defined or simply not supported by default by ERDAS APOLLO.
ERDAS APOLLO is based on two product levels: ERDAS APOLLO Essentials and ERDAS APOLLO Advantage/Professional. The tutorial describes the process to add a custom CRS to both levels. The tutorial explains also how to add the new CRS to the Geospatial Portal.
Tools Used ERDAS APOLLO Essentials
ERDAS APOLLO Advantage
Geospatial Portal
12 Adding a custom coordinate system to ERDAS APOLLO
13
Add the custom CRS to ERDAS APOLLO Essentials
Objective: The objective is to add the new CRS by added it with the right parameters in the configuration file.
Task 1: Add the custom CRS to ERDAS APOLLO Essentials configuration file
1. Navigate to <APOLLO_HOME>\lib\PROJ_DATA\etc
2. Open “mapprojections.dat”.
3. Look for the Lambert azimuthal Equal-area projection, keep in mind the internal number and the parameters structure.
4. Make a backup of “epsg.plb”.
5. Open “epsg.plb” with a text editor.
6. Watch the structure of the coordinate systems (see documentation: http://localhost/erdas-iws/doc/html/index.htm#652105.htm).
14 Adding a custom coordinate system to ERDAS APOLLO
7. Convert degree into radian for the projection center.
8. Find a coordinate system already implemented in “epsg.plb” with the same projection (search for “INTERNAL 11”). Copy the coordinate system parameters and paste it.
9. Set the new coordinate system with the right parameters:
a) Name: LbAzimEquiv45N105W b) ESPG custom code: 12345 c) Projection code: INTERNAL 11 d) Spheroid: WGS 84 e) Datum: WGS 84 f) Zone number: 0 g) Longitude and latitude of the projection center:
-1.8325957145940461E+000 7.8539816339744828E-001
h) False origin: 0,0
15
i) Calculation method: 2 j) Units: meters
10. Save the file.
11. Restart IIS (“IISRESET” in Windows console with admin rights).
Task 2: Create a new service in ERDAS APOLLO Essentials
1. Open the ERDAS APOLLO Essentials Console.
2. Create a new service by right clicking on “server”.
3. Add a folder with the data projected in your custom system.
4. Add EPSG:3857 to the Capabilities of the service in order to make it visible in the getCapabilities.
16 Adding a custom coordinate system to ERDAS APOLLO
5. Click “Apply”.
6. Click on WMS to get the service URL.
Task 3: Consume the service with Geospatial Portal
1. Open the Geospatial Portal: http://localhost/apollo-portal
17
2. Register new WMS by pasting the service URL created during the previous task.
3. Choose the layer to display.
4. Zoom to North America to see the image. See the effect of reprojection (Lambert azimuthal equal area reprojected in Transverse Mercator, EPSG:3857).
18 Adding a custom coordinate system to ERDAS APOLLO
The original projection of the image is Lambert Azimuthal Equal-Erea. It means that the area are preserve by the projection. In that projection, the image is rectangular.
Displaying the WMS in the Portal which uses per default ESPG:3857 (pseudo-mercator projection) shows how the north areas are expanded by a Mercator projection.
19
Adding a custom CRS to ERDAS APOLLO Advantage/Professional
Objective: ERDAS APOLLO Advantage/Professional is built on two levels: JBoss and IIS. The new CRS should be added for both.
Task 1: Add the custom CRS to JBoss
1. Create a XML file with a text editor and name it “usersref.xml”.
2. Copy and paste the following lines:
<?xml version="1.0" encoding="utf-8" ?>
<SREF>
</SREF>
3. Navigate to C:\Program Files\Hexagon\ERDAS APOLLO\jboss\standalone\deployments\erdas-
apollo.ear\erdas-apollo.war\WEB-INF\lib
4. Find “cots-srs.jar” and make a backup.
5. Open the jar file with an archive software (7-zip for instance).
6. Navigate to com\ionicsoft\sref\impl\resource\,
a) Open the “ionicsref.xml” and b) Look for a coordinate system with the same kind of projection (Lambert
azimuthal Equal Erea), copy one to clipboard.
20 Adding a custom coordinate system to ERDAS APOLLO
7. Copy the template projection parameters and paste them into the “usersref.xml” previously created between the SREF tags.
8. Set the right parameters (see “Tutorial Data Set” section) and save the file.
21
9. Open “coordinate_system_category.xml” with a text editor (same directory than “ionocisref.xml”).
10. Create a new category “Custom” inside the “Projected Coordinate Systems” and add the new coordinate system: name and code.
11. Replace the “coordinate_sytem_category.xml” and the “usersref.xml” in the jar file by the new ones.
22 Adding a custom coordinate system to ERDAS APOLLO
12. Save the jar file and restart the JBoss in Windows services.
When opening “factorysref.xml” check the comments in the beginning of the file to be sure the projection method used is not unsupported by ERDAS APOLLO Advantage.
23
Task 2: Add the custom CRS to the Data Manager
1. Copy the jar file and paste it to (“ProgramData” may be a hidden folder): C:\ProgramData\Hexagon\ERDAS APOLLO Data
Manager\Configuration\org.eclipse.osgi\bundles\7\1\.cp\li
b
2. Open the Data Manager to check if the new coordinate system is present:
a) Connect to the ERDAS APOLLO server, b) Create a new aggregate, c) Set the default SRS to ESPG:12345.
3. Close the Data Manager
Task 3: Add the custom CRS to IIS
1. Navigate to C:\Program Files\Common Files\Hexagon\Common\CSFStore
2. Open “example.csf”.
3. Define the Lambert Azimuthal Equal-Area coordinate system. See Exercise 1 and tutorial data set for the parameters.
24 Adding a custom coordinate system to ERDAS APOLLO
25
4. Save as “EPSG12345.csf”.
5. Go to <APOLLO_HOME>\tools\RegisterEPSGCodes\bin and copy
“EPSG12345.csf” there.
6. Run “RegisterEPSGCodes.exe”.
7. Write the EPSG code “12345”, register and restarts the application pools.
Task 4: Crawl and consume data
1. Open the Data Manager and crawl the custom projection image.
2. Add the image to the map to check if the reprojection is working.
3. Copy the APOLLO Catalog WMS URL: http://localhost/ApolloCatalogWMS/service.svc/get?service=WMS&version=1.3.0&request=getcapabilities
4. Enable the datasets level for the getCapabilities:
a) Go to general, b) Set “0” for the “WMS GetCapabilities Mode”, c) Wait or restart IIS (IISRESET in cmd with admin rights).
26 Adding a custom coordinate system to ERDAS APOLLO
5. Open a WMS viewer like Gaia.
6. Define a new WMS source and set the password.
7. Select the layer and add it to the map..
8. Check if the layer can be displayed.
Task 5: Add the custom SRS to the Geospatial Portal
1. Navigate to C:\Program Files\Common Files\Hexagon\CSFStore.
2. Open “CRSConfig.xml” with a text editor.
27
3. Find the “Projected Coordinate Systems” section.
4. Add the custom coordinate system by copy-paste an existing system.
5. Set the name, the EPSG code, etc.
6. Set the extent: lat. 0°N to 70°N and long. 160°W to 40°W.
7. Set the parameters (projection, datum) using the “proj4js” format:
a) Go to http://spatialreference.org/ref/epsg/ b) Find a CRS with the same projection: e.g. EPSG:3035 (got from
factorysref.xml, task 1.) c) Click “Proj4” to get the code
d) Copy it. e) Paste the proj4 code at the right place. f) Modify the code to set the right parameters:
+proj=laea +lat_0=45 +lon_0=-105 +x_0=0 +y_0=0
+ellps=WGS84 +units=m +no_defs
28 Adding a custom coordinate system to ERDAS APOLLO
8. Save the file.
9. Launch the Geospatial Portal: http://localhost/apollo-portal/
10. Log in.
11. Browse the catalog to the data.
12. Click on the extent to see if the CRS is supported.
13. Add the image to the map.
14. Go to settings and check in the SRS list if the new coordinate system is present.
29