Showing results for 
Search instead for 
Do you mean 

Workaround for adding custom ESPG to vector dataset (Apollo 2018)

by Technical Evangelist ‎04-06-2018 12:30 PM - edited ‎04-06-2018 12:31 PM (527 Views)

 

There is an known issue for Apollo 2018, user's custom EPSG code doesn't work with crawled vector data, WMS rendering will not work. The same custom EPSG will work with crawled raster images.

 

 

The following workflow will provide workaround for this issue.

 

 
  1. Follow the ERDAS APOLLO Server User Guide to add a custom CRS(e.g., usersref.xml, coordinate_system_category.xml, epsg.plb...) .
    https://hexagongeospatial.fluidtopics.net/reader/GnhUWdGwEimDnas8OgXLDQ/CuYI~SGB2ntXWUZda587tw
    ERDAS APOLLO Server User Guide->Coordinate Reference Systems->Adding a Custom SRS
      NOTE: there is currently a document typo, the location of epsg.plb file has been changed in Apollo 2018 release. Here is the correct location for epsg.plb file:
    C:\Program Files\Hexagon\ERDAS APOLLO\lib\etc\projections\epsg.plb 
  2. Once customer CRS has been added to Apollo, then change Apollo Decoding Service web.config log4net level value to "DEBUG".
    1. Edit "C:\Program Files\Hexagon\ERDAS APOLLO\DecodingService\Web.config"
    2. Example:

      1. <root>
        <level value="DEBUG"/>
        <appender-ref ref="RollingFileAppender"/>
        </root>

    3. Recycle the DecodingService app pool by executing "C:\Program Files\Hexagon\ERDAS APOLLO\tools\RegisterEPSGCodes\bin\RegisterEPSGCodes.exe" and then select the button to recycle IIS App Pools.

  3. Using Apollo's Data Manager application, crawl a shapefile with the custom CRS.
    1. If you open the file, C:\Program Files\Hexagon\ERDAS APOLLO\log\TOMCAT-server.log, you will probably find an error message, 'native crs id is null'.
  4. Change location to the "C:\Program Files\Hexagon\ERDAS APOLLO\log" folder and view the decodingService.log file. 
    1. Search for the string "GetNativeCS"
    2. The module, Intergraph.Apollo.DecodingService.Repository.CGPExtensions, records debug messages and should display something similar to the following:
      epsgCode=EPSG:99999 (your custom code)
      GetNativeCS
      Retrieving crs id for moniker: 1,1,0,13/1024,1/2048,32767/2050,6326/3072,32767/3074,32767/3075,1/3076,9001/3080,29.000000000000007/3081,0.0/3082,0.0/3083,2600000.0/3092,1.0/4096,5773 and crsIdType:EPSG.

    3. Copy the moniker string, "1,1,0,13/1024,1/2048,32767/2050,6326/3072,32767/3074,32767/3075,1/3076,9001/3080,29.000000000000007/3081,0.0/3082,0.0/3083,2600000.0/3092,1.0/4096,5773" and save it.

  5. Change location to C:\Program Files\Hexagon\ERDAS APOLLO\lib\cphome\x64URelease\bin\Config folder.
    1. Edit EPSGMonikerMapping.xml file. Scroll to the bottom of the file. Copy the last group starting at <EPSGCode>...</EPSGCode> and duplicate it in the file.
    2. Example:
      1. <EPSGCode>
        <number>4240</number>
        <moniker>1,1,0,2/1024,2/2048,4240</moniker>
        </EPSGCode>

    3. Replace the existing number value with the custom EPSG code.
    4. Replace the existing moniker value with the moniker you copied from the decoding service log file.
      For example:
      <EPSGCode>
      <number>20533</number>
      <moniker>1,1,0,13/1024,1/2048,32767/2050,6326/3072,32767/3074,32767/3075,1/3076,9001/3080,29.000000000000007/3081,0.0/3082,0.0/3083,2600000.0/3092,1.0/4096,5773</moniker>
      </EPSGCode>
    5. Save the EPSGMonikerMapping.xml file.
  6. Restart Tomcat and IIS.
  7. Crawl the shape file with custom CRS again in Data Manager and the new moniker should be picked up. Verify by adding the shapefile with the custom CRS to the map in Data Manager. The geometry of the Shapefile features should display.
    NOTE: user need to crawl the shapefile again, the workaround will not fix WMS rendering issue for already crawled shapefile.
Contributors