Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions niord-core/src/main/java/org/niord/core/aton/vo/AtonNodeVo.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.Arrays;
import java.util.Date;
import java.util.Optional;
import java.util.stream.Stream;

/**
* An AtoN OSM seamark node.
Expand Down Expand Up @@ -151,6 +153,20 @@ public int hashCode() {
return result;
}

/**
* Checks whether the current node is for a virtual AtoN.
* @return
*/
public boolean isVAtoN() {
if(tags == null) {
return false;
}
return Stream.of(Optional.of(tags).orElse(new AtonTagVo[0]))
.filter(tag -> tag.k.equals("seamark:type") && tag.v.equals("virtual_aton"))
.findAny()
.isPresent();
}

/*************************/
/** Matcher functions **/
/*************************/
Expand Down
1,458 changes: 731 additions & 727 deletions niord-core/src/main/resources/aton/INT-1-preset.xml

Large diffs are not rendered by default.

14 changes: 12 additions & 2 deletions niord-josm-seachart/src/main/java/render/ChartContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,24 @@
import java.awt.geom.Point2D;

import s57.S57map;
import s57.S57map.*;
import s57.S57map.Feature;
import s57.S57map.Snode;

/**
* @author Malcolm Herring
*/
public interface ChartContext {
public enum RuleSet { ALL, BASE, SEAMARK }
enum RuleSet { ALL, BASE, SEAMARK }

Point2D getPoint(Snode coord);

double mile(Feature feature);

boolean clip();

int grid();

Color background(S57map map);

RuleSet ruleset();
}
769 changes: 481 additions & 288 deletions niord-josm-seachart/src/main/java/render/Renderer.java

Large diffs are not rendered by default.

Loading