Ignore:
Timestamp:
2016-03-08T17:20:54+01:00 (8 years ago)
Author:
malcolmh
Message:

[SeaChart] Fix landmark

Location:
applications/editors/josm/plugins/seachart
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/seachart/jrender/src/jrender/Jrender.java

    r32095 r32105  
    137137       
    138138        public static void main(String[] args) throws Exception {
     139                if (args.length < 5) {
     140                        System.err.println("Usage: java -jar jrender.jar <osm source directory> <tile directory> <zoom> <xtile> <ytile>");
     141                        System.exit(-1);
     142                }
    139143                srcdir = args[0];
    140144                dstdir = args[1];
  • applications/editors/josm/plugins/seachart/src/render/Rules.java

    r32101 r32105  
    155155        }
    156156
    157         static boolean hasAttribute(Obj obj, int idx, Att att) {
     157        static boolean hasAttribute(Obj obj, Att att) {
    158158                AttMap atts;
    159                 if ((atts = getAtts(obj, idx)) != null) {
     159                if ((atts = getAtts(obj, 0)) != null) {
    160160                        AttVal<?> item = atts.get(att);
    161161                        return item != null;
     
    845845        @SuppressWarnings("unchecked")
    846846        private static void landmarks() {
    847                 if (testAttribute(Obj.LNDMRK, Att.CATLMK, CatLMK.LMK_UNKN)
    848                                 && (testAttribute(Obj.LNDMRK, Att.CATLMK, FncFNC.FNC_UNKN) || testAttribute(Obj.LNDMRK, Att.CATLMK, FncFNC.FNC_LGHT))
     847                if (!hasAttribute(Obj.LNDMRK, Att.CATLMK)
     848                                && (!hasAttribute(Obj.LNDMRK, Att.FUNCTN) || testAttribute(Obj.LNDMRK, Att.FUNCTN, FncFNC.FNC_LGHT))
    849849                                && hasObject(Obj.LIGHTS))
    850850                        lights();
    851                 if (Renderer.zoom >= 12) {
     851                else if (Renderer.zoom >= 12) {
    852852                        switch (feature.type) {
    853853                        case LNDMRK:
Note: See TracChangeset for help on using the changeset viewer.