OpenMap-java/openmap

Incorrect north west latitude of RpfCoverageBox

mg629 opened this issue · 10 comments

mg629 commented

I am converting CADRG to TMS and in the method makeTiles of MapTileMaker, I am getting back an incorrect north west latitude for the RpfCoverageBox but am not sure why.

public Rectangle2D makeTiles(RpfLayer rpfLayer) {
final Proj proj = new Mercator(new LatLonPoint.Double(), 50000, TILE_SIZE, TILE_SIZE);

   Vector<RpfCoverageBox> coverage = rpfLayer.getFrameProvider().getCoverage(90f, -180f, -90f, 180f, proj);
   
   for (RpfCoverageBox box : coverage) {
         // nw_lat value is coming out as 64.0046 when it should be 65.25
         nw_lat = box.nw_lat; (64.0046)
         
         // the following values are coming out correct I believe
         nw_lon = box.nw_lon; (-151.266)
         se_lat = box.se_lat; (59.861)
         se_lon = box.se_lon; (-143.77) 
   }

}

I have attached the CADRG specs from the A.TOC files at each level (50, 100, 250).
alaska_large_250_atoc
alaska_large_100_atoc
alaska_large_50_atoc
At this time I am not able to upload the full CADRG folders and files but might be able to do so in pieces if its needed.

mg629 commented

Correct, the A.TOC file came with the data.

Attach is the output of RpfTocHandler for 50, 100, and 250 RPF directories.
alaska_50
alaska_100
alaska_250

mg629 commented

The reason I started looking into the issue is my converted tms when loaded into a cesium viewer does not seem to display the full extent of the terrain. The tms on the cesium viewer map has upper left corner of 64.0046, -151.266.
According to the people who gave me the CADRG, the terrain should encompass Fairbanks which would be more like a upper left corner of 65.25, -151.266.
I noticed my min extents and max extents in my tms.json file after conversion was (min ext Lat=59.8619, Lon=-151.266 and max extent Lat=64.006, Lon=-143.7709).
It seems like the max extent should be Lat= 65.25?

mg629 commented

I let the RpfLayer choose which chart type should be displayed at different TMS zoom levels.

mg629 commented

Don, do you have any recommendations?
Should I try to create TMS tiles for each chart type? (not sure how to do that yet)
Would that help?

mg629 commented

Any help is appreciated. Thank you.
I will read through the link you supplied.

mg629 commented

Don,
Would you happen to have a release date already determined for the 6.0 branch?