Changeset 25469 in osm
- Timestamp:
- 2011-02-28T12:17:19+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/buildings_tools/build.xml
r25192 r25469 33 33 <property name="commit.message" value="update (23630 was committed together with the code which is not right)" /> 34 34 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 35 <property name="plugin.main.version" value="3 835" />35 <property name="plugin.main.version" value="3922" /> 36 36 37 37 -
applications/editors/josm/plugins/buildings_tools/src/buildings_tools/Building.java
r23190 r25469 28 28 29 29 class Building { 30 private static final double eqlen = 40075004; // length of equator in metres31 30 private final EastNorth[] en = new EastNorth[4]; 32 31 … … 83 82 84 83 private void updMetrics() { 85 meter = 2 * Math.PI / (Math.cos(Math.toRadians(eastNorth2latlon(en[0]).lat())) * eqlen);84 meter = 1 / Math.cos(Math.toRadians(eastNorth2latlon(en[0]).lat())); 86 85 len = 0; 87 86 } -
applications/editors/josm/plugins/importvec/build.xml
r25191 r25469 33 33 <property name="commit.message" value="Commit message" /> 34 34 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 35 <property name="plugin.main.version" value="3 835" />35 <property name="plugin.main.version" value="3922" /> 36 36 37 37 -
applications/editors/josm/plugins/importvec/src/org/openstreetmap/josm/plugins/importvec/ImportVectorAction.java
r24995 r25469 149 149 } 150 150 151 private static final double eqlen = 40075004; // length of equator in metres152 151 Mercator projection = new Mercator(); 153 152 EastNorth center; … … 218 217 break; 219 218 case PathIterator.SEG_CLOSE: 220 if (currentway.firstNode().getCoor().equals (nodes.getLast().getCoor())) {219 if (currentway.firstNode().getCoor().equalsEpsilon(nodes.getLast().getCoor())) { 221 220 currentway.removeNode(nodes.removeLast()); 222 221 } … … 247 246 protected void realRun() throws SAXException, IOException, OsmTransferException { 248 247 LatLon center = Main.proj.eastNorth2latlon(Main.map.mapView.getCenter()); 249 scale = 2 * Math.PI / (Math.cos(Math.toRadians(center.lat())) * eqlen) 250 * Settings.getScaleNumerator() / Settings.getScaleDivisor(); 248 scale = Settings.getScaleNumerator() / Settings.getScaleDivisor() / Math.cos(Math.toRadians(center.lat())); 251 249 this.center = projection.latlon2eastNorth(center); 252 250 try { … … 257 255 rdr.setContentHandler(loader); 258 256 rdr.setEntityResolver(new EntityResolver() { 257 @Override 259 258 public InputSource resolveEntity(String publicId, String systemId) { 260 259 //Ignore all DTDs
Note:
See TracChangeset
for help on using the changeset viewer.