Skip to content

Commit

Permalink
Crane rule updates, PSWG #75, PC #106
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikan Stamenkovich committed Sep 28, 2022
1 parent a4bcb86 commit e64dd2e
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 42 deletions.
72 changes: 31 additions & 41 deletions PortrayalCatalog/Rules/Crane.lua
Original file line number Diff line number Diff line change
@@ -1,56 +1,46 @@
-- Converter Version: 0.99
-- Feature Catalogue Version: 1.0.0 (2019/4/9)
-- FC 1.0.1: manually changed visuallyConspicuous to visualProminence

-- NIWC LANT Modified from: Crane portrayal dKart rules file.
-- Feature Catalogue Version: 1.0.1 (2021/11/03) and later
-- dKart improvment: Determine S-101 portrayal for Crane curve feature and visual conspicuous.
--
-- Issues: PSWG #75, PC #106
--
-- Crane main entry point.
function Crane(feature, featurePortrayal, contextParameters)
local viewingGroup

local viewingGroup = 32440
local symbol = '1'
local colour = 'LANDF'

if feature.visualProminence == 1 then
viewingGroup = 22220
symbol = '3'
colour = 'CHBLK'
end

if feature.PrimitiveType == PrimitiveType.Point then
-- Simplified and paper chart points use the same symbolization
viewingGroup = 32440
if contextParameters.RadarOverlay then
featurePortrayal:AddInstructions('ViewingGroup:32440;DrawingPriority:12;DisplayPlane:OverRADAR')
featurePortrayal:AddInstructions('ViewingGroup:'.. viewingGroup .. ';DrawingPriority:12;DisplayPlane:OverRADAR')
else
featurePortrayal:AddInstructions('ViewingGroup:32440;DrawingPriority:12;DisplayPlane:UnderRADAR')
end
featurePortrayal:AddInstructions('PointInstruction:CRANES01')
elseif feature.PrimitiveType == PrimitiveType.Surface and contextParameters.PlainBoundaries then
if feature.visualProminence == 1 then
viewingGroup = 22220
featurePortrayal:AddInstructions('ViewingGroup:22220;DrawingPriority:12;DisplayPlane:UnderRADAR')
featurePortrayal:AddInstructions('ColorFill:CHBRN')
featurePortrayal:SimpleLineStyle('solid',0.32,'CHBLK')
featurePortrayal:AddInstructions('LineInstruction:_simple_')
else
viewingGroup = 32440
featurePortrayal:AddInstructions('ViewingGroup:32440;DrawingPriority:12;DisplayPlane:UnderRADAR')
featurePortrayal:AddInstructions('ColorFill:CHBRN')
featurePortrayal:SimpleLineStyle('solid',0.32,'LANDF')
featurePortrayal:AddInstructions('LineInstruction:_simple_')
end
elseif feature.PrimitiveType == PrimitiveType.Surface then
if feature.visualProminence == 1 then
viewingGroup = 22220
featurePortrayal:AddInstructions('ViewingGroup:22220;DrawingPriority:12;DisplayPlane:UnderRADAR')
featurePortrayal:AddInstructions('ColorFill:CHBRN')
featurePortrayal:SimpleLineStyle('solid',0.32,'CHBLK')
featurePortrayal:AddInstructions('LineInstruction:_simple_')
else
viewingGroup = 32440
featurePortrayal:AddInstructions('ViewingGroup:32440;DrawingPriority:12;DisplayPlane:UnderRADAR')
featurePortrayal:AddInstructions('ColorFill:CHBRN')
featurePortrayal:SimpleLineStyle('solid',0.32,'LANDF')
featurePortrayal:AddInstructions('LineInstruction:_simple_')
featurePortrayal:AddInstructions('ViewingGroup:'.. viewingGroup .. ';DrawingPriority:12;DisplayPlane:UnderRADAR')
end
featurePortrayal:AddInstructions('PointInstruction:CRANES0' .. symbol)
elseif feature.PrimitiveType == PrimitiveType.Surface then
-- PlainBoundaries and Patterns border use the same symbolization
featurePortrayal:AddInstructions('ViewingGroup:'.. viewingGroup .. ';DrawingPriority:12;DisplayPlane:UnderRADAR')
featurePortrayal:AddInstructions('ColorFill:CHBRN')
featurePortrayal:SimpleLineStyle('solid',0.64, colour)
featurePortrayal:AddInstructions('LineInstruction:_simple_')
elseif feature.PrimitiveType == PrimitiveType.Curve then
--TODO: Determine S-101 portrayal for Crane curve feature.
viewingGroup = 21010
featurePortrayal:AddInstructions('ViewingGroup:21010;DrawingPriority:15;PointInstruction:testPCB')
Debug.Trace('Warning: S-52 does not define portrayal for Crane curve features.')
-- dKart improvment: Determine S-101 portrayal for Crane curve feature.
featurePortrayal:AddInstructions('ViewingGroup:'.. viewingGroup ..';DrawingPriority:12;DisplayPlane:UnderRADAR')
featurePortrayal:SimpleLineStyle('solid',0.64,'LANDF')
featurePortrayal:AddInstructions('LineInstruction:_simple_;LinePlacement:Relative,0.5')
featurePortrayal:AddInstructions('PointInstruction:CRANES1' .. symbol)
else
error('Invalid primitive type or mariner settings passed to portrayal')
end

