Closed minghia closed 6 months ago
Hi Minghia,
The debug mechanism in OpenMap back in 4.6.5 was based on an internal class. If you look in the source code for the VPFLayer, you’ll see references to Debug.debugging(“vpf”) or some other keyword than “vpf”, like “vpfdetail”. Those debug statements can be triggered by adding a -Ddebug.vpf or -Ddebug.vpfdetail argument to the java command launching your application. It’s a java argument, so they go before the main class and the arguments to the main class in that launching statement.
If you let me know what the properties for the VPFLayer are, I can try to figure out what’s going on. Any layer (OMGraphicHandlerLayer) can respond to properties that limit what scales it responds to.
Actually, looking at the javadoc for the VPFLayer, there is a cutoffScale property that may be causing your issue. You might want to set that number to something lower than the default. I thought that caused the change from browse-level data to detailed data, but that might be something to check with the debug output.
Hope this helps,
Don
On Apr 6, 2024, at 05:23, minghia @.***> wrote:
We're running 4.6.5 on CentOS 6 and we are noticing some issues when zooming our map in and out. We use a base range of 1024 nautical miles on the map and the map appears. If I scale out to a 2048 nautical mile the VPF layer disappears but if we turn on our Level 1 DTED data layer it appears at all our scales. I have a similar issue at smaller than 1024 nautical miles. I have tried to debug OpenMap but I see prepare is called on both the VPF layer and the DTED layer but I don't know enough about VPF to determine what is going on. We only display the coastline from the VMAP data that we have. We also have some of our in house built layers which displays some of our own datasets and they disappear when the scale is down to a diameter of 1 nautical mile. This data are in a format that we have created for displaying a small region of different shaped ocean bottom. It is at most a square kilometre so it should be visible at our 1 nautical mile but it also disappears. Is there some debug option I can turn on to see what's happening on the VPF layer? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi Don, Thanks for getting back to me. Originally we were only display the VMAP layer to a range of 1024 nautical miles, but somebody decided to have a bigger range of 16384 nautical miles. It appears that somebody may not have changed the cutoff scale. Does the DTED layer has similar limiting cutoff points? Unfortunately I won't be able try anything to till I go back into the office on Tuesday. I will let you know how I get on.
Tony
Hi Tony,
The DTEDLayer doesn’t have scale limitations by default, it tries to do the best it can with whatever level of DTED it’s been told to display. The VPFLayer does a lot more work for a given scale going through all the tiles and picking out the requested features, I think that’s why the original author added that cutoffScale setting.
-Don
On Apr 13, 2024, at 01:42, minghia @.***> wrote:
Hi Don, Thanks for getting back to me. Originally we were only display the VMAP layer to a range of 1024 nautical miles, but somebody decided to have a bigger range of 16384 nautical miles. It appears that somebody may not have changed the cutoff scale. Does the DTED layer has similar limiting cutoff points? Unfortunately I won't be able try anything to till I go back into the office on Tuesday. I will let you know how I get on. Tony — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Hi Don, We only use what I believe is the World Vector Shoreline Plus data but I am unsure what maximum scale the data supports but I do remember seeing the majority of the world when we zoomed out to our maximum range. Looking at one of the properties files that we use, it appears that we are using the defaullt.
Is it difficult to update from 4.6.5 to the latest release of OpenMap whatever that is?
Once again thanks for your help.
Tony
This is the output from the scaling out and then back in: `# This is the original values before zooming. Our openmap.properties file has openmap.scale=12800000f
VPFLayer.getRectangle(): read time: 0.001 seconds DTEDLayer: emptying cache! DTEDLayer: emptying cache! VPFLayer.getRectangle: bnd VPFLayer.getRectangle(): calling draw with boundaries: LatLonPoint[lat=-26.517859,lon=141.24298] LatLonPoint[lat=-43.62723,lon=160.15335] Library selection table coverage: bnd Library selection table - edges: true Library selection table - text: false Library selection table - areas: true Warehouse: com.bbn.openmap.layer.vpf.VPFLayerGraphicWarehouse@6cf72045 Warehouse: cutoff scale 31000000 LST.drawTile() with scale of 12800000 # 1024 nautical miles LST: checking library: eurnasia LST: checking library: sasaus Using cached CoverageTable for bnd: Boundaries Using coverage table for bnd sasaus EdgeTable(): /landmasses/VMAP/v0sas_5/vmaplv0/sasaus/bnd/y/e/edg Warehouse.createEdge(): edgeFeatures = coastl Warehouse: Coastline/Shoreline (BA010); Accurate; Definite; 33; 1 EdgeTable(): /landmasses/VMAP/v0sas_5/vmaplv0/sasaus/bnd/x/e/edg EdgeTable(): /landmasses/VMAP/v0sas_5/vmaplv0/sasaus/bnd/x/d/edg EdgeTable(): /landmasses/VMAP/v0sas_5/vmaplv0/sasaus/bnd/y/c/edg LST: checking library: noamer LST: checking library: soamafr Using cached CoverageTable for bnd: Boundaries Using coverage table for bnd soamafr EdgeTable(): /landmasses/VMAP/v0soa_5/vmaplv0/soamafr/bnd/x/d/edg Warehouse.createEdge(): edgeFeatures = coastl Warehouse: null LST: checking library: rference VPFLayer.getRectangle(): read time: 0.143 seconds VPFLayer.getRectangle(): proj time: 0.01 seconds VPFLayer.getRectangle: bnd VPFLayer.getRectangle(): calling draw with boundaries: LatLonPoint[lat=-17.08594,lon=132.25513] LatLonPoint[lat=-53.01563,lon=169.10608] Library selection table coverage: bnd Library selection table - edges: true Library selection table - text: false Library selection table - areas: true Warehouse: com.bbn.openmap.layer.vpf.VPFLayerGraphicWarehouse@6cf72045 Warehouse: cutoff scale 31000000 LST.drawTile() with scale of 25600000 # 2048 nautical miles the coastline disappears LST: checking library: eurnasia LST: checking library: sasaus Using cached CoverageTable for bnd: Boundaries Using coverage table for bnd sasaus EdgeTable(): /landmasses/VMAP/v0sas_5/vmaplv0/sasaus/bnd/y/e/edg Warehouse.createEdge(): edgeFeatures = coastl Warehouse: Coastline/Shoreline (BA010); Accurate; Definite; 33; 1 EdgeTable(): /landmasses/VMAP/v0sas_5/vmaplv0/sasaus/bnd/w/e/edg EdgeTable(): /landmasses/VMAP/v0sas_5/vmaplv0/sasaus/bnd/x/e/edg EdgeTable(): /landmasses/VMAP/v0sas_5/vmaplv0/sasaus/bnd/w/d/edg EdgeTable(): /landmasses/VMAP/v0sas_5/vmaplv0/sasaus/bnd/x/d/edg EdgeTable(): /landmasses/VMAP/v0sas_5/vmaplv0/sasaus/bnd/y/c/edg EdgeTable(): /landmasses/VMAP/v0sas_5/vmaplv0/sasaus/bnd/x/c/edg LST: checking library: noamer LST: checking library: soamafr Using cached CoverageTable for bnd: Boundaries Using coverage table for bnd soamafr EdgeTable(): /landmasses/VMAP/v0soa_5/vmaplv0/soamafr/bnd/w/d/edg Warehouse.createEdge(): edgeFeatures = coastl Warehouse: null EdgeTable(): /landmasses/VMAP/v0soa_5/vmaplv0/soamafr/bnd/x/d/edg EdgeTable(): /landmasses/VMAP/v0soa_5/vmaplv0/soamafr/bnd/w/c/edg EdgeTable(): /landmasses/VMAP/v0soa_5/vmaplv0/soamafr/bnd/x/c/edg LST: checking library: rference VPFLayer.getRectangle(): read time: 0.121 seconds VPFLayer.getRectangle(): proj time: 0.005 seconds VPFLayer.getRectangle: bnd VPFLayer.getRectangle(): calling draw with boundaries: LatLonPoint[lat=-30.688835,lon=145.94846] LatLonPoint[lat=-39.452175,lon=155.46625] Library selection table coverage: bnd Library selection table - edges: true Library selection table - text: false Library selection table - areas: true Warehouse: com.bbn.openmap.layer.vpf.VPFLayerGraphicWarehouse@6cf72045 Warehouse: cutoff scale 31000000 LST.drawTile() with scale of 6400000 # 512 nautical miles, the coastline is present LST: checking library: eurnasia LST: checking library: sasaus Using cached CoverageTable for bnd: Boundaries Using coverage table for bnd sasaus EdgeTable(): /assip/game/landmasses/VMAP/v0sas_5/vmaplv0/sasaus/bnd/x/d/edg Warehouse.createEdge(): edgeFeatures = coastl Warehouse: null EdgeTable(): /assip/game/landmasses/VMAP/v0sas_5/vmaplv0/sasaus/bnd/y/c/edg LST: checking library: noamer LST: checking library: soamafr Using cached CoverageTable for bnd: Boundaries Using coverage table for bnd soamafr EdgeTable(): /assip/game/landmasses/VMAP/v0soa_5/vmaplv0/soamafr/bnd/x/d/edg Warehouse.createEdge(): edgeFeatures = coastl Warehouse: null LST: checking library: rference VPFLayer.getRectangle(): read time: 0.017 seconds VPFLayer.getRectangle(): proj time: 0.001 seconds ` The only values that appear to change are the times and the scale. I tried to debug this and couldn't make any headway with this. As far as I can tell the doPrepare is being called in ever instance but the view range >= 2048 the coastline disappears. It might be a bug in our software as I've tried it on some branches of our code and it works. Others like this branch it doesn't.
It turns out our code was setting the VPF layer to be invisible when the range got greater than 2048.Thanks for your time.
Hi Tony,
I’m really glad you got that sorted, I was going to dig into your debugging output this morning.
If you wanted to upgrade the version of you use, OpenMap 5.1.15 that’s on the website should be directly in your upgrade path with minimal changes. I’ve tagged a version 6.0 in git, but I got stuck uploading it into a Maven repo a while back and got sidetracked from making an official release updated on the website. Moving to 6.0 isn’t difficult, especially with the help of an IDE.
Thanks for letting me know about the resolution,
-Don
On Apr 18, 2024, at 07:53, minghia @.***> wrote:
It turns out our code was setting the VPF layer to be invisible when the range got greater than 2048.Thanks for your time. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
The rest of Java interface has moved to JavaFx but there aren't any newer toolkits that support the mapping datasets we use . If you were thinking of moving to use a newer version of Java that supports JavaFx. You wouldn't have to necesarily change the rendering side of things the JavaFx Properties may simplify some of the existing code.
Maven is no use to use as we develop on a system that has access to the internet. Once again, thanks for you help.
We're running 4.6.5 on CentOS 6 and we are noticing some issues when zooming our map in and out. We use a base range of 1024 nautical miles on the map and the map appears. If I scale out to a 2048 nautical mile the VPF layer disappears but if we turn on our Level 1 DTED data layer it appears at all our scales. I have a similar issue at smaller than 1024 nautical miles. I have tried to debug OpenMap but I see prepare is called on both the VPF layer and the DTED layer but I don't know enough about VPF to determine what is going on. We only display the coastline from the VMAP data that we have. We also have some of our in house built layers which displays some of our own datasets and they disappear when the scale is down to a diameter of 1 nautical mile. This data are in a format that we have created for displaying a small region of different shaped ocean bottom. It is at most a square kilometre so it should be visible at our 1 nautical mile but it also disappears. Is there some debug option I can turn on to see what's happening on the VPF layer?