kijato

OpenJump, Beanshell - ...

Jun 9th, 2020
426
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.07 KB | None | 0 0
  1. {
  2.   import com.vividsolutions.jump.workbench.ui.*;
  3.   import java.util.*;
  4.   import com.vividsolutions.jts.io.*;
  5.   import com.vividsolutions.jts.geom.*;
  6.  
  7.   Polygon eotr100 = (Polygon) new WKTReader().read("POLYGON((384000 32000, 384000 384000, 960000 384000, 960000 32000, 384000 32000))");
  8.  
  9.   //Layer[] layers = wc.LayerNamePanel.selectedLayers;
  10.   //Layer layer = layers[0];
  11.  
  12.   if(wc.layerNamePanel.selectedLayers.length<1){
  13.     print("Nincs réteg kiválasztva!");
  14.     return;
  15.   }
  16.   for (layer : wc.layerNamePanel.selectedLayers) {
  17.     print("\n[ "+layer.getName()+" ]");
  18.     //print(layer.getStyles());
  19.     for (feature : layer.featureCollectionWrapper.features) {
  20.       //f.setGeometry(filter(f.geometry));
  21.       //for (c:f.geometry.getCoordinates()) c.z = Double.NaN;
  22.       //print(f.geometry.getEnvelope());
  23.       f = layer.featureCollectionWrapper.features[0];
  24.       print(feature.getGeometry());
  25.       print(
  26.     //layer.featureCollectionWrapper.feature[0].getGeometry().contains(layer.featureCollectionWrapper.feature[0].getGeometry())
  27.       );
  28.     }
  29.   }
  30. }
Add Comment
Please, Sign In to add comment