return viewingGroup

end
20 changes: 20 additions & 0 deletions PortrayalCatalog/Symbols/CRANES03.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions PortrayalCatalog/Symbols/CRANES11.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions PortrayalCatalog/Symbols/CRANES13.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 32 additions & 1 deletion PortrayalCatalog/portrayal_catalogue.xml
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,38 @@
<fileType>Symbol</fileType>
<fileFormat>SVG</fileFormat>
</symbol>
<symbol id="CTNARE51">
<symbol id="CRANES03">
<description>
<name>CRANES03</name>
<description>Visually conspicuous point Crane</description>
<language>eng</language>
</description>
<fileName>CRANES03.svg</fileName>
<fileType>Symbol</fileType>
<fileFormat>SVG</fileFormat>
</symbol>
<symbol id="CRANES11">
<description>
<name>CRANES11</name>
<description>Crane on a line, the symbol without a circle of the fixed mark position</description>
<language>eng</language>
</description>
<fileName>CRANES11.svg</fileName>
<fileType>Symbol</fileType>
<fileFormat>SVG</fileFormat>
</symbol>
<symbol id="CRANES13">
<description>
<name>CRANES13</name>
<description>Visually conspicuous Crane on a line, the symbol without a circle of the fixed mark position</description>
<language>eng</language>
</description>
<fileName>CRANES13.svg</fileName>
<fileType>Symbol</fileType>
<fileFormat>SVG</fileFormat>
</symbol>

<symbol id="CTNARE51">
<description>
<name>CTNARE51</name>
<description>caution area, a specific caution note applies</description>
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ IHO S-101 Portrayal Catalogue development, discussion, and review
[i122]: https://github.com/iho-ohi/S-101_Portrayal-Catalogue/issues/122
[i125]: https://github.com/iho-ohi/S-101_Portrayal-Catalogue/issues/125
[i124]: https://github.com/iho-ohi/S-101_Portrayal-Catalogue/issues/124
[i106]: https://github.com/iho-ohi/S-101_Portrayal-Catalogue/issues/106

## Changelog
### 1.0.2 - use with FC 1.0.2
Expand Down Expand Up @@ -167,6 +168,7 @@ IHO S-101 Portrayal Catalogue development, discussion, and review
* [#46][i46] Rule clean-up based on attributes 'marksNavigationalSystemOf' and 'orientationValue', PSWG #64 and PC #46
* [#39][i39] Foul Ground new symbols and rule updates, PSWG #65, PC #39
* [#124][i124] New symbol and rule update for Anchorage Area with small craft moorings, PSWG #28, PC #124
* [#106][i106] Crane rule updates, PSWG #75, PC #106

### Version numbers below correspond to 1.0.0 in the current version numbering scheme

Expand Down

0 comments on commit e64dd2e

Please sign in to comment.