Revision 22125 branches/Mobile_Compatible_Hito_1/libFMap_dataFile/src/org/gvsig/data/datastores/vectorial/file/dxf/DXFResource.java
DXFResource.java | ||
---|---|---|
32 | 32 |
|
33 | 33 |
import java.awt.Color; |
34 | 34 |
import java.awt.geom.Point2D; |
35 |
import java.sql.Types; |
|
36 | 35 |
import java.util.logging.Logger; |
37 | 36 |
|
38 |
import org.cresques.geo.Point3D;
|
|
37 |
import org.cresques.geo.Point2DZ;
|
|
39 | 38 |
import org.cresques.io.DxfFile; |
40 |
import org.cresques.px.IObjList; |
|
41 | 39 |
import org.cresques.px.dxf.DxfFeatureMaker; |
42 | 40 |
import org.cresques.px.dxf.DxfHeaderManager; |
43 | 41 |
import org.cresques.px.gml.Feature; |
44 | 42 |
import org.cresques.px.gml.LineString; |
45 | 43 |
import org.cresques.px.gml.LineString3D; |
46 | 44 |
import org.cresques.px.gml.Point; |
45 |
import org.cresques.px.gml.Point3D; |
|
47 | 46 |
import org.cresques.px.gml.Polygon; |
48 | 47 |
import org.cresques.px.gml.Polygon3D; |
49 | 48 |
import org.gvsig.data.DataException; |
... | ... | |
67 | 66 |
import org.gvsig.fmap.mapcontext.rendering.legend.styling.AttrInTableLabelingStrategy; |
68 | 67 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
69 | 68 |
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbologyFactory; |
69 |
import org.gvsig.projection.cts.IProjection; |
|
70 |
import org.gvsig.projection.px.IObjList; |
|
70 | 71 |
|
71 | 72 |
/** |
72 | 73 |
* @author jmvivo |
... | ... | |
148 | 149 |
protected void load() throws DataException { |
149 | 150 |
float heightText = 10; |
150 | 151 |
DxfFile dxfFeatureFile; |
151 |
DxfFile.EntityFactory featureMaker = new DxfFeatureMaker(((DXFStoreParameters)this.params).getProjection()); |
|
152 |
DxfFile.EntityFactory featureMaker = new DxfFeatureMaker((IProjection)((DXFStoreParameters)this.params).getProjection());
|
|
152 | 153 |
DxfFile.VarSettings headerManager = new DxfHeaderManager(); |
153 | 154 |
dxfFeatureFile = new DxfFile(((DXFStoreParameters)this.params).getProjection(), this.getFile().getAbsolutePath(), |
154 | 155 |
featureMaker, headerManager); |
... | ... | |
382 | 383 |
} else if (fea.getGeometry() instanceof org.cresques.px.gml.Point3D) { |
383 | 384 |
org.cresques.px.gml.Point3D point = (org.cresques.px.gml.Point3D) fea |
384 | 385 |
.getGeometry(); |
385 |
Point3D pto = new Point3D();
|
|
386 |
pto = point.getPoint3D(0);
|
|
386 |
Point2DZ pto = new Point2DZ();
|
|
387 |
pto = ((Point3D) point).getPoint2DZ(0);
|
|
387 | 388 |
// FShape nuevoShp; |
388 | 389 |
if (point.isTextPoint()) { |
389 | 390 |
feature.set(ID_FIELD_ID,i); |
... | ... | |
532 | 533 |
// addShape(nuevoShp, auxRow); |
533 | 534 |
} else if (fea.getGeometry() instanceof LineString3D) { |
534 | 535 |
GeneralPathX genPathX = new GeneralPathX(); |
535 |
Point3D[] pts = new Point3D[fea.getGeometry().pointNr()];
|
|
536 |
Point2DZ[] pts = new Point2DZ[fea.getGeometry().pointNr()];
|
|
536 | 537 |
for (int j = 0; j < fea.getGeometry().pointNr(); j++) { |
537 | 538 |
pts[j] = ((LineString3D) fea.getGeometry()).getPoint3D(j); |
538 | 539 |
} |
... | ... | |
644 | 645 |
GeneralPathX genPathX = new GeneralPathX(); |
645 | 646 |
// 050112: A?ado una posici?n m?s para el punto que cierra y |
646 | 647 |
// creo el objeto firstPt. |
647 |
Point3D firstPt = new Point3D(); |
|
648 |
firstPt = ((Polygon3D) fea.getGeometry()) |
|
649 |
.getPoint3D(0); |
|
650 |
Point3D[] pts = new Point3D[fea.getGeometry().pointNr() + 1]; |
|
648 |
Point2DZ firstPt = new Point2DZ(); |
|
649 |
firstPt = ((Polygon3D) fea.getGeometry()).getPoint2DZ(0); |
|
650 |
Point2DZ[] pts = new Point2DZ[fea.getGeometry().pointNr() + 1]; |
|
651 | 651 |
for (int j = 0; j < fea.getGeometry().pointNr(); j++) { |
652 |
pts[j] = ((Polygon3D) fea.getGeometry()) |
|
653 |
.getPoint3D(j); |
|
652 |
pts[j] = ((Polygon3D) fea.getGeometry()).getPoint2DZ(j); |
|
654 | 653 |
} |
655 | 654 |
// 050112: A?ado el primer punto al final para cerrar los |
656 | 655 |
// pol?gonos. |
Also available in: Unified diff