Changeset 35404 in osm for applications/editors/josm/plugins/seachart/jchart/src
- Timestamp:
- 2020-03-29T23:03:21+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/jchart/src/jchart/Jchart.java
r35392 r35404 103 103 if ((node.lat >= map.bounds.minlat) && (node.lat <= map.bounds.maxlat) 104 104 && (node.lon >= map.bounds.minlon) && (node.lon <= map.bounds.maxlon)) { 105 return Symbols. Bwater;105 return Symbols.Gdries; 106 106 } 107 107 } … … 114 114 return Symbols.Yland; 115 115 } else { 116 return Symbols. Bwater;116 return Symbols.Gdries; 117 117 } 118 118 } … … 127 127 public static void main(String[] args) throws Exception { 128 128 if (args.length < 4) { 129 System.err.println("Usage: java -jar jrender.jar <osm data file> <zoom> <scale> <output image file> ");129 System.err.println("Usage: java -jar jrender.jar <osm data file> <zoom> <scale> <output image file> [<bounds (S W N E)>]"); 130 130 System.exit(-1); 131 131 } … … 134 134 map = new S57map(false); 135 135 S57osm.OSMmap(in, map, false); 136 // in.close(); 136 if (args.length >= 8) { 137 map.bounds.minlat = Math.toRadians(Double.parseDouble(args[4])); 138 map.bounds.minlon = Math.toRadians(Double.parseDouble(args[5])); 139 map.bounds.maxlat = Math.toRadians(Double.parseDouble(args[6])); 140 map.bounds.maxlon = Math.toRadians(Double.parseDouble(args[7])); 141 } 142 if ((map.bounds.minlat == Math.toRadians(90)) || (map.bounds.minlon == Math.toRadians(180)) || 143 (map.bounds.maxlat == Math.toRadians(-90)) || (map.bounds.maxlon == Math.toRadians(-180))) { 144 System.err.println("Invalid map bounds"); 145 System.exit(-1); 146 } 137 147 context = new Context(); 138 148 Point2D size = context.getPoint(new Snode(map.bounds.minlat, map.bounds.maxlon));
Note:
See TracChangeset
for help on using the changeset viewer.