Map Catalog| Sort maps by resolution, does not work properly for some BSBs
Jake
Global Mapper UserTrusted User
Windows 7 64bit, GM14.2 (I suspect V15 or V16 beta may still have this bug therefore I am mentioning it)
When I load a series of BSBs into a map catalog and sort by resolution many of the BSBs do not sort properly. See attached image after applying the sort. As you can see the 2nd in the list should be 3rd, the 8th should be 7th etc.
It appears to afflict BSB with odd scales. The only thing that I suspect is non integer DX and DY values in the KAP headers are being read or sorted incorrectly.
The source files can be obtained here but all BSB collections exhibit this same problem.
Chart Downloader for NOAA RNC®
map_cat_sort.png
When I load a series of BSBs into a map catalog and sort by resolution many of the BSBs do not sort properly. See attached image after applying the sort. As you can see the 2nd in the list should be 3rd, the 8th should be 7th etc.
It appears to afflict BSB with odd scales. The only thing that I suspect is non integer DX and DY values in the KAP headers are being read or sorted incorrectly.
The source files can be obtained here but all BSB collections exhibit this same problem.
Chart Downloader for NOAA RNC®
map_cat_sort.png
Comments
-
Hello Jake,
If you turn them on by percent then you can sort by scale so the smaller scale charts draw first. You could also have separate map catalogs set up for different scale ranges. Please let me know if the 'Sort by Resolution' does not work if you 'Display by Pixel'. I have logged a ticket (ID# 14396) to have a developer take a look at the sorting here. Smaller scale could be lower resolution - and perhaps either Sort option can work with either Display option.
Regards,
Jasmine -
The issue with the sorting is that the actual size of the pixels on the ground in the Arctic charts is actually smaller than in a more southerly chart even if the chart further from the pole has a larger scale. For example, in that sample the 1:10M North Pacific chart has pixels that cover about 113,315 sq m on the ground while the 1:4.86M San Diego Chart has pixels covering 124,662 sq m. This is because the pixel size is a fixed number of Mercator meters for each scale, which means the pixels get small in the X direction as you approach the poles.
I have updated the sorting to use a smarter metric when everything uses the same projection system which now results in the desired sorting. I have placed new builds with the latest changes at the links below:
32-bit: http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper16.zip
64-bit: http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper16_64bit.zip
Simply download the .zip file for the build that you are using and extract over your existing installation files. The likely locations to extract to are as follows:
32-bit: C:\Program Files (x86)\GlobalMapper16
64-bit: C:\Program Files\GlobalMapper16_64bit
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.comh
ttp://www.bluemarblegeo.com/ -
Sorry for the delay in responding. I completely forgot about this post. Thanks for all the help. I will be getting V16 next week so I will be able to test it out then.
-
The bug is still present in V16. Also I now have another bug as described below. I will add more info as I figure it out.
I have V16 (b102814) running now and I am trying to figure out why some of my catalogs are not showing me any maps. The dataset mentioned above does not work either. Even if I select "Always Show Map if in View" the maps to not draw. The outlines appear and the paths to the files are valid.
I tried recreating the GMC in V16 since I create the original GMC in V14. But the result was the same. I also had one of my GMC become 0 bytes so there is definitely something bugging going on.
I thought it might be a 180 meridian issue but other GMC that do not cross this meridian are also not drawing. Then I thought it might be the extreme range in scales. The smallest scale is 10 million. The largest is 2500. Please check this.
The US KAPs total 3.5GB. The resulting GMC is 10.5MB. Here is the metadata from the GMC.
FILENAME=D:\boundaries\RNC_US.gmc
DESCRIPTION=RNC_US
UPPER LEFT X=-179.6897364230
UPPER LEFT Y=74.9152798527
LOWER RIGHT X=179.9667853817
LOWER RIGHT Y=10.6622997517
WEST LONGITUDE=179° 41' 23.0511" W
NORTH LATITUDE=74° 54' 55.0075" N
EAST LONGITUDE=179° 58' 00.4274" E
SOUTH LATITUDE=10° 39' 44.2791" N
UL CORNER LONGITUDE=179° 41' 23.0511" W
UL CORNER LATITUDE=74° 54' 55.0075" N
UR CORNER LONGITUDE=179° 58' 00.4274" E
UR CORNER LATITUDE=74° 54' 55.0075" N
LR CORNER LONGITUDE=179° 58' 00.4274" E
LR CORNER LATITUDE=10° 39' 44.2791" N
LL CORNER LONGITUDE=179° 41' 23.0511" W
LL CORNER LATITUDE=10° 39' 44.2791" N
PROJ_DESC=Geographic (Latitude/Longitude) / WGS84 / arc degrees
PROJ_DATUM=WGS84
PROJ_UNITS=arc degrees
EPSG_CODE=EPSG:4326
COVERED AREA=209780369.279 sq km
PIXEL WIDTH=0.0000014 arc degrees
PIXEL HEIGHT=0.0000014 arc degrees
BIT DEPTH=24
MAPS IN CATALOG=1358 -
OK GM just crashed and took my GMW with it. The filesize is now 0 bytes. I will now go back to a backup from yesterday and continue to troubleshoot.
-
Creating the map catalog in V16 (b112614) yields this error message after scanning the folder. But the remaining charts are now drawing. Albeit slowly. I suspect he one below are non-georeferenced covers etc.
Error loading BSB file \maps\RNC\US_RNC\12352\12352_8.KAP
Error loading BSB file \maps\RNC\US_RNC\12364\12364_24.KAP
Error loading BSB file \maps\RNC\US_RNC\12372\12372_19.KAP
Error loading BSB file \maps\RNC\US_RNC\13221\13221_2.KAP
Error loading BSB file \maps\RNC\US_RNC\13229\13229_15.KAP
Error loading BSB file \maps\RNC\US_RNC\14786\14786_79.KAP
Error loading BSB file \maps\RNC\US_RNC\14786\14786_80.KAP
Error loading BSB file \maps\RNC\US_RNC\14786\14786_81.KAP
Error loading BSB file \maps\RNC\US_RNC\14786\14786_82.KAP
Error loading BSB file \maps\RNC\US_RNC\14786\14786_83.KAP
Error loading BSB file \maps\RNC\US_RNC\14786\14786_84.KAP
Error loading BSB file \maps\RNC\US_RNC\14786\14786_85.KAP
Error loading BSB file \maps\RNC\US_RNC\14786\14786_86.KAP
Error loading BSB file \maps\RNC\US_RNC\14786\14786_87.KAP
Error loading BSB file \maps\RNC\US_RNC\14786\14786_88.KAP
Error loading BSB file \maps\RNC\US_RNC\14842\14842_45.KAP
Error loading BSB file \maps\RNC\US_RNC\14842\14842_46.KAP
Error loading BSB file \maps\RNC\US_RNC\14842\14842_47.KAP
Error loading BSB file \maps\RNC\US_RNC\14842\14842_48.KAP
Error loading BSB file \maps\RNC\US_RNC\14842\14842_49.KAP
Error loading BSB file \maps\RNC\US_RNC\14842\14842_50.KAP
Error loading BSB file \maps\RNC\US_RNC\14842\14842_51.KAP
Error loading BSB file \maps\RNC\US_RNC\14846\14846_39.KAP
Error loading BSB file \maps\RNC\US_RNC\14846\14846_40.KAP
Error loading BSB file \maps\RNC\US_RNC\14846\14846_41.KAP
Error loading BSB file \maps\RNC\US_RNC\14846\14846_42.KAP
Error loading BSB file \maps\RNC\US_RNC\14846\14846_43.KAP
Error loading BSB file \maps\RNC\US_RNC\14846\14846_44.KAP
Error loading BSB file \maps\RNC\US_RNC\14853\14853_48.KAP
Error loading BSB file \maps\RNC\US_RNC\14853\14853_49.KAP
etc ... -
OK another issue. This is with 'Map Bounding Boxes'. If I check the box 'Show When Maps Not Displayed' they draw on top of the maps that are displayed, obscuring the underlying 'shown' map. I currently have the bounding boxes drawn as fill with transparency set to 20%.
-
Another one.
When to Display Maps does not respect the high end value (overzoom). So when I enter Between 25 and 800, it is actually stops drawing at 80%. If I enter 8000 it stops at 800%. This seems to be just a shifted decimal place. -
I think your earlier issues were just problems in that build. For the map catalog drawing, currently the map bounding boxes are drawn on top of any other data that is drawn from the map catalog. That way you can see where more detailed maps exist in the catalog that aren't drawn yet on top of smaller scale charts that cover large areas. Are you see map boxes for maps that are also being drawn or only for those that aren't drawn yet based on the scale requirements?
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation -
Using the 112614 build,
1. Scale sort issue is still present. The top (lowest resolution) charts are sorted as follows:
10,000,000
4,860,700
10,000,000
3,500,000
3,500,000
3,500,000
2,100,000
3,500,000
1,587,870
Looking inside the XML you can see they are not sorted properly.
2. The "Map Box is % Display Size" is also not correct for this build either.
3. As for the Bounding boxes they are still drawing. Small scale chart bounding boxes will draw over a large scale chart content. The reverse (i.e. showing insets) is useful but not this as small scale charts will always appears overtop large scale.
I would upload the GMC file but at 10.5MB it seems it is too large for the forum. If there is another way let me know. You will need to mirror my path or edit the GMC to reflect your local path. -
The scale issue is because the sorting is by the actual size of a pixel on the ground for each map and not the reported scale number. Typically those are the same so the maps would be ordered the same by scale and resolution. However as some of your charts are near the pole the reported scale value is way off from actual ground truth as it uses Mercator meters which are very distorted as you near the poles. So a map of 1:10M scale near the the pole has vastly different size pixels on the ground than a 1:10M scale chart near the equator, so much so that a 1:4.5M chart near the equator actually has large pixels on the ground than a single pixel in a 1:10M scale chart near the pole, hence the odd-looking ordering.
I have not been able to reproduce the Map Box % issue with large values. I see 800% not drawing the map when beyond 8 times the size of the display and 8000% percent stopping at 80 times the display.
I do now understand the issue with bounding boxes showing up when you are showing maps in a range of zoom scales/resolutions and you have zoomed in too far for a particular map to display. I have updated the bounding boxes to only draw when you aren't zoomed in far enough but not when zoomed in too far to show the map data. This should mean you only see larger scale chart bounding boxes over displayed smaller scale charts.
I have placed new builds with the latest changes at the links below:
32-bit: http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper16.zip
64-bit: http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper16_64bit.zip
Simply download the .zip file for the build that you are using and extract over your existing installation files. The likely locations to extract to are as follows:
32-bit: C:\Program Files (x86)\GlobalMapper16
64-bit: C:\Program Files\GlobalMapper16_64bit
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation -
Link does not work.
-
That is strange, if I click the links they take you to the Blue Marble home page, but if I right-click and say 'Copy Link Location' then paste that in the browser address bar the link is correct and works. For example the correct 64-bit link is:
http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper16_64bit.zip
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.comh
ttp://www.bluemarblegeo.com/ -
I've figured it out now, have to disable automatic parsing of links.
I have placed new builds with the latest changes at the links below:
32-bit: http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper16.zip
64-bit: http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper16_64bit.zip
Simply download the .zip file for the build that you are using and extract over your existing installation files. The likely locations to extract to are as follows:
32-bit: C:\Program Files (x86)\GlobalMapper16
64-bit: C:\Program Files\GlobalMapper16_64bit
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
http://www.bluemarblegeo.com/ -
I am still encountering problems. Maps not appearing at all now and the system freezes for minutes at a time doing minor things like unselecting one chart from the list or changing the bounding box colors. I will try rebuilding the catalog from scratch. I suspect I have too many items in the catalog. Currently the catalog holds about 1500 RNCs.
-
As soon as I hit the 14 series RNCs it bogged down. The catalog is only 3.7MB and it freezes many minutes if you do anything to the options. For example, when I sort the map list it reports it is reprojecting which takes a couple of minutes. If I change the color of the bounding box same thing. If I change the "When to Display Size" it reprojects.
So only opening that single 3.7MB map catalog (550 charts) GM uses up to 3GB of memory.
I also noticed that in the metadata for the catalog the bit-depth is reported as 24. Since these are RNCs the colors palette is normally 8 bit and then usually less than 16 colors. I will continue to poke around and see what I can discover.
PS: Another RNC catalog I have is 1MB and 146 charts. It does not appear to be reprojecting. All catalog are using the default projection which is Geographic. The meta data also indicated this. -
Closing the above created GMCs and opening them results in NO charts being shown no matter what scale. The bounding boxes appear but not the actual chart content.
-
Definitely an issue with the latest build. I opened the problematic catalog in V14 and it took only a few seconds to display not minutes. Also the charts appear in V14 but they do not in V16.
-
I took a look at some large catalogs that I have and was able to greatly improve the speed of sorting large map lists and saving the changes on the map catalog options dialog. I also found an issue that could cause major slowdowns drawing the map boxes if you have some maps covering large areas that are reprojected. This is likely the cause of your problems and I've got that fixed.
If it still fails can you perhaps send one of the .gmc files (zipped up) so that I can see what is happening with yours? How large would a file with your smaller catalog and the associated charts be? Any way you could get that to me so I could get to the bottom of this problem in case just the .gmc isn't enough to help me?
I have placed new builds with the latest changes to speed up the sorting at the links below:
32-bit: http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper16.zip
64-bit: http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper16_64bit.zip
Simply download the .zip file for the build that you are using and extract over your existing installation files. The likely locations to extract to are as follows:
32-bit: C:\Program Files (x86)\GlobalMapper16
64-bit: C:\Program Files\GlobalMapper16_64bit
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation -
Super thanks! I think the reprojection issue was what was causing the issue. I should be able to tell you today if this build helped. If not I will definitely send you the zipped GMC. It is only 3.5MB unzipped.
I should have mentioned this before but I have very large vector catalogs (1700 maps, 6.5 million features) and they remained relatively unaffected by slowdowns. -
On a related note, is it possible to recurse through folders when scripting and using the EDIT_MAP_CATALOG function? I already use a wildcard (5*.kap, 12*.kap etc) for the filename but I need it to search subfolders as well. Basically the same option that the GUI gives you.
The scripting reference does not mention this and I thought that perhaps there is a way I can use RECURSE_DIR in conjunction with the wildcard. -
I figured out my last post. Here is my crude script in case anyone else wants to do the same. Just change the DIRECTORY and FILENAME value.
GLOBAL_MAPPER_SCRIPT VERSION=1.00
UNLOAD_ALL
// US RNCs
// Creates a map catalogs from a folder of RNCs.
// Maps will show when they take up at least 25% of screen to a maximum of 800%.
DIR_LOOP_START DIRECTORY="D:\maps\RNC\US_RNC\" FILENAME_MASKS="5*.kap" RECURSE_DIR=YES
EDIT_MAP_CATALOG FILENAME="D:\boundaries\RNC_US_Series_05.gmc" CREATE_IF_EMPTY=YES \
ADD_FILE="%FNAME_W_DIR%" ZOOM_DISPLAY="PERCENT,0.25,8"
DIR_LOOP_END -
No luck with the latest build. Still multiple minutes to open 1 catalog and no maps appearing when zooming in. Here is the zipped GMC file.
-
Thanks for the file, I was able to reproduce the slowness and find a major new issue added a few weeks ago that slowed reprojections on load down tremendously in many cases. It only affected map catalogs where the maps in the catalog didn't all use the same projection. I've fixed this issue and now your catalog loads and displays just as fast as it did before.
I have placed new builds with the latest changes at the links below:
32-bit: http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper16.zip
64-bit: http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper16_64bit.zip
Simply download the .zip file for the build that you are using and extract over your existing installation files. The likely locations to extract to are as follows:
32-bit: C:\Program Files (x86)\GlobalMapper16
64-bit: C:\Program Files\GlobalMapper16_64bit
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation -
Awesome support Mike. I will be running it tomorrow and will let you know if anything pops up. Cheers and good night.
-
There is still the issue with no maps being drawn.
Create the catalog, close Global Mapper, running GM again and opening the GMC
No maps are being drawn. I ams using the default zoom and display settings. I will try with a single KAP and see what happens. -
Here is a test catalog with just 2 maps that won't draw at any zoom level. The outlines appear (and disappear) but will not show the actual map. I have included the 2 KAP files referenced in the GMC file.
1. Save ZIP file to your computer.
2. Open the file CATALOG.GMC and add the two KAP files (since the path will be different on your machine)
3. Close GM.
4. Open GM.
5. Open CATALOG.GMC
6. Try viewing the map content by zooming in or out. -
In case it help troubleshooting...
Selecting Always Show Map if in View does not show any map eithers for the test catalog. -
FYI: I tried GM build b121614 and the raster catalog still did not draw at all. I ama using all the default settings. Bounding box draws but not the content KAPs.
Is there any troubleshooting I can do in the meantime? As I mentioned the same catalog draws properly in V14. -
Any update on this? I am willing to try different suggestions or workarounds. Right now I can't use any of my KAP catalogs in V16 and have resorted to loading them individually. They do work in V14.
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website