Revision 31985
trunk/extensions/extGraph/src/org/gvsig/graph/gui/RouteControlPanel.java | ||
---|---|---|
183 | 183 |
import javax.swing.table.TableModel; |
184 | 184 |
|
185 | 185 |
import org.apache.log4j.Logger; |
186 |
import org.cresques.cts.ICoordTrans; |
|
186 | 187 |
import org.cresques.cts.IProjection; |
187 | 188 |
import org.gvsig.exceptions.BaseException; |
188 | 189 |
import org.gvsig.fmap.layers.LayerListenerAdapter; |
... | ... | |
215 | 216 |
import com.iver.cit.gvsig.fmap.core.FShape; |
216 | 217 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
217 | 218 |
import com.iver.cit.gvsig.fmap.core.ShapeFactory; |
219 |
import com.iver.cit.gvsig.fmap.drivers.DriverAttributes; |
|
218 | 220 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
219 | 221 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
220 | 222 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
... | ... | |
1249 | 1251 |
double realTol = Double.parseDouble(getTxtTolerance().getText()); |
1250 | 1252 |
// .toMapDistance(FlagListener.pixelTolerance); |
1251 | 1253 |
reader.start(); |
1254 |
ICoordTrans ct = vectLyr.getCoordTrans(); |
|
1255 |
DriverAttributes attr = reader.getDriverAttributes(); |
|
1256 |
boolean bMustClone = false; |
|
1257 |
if (attr != null) { |
|
1258 |
if (attr.isLoadedInMemory()) { |
|
1259 |
bMustClone = attr.isLoadedInMemory(); |
|
1260 |
} |
|
1261 |
} |
|
1262 |
|
|
1252 | 1263 |
ArrayList errors = new ArrayList(); |
1253 | 1264 |
for (int i = 0; i < numShapes; i++) { |
1254 |
Geometry geo = reader.getShape(i).toJTSGeometry(); |
|
1265 |
IGeometry geom = reader.getShape(i); |
|
1266 |
if (ct != null) { |
|
1267 |
if (bMustClone) |
|
1268 |
geom = geom.cloneGeometry(); |
|
1269 |
geom.reProject(ct); |
|
1270 |
} |
|
1271 |
|
|
1272 |
Geometry geo = geom.toJTSGeometry(); |
|
1255 | 1273 |
if (!((geo instanceof Point) || (geo instanceof MultiPoint))) |
1256 | 1274 |
continue; |
1257 | 1275 |
|
Also available in: Unified diff