Changeset 20659 in osm for applications/editors/josm/plugins
- Timestamp:
- 2010-03-25T00:01:21+01:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/Buildings.java
r20585 r20659 269 269 test_x = x + this.dirsX[new_dir]; 270 270 test_y = y + this.dirsY[new_dir]; 271 if (test_x < 0 || test_x >= selectedImage.image.getWidth() ||271 if (test_x < 0 || test_x >= selectedImage.image.getWidth() || 272 272 test_y < 0 || test_y >= selectedImage.image.getHeight()){ 273 273 System.out.println("Outside image"); 274 274 return false; 275 275 } 276 if (bim.isBuildingOrRoofColor(selectedImage.image, test_x, test_y, buildingColors, ignoreParcels)){276 if (bim.isBuildingOrRoofColor(selectedImage.image, test_x, test_y, buildingColors, ignoreParcels)){ 277 277 System.out.println("building color at "+test_x+","+test_y+" new_dir="+new_dir); 278 278 break; … … 304 304 y = test_y; 305 305 // Break the loop if we managed to get back to our starting point 306 if ( listPixels.contains(new Pixel(x, y, 0))){306 if (x == startX && y == startY) { 307 307 System.out.println("loop closed at "+x+","+y+", exit"); 308 308 break; 309 } else if (listPixels.contains(new Pixel(x, y, 0))){ 310 int j = listPixels.indexOf(new Pixel(x, y, 0)); 311 int l = listPixels.size(); 312 for (int k = j; k < l; k++) 313 listPixels.remove(j); 309 314 } 310 315 addPixeltoList(x, y, new_dir); … … 544 549 n0.getCoor().getX(), n0.getCoor().getY(), 545 550 n2.getCoor().getX(), n2.getCoor().getY()); 546 System.out.println("angle n0,n1,n2="+(angle1*180/Math.PI));551 // System.out.println("angle n0,n1,n2="+(angle1*180/Math.PI)); 547 552 double angle2 = AngleOfView(n2.getCoor().getX(), n2.getCoor().getY(), 548 553 n1.getCoor().getX(), n1.getCoor().getY(), 549 554 n3.getCoor().getX(), n3.getCoor().getY()); 550 System.out.println("angle n1,n2,n3="+(angle2*180/Math.PI));555 // System.out.println("angle n1,n2,n3="+(angle2*180/Math.PI)); 551 556 if (angle1 > Math.PI*0.9 && angle1 < Math.PI*1.1) { 552 557 way.removeNode(n1); -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java
r20484 r20659 109 109 * - non-modal JDialog in MenuActionGrabPlanImage 110 110 * - new options in the image filter (bilinear, bicubic) 111 * 1.9 xx-xxx-xxxx - added a scroll bar in preferences 111 112 */ 112 113 public class CadastrePlugin extends Plugin { -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePreferenceSetting.java
r20247 r20659 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.awt.GridBagLayout; 6 7 import java.awt.event.ActionEvent; 7 8 import java.awt.event.ActionListener; … … 95 96 + "http://www.cadastre.gouv.fr/scpc/html/CU_01_ConditionsGenerales_fr.html</a> <BR>" 96 97 + "before any upload of data created by this plugin."); 97 JPanel cadastrewms = gui.createPreferenceTab("cadastrewms.gif", I18n.tr("French cadastre WMS"), description); 98 JPanel cadastrewmsMast = gui.createPreferenceTab("cadastrewms.gif", I18n.tr("French cadastre WMS"), description); 99 100 JPanel cadastrewms = new JPanel(new GridBagLayout()); 101 cadastrewms.setBorder(BorderFactory.createEmptyBorder(0,0,0,0)); 98 102 99 103 // option to automatically set the source tag when uploading … … 326 330 cadastrewms.add(autoFirstLayer, GBC.eop().insets(0, 0, 0, 0)); 327 331 cadastrewms.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.VERTICAL)); 332 // JTabbedPane cadastrecontent = new JTabbedPane(); 333 // cadastrecontent.add(cadastrewms); 334 JScrollPane scrollpane = new JScrollPane(cadastrewms); 335 scrollpane.setBorder(BorderFactory.createEmptyBorder( 0, 0, 0, 0 )); 336 cadastrewmsMast.add(scrollpane, GBC.eol().fill(GBC.BOTH)); 328 337 329 338 } -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java
r20412 r20659 61 61 62 62 public static int currentFormat; 63 64 private static final int cBBoxForBuildings = 50; // hard coded size of grabbed boxes for building layers 63 65 64 66 private ArrayList<EastNorthBound> dividedBbox = new ArrayList<EastNorthBound>(); … … 141 143 CadastrePreferenceSetting.DEFAULT_RASTER_DIVIDER)), 0); 142 144 } else if (buildingsOnly) 143 divideBbox(b, 5, 80); // hard coded size of 80 meters per box145 divideBbox(b, 5, cBBoxForBuildings); 144 146 else 145 147 divideBbox(b, Integer.parseInt(Main.pref.get("cadastrewms.scale", Scale.X1.toString())), 0);
Note:
See TracChangeset
for help on using the changeset viewer.