Hi, I tried to write a helper Bean tool for building a query for Oracle Spatial. My wish is to select a feature from OpenJUMP and insert its WKT presentation into a query template. Now I have everything ready except the capturing of the WKT.
The result I get now is as follows: SELECT * FROM ORACLE_TABLE ot WHERE sdo_anyinteract (ot.geoloc,SDO_GEOMETRY(' WKT geometry should be put here ',SRID))='TRUE'; What should I write into the following script in order to insert WKT into where it belongs? It should look like this POLYGON (( 150 207, 244 237, 278 143, 163 105, 150 207 )) { import com.vividsolutions.jts.geom.*; import com.vividsolutions.jump.feature.*; import com.vividsolutions.jump.geom.EnvelopeUtil; import com.vividsolutions.jump.workbench.model.*; htmlFrame = wc.workbench.frame.outputFrame; htmlFrame.createNewDocument(); htmlFrame.setTitle("BBOX Output"); fc = wc.getLayerNamePanel().getSelectedLayers()[0].getFeatureCollectionWrapper(); for (Iterator i = fc.getFeatures().iterator(); i.hasNext();) { Feature feature = (Feature) i.next(); Geometry geometry = feature.getGeometry(); Envelope env = geometry.getEnvelopeInternal(); htmlFrame.addText("SELECT * \n" +"FROM ORACLE_TABLE ot \n" +"WHERE sdo_anyinteract (ot.geoloc,SDO_GEOMETRY('\n" +"WKT geometry should be put here \n" +"',SRID))='TRUE';" ); } wc.workbench.frame.flash(htmlFrame); htmlFrame.surface(); } -Jukka Rahkonen- ------------------------------------------------------------------------------ Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel