50 |
50 |
import javax.swing.ImageIcon;
|
51 |
51 |
|
52 |
52 |
import org.apache.log4j.Logger;
|
53 |
|
import org.xml.sax.SAXException;
|
54 |
53 |
|
55 |
54 |
import com.hardcode.gdbms.engine.data.DataSource;
|
56 |
55 |
import com.iver.andami.PluginServices;
|
57 |
56 |
import com.iver.andami.messages.NotificationManager;
|
58 |
57 |
import com.iver.cit.gvsig.fmap.DriverException;
|
59 |
58 |
import com.iver.cit.gvsig.fmap.MapControl;
|
|
59 |
import com.iver.cit.gvsig.fmap.layers.FBitSet;
|
60 |
60 |
import com.iver.cit.gvsig.fmap.layers.FLayer;
|
|
61 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect;
|
61 |
62 |
import com.iver.cit.gvsig.fmap.layers.layerOperations.AlphanumericData;
|
62 |
|
import com.iver.cit.gvsig.fmap.layers.layerOperations.VectorialData;
|
63 |
|
import com.iver.cit.gvsig.fmap.operations.strategies.QueryByPointVisitor;
|
64 |
|
import com.iver.cit.gvsig.fmap.operations.strategies.VisitException;
|
65 |
63 |
import com.iver.cit.gvsig.fmap.tools.BehaviorException;
|
66 |
64 |
import com.iver.cit.gvsig.fmap.tools.Events.PointEvent;
|
67 |
65 |
import com.iver.cit.gvsig.fmap.tools.Listeners.PointListener;
|
... | ... | |
119 |
117 |
|
120 |
118 |
for (int i = 0; i < sel.length; i++) {
|
121 |
119 |
FLayer laCapa = (FLayer) sel[i];
|
122 |
|
|
123 |
|
if ((laCapa instanceof VectorialData) &&
|
|
120 |
if (laCapa instanceof FLyrVect)
|
|
121 |
{
|
|
122 |
// Tolerancia de 3 pixels
|
|
123 |
FLyrVect lyrVect = (FLyrVect) laCapa;
|
|
124 |
double tol = mapCtrl.getViewPort().toMapDistance(3);
|
|
125 |
|
|
126 |
FBitSet newBitSet;
|
|
127 |
try {
|
|
128 |
newBitSet = lyrVect.queryByPoint(pReal, tol);
|
|
129 |
bitset[i] = newBitSet;
|
|
130 |
layers[i] = laCapa;
|
|
131 |
} catch (DriverException e) {
|
|
132 |
// TODO Auto-generated catch block
|
|
133 |
e.printStackTrace();
|
|
134 |
throw new BehaviorException("Fallo al consultar " + lyrVect.getName());
|
|
135 |
}
|
|
136 |
}
|
|
137 |
/* if ((laCapa instanceof VectorialData) &&
|
124 |
138 |
(laCapa instanceof AlphanumericData)) {
|
125 |
139 |
QueryByPointVisitor visitor = new QueryByPointVisitor();
|
126 |
140 |
visitor.setLayer(laCapa);
|
... | ... | |
136 |
150 |
}
|
137 |
151 |
bitset[i] = visitor.getBitSet();
|
138 |
152 |
layers[i] = laCapa;
|
139 |
|
}
|
|
153 |
} */
|
140 |
154 |
}
|
141 |
155 |
|
142 |
156 |
if (bitset != null) {
|