Revision 38083 branches/v2_0_0_prep/libraries/libFMap_dalfile/src-test/org/gvsig/fmap/dal/store/shp/Bug15597Test.java
Bug15597Test.java | ||
---|---|---|
39 | 39 |
import org.gvsig.fmap.geom.Geometry.SUBTYPES; |
40 | 40 |
import org.gvsig.fmap.geom.GeometryLocator; |
41 | 41 |
import org.gvsig.fmap.geom.GeometryManager; |
42 |
import org.gvsig.fmap.geom.type.GeometryType; |
|
42 | 43 |
import org.gvsig.tools.dispose.DisposableIterator; |
43 | 44 |
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer; |
44 | 45 |
|
... | ... | |
55 | 56 |
public void testBug15642() throws Exception { |
56 | 57 |
new DefaultLibrariesInitializer().fullInitialize(); |
57 | 58 |
DataManager manager = DALLocator.getDataManager(); |
59 |
GeometryManager geometryManager = GeometryLocator.getGeometryManager(); |
|
58 | 60 |
|
59 | 61 |
//Create a feature type with two fields: "geom" and "field1" |
60 | 62 |
EditableFeatureType type = new DefaultEditableFeatureType(); |
63 |
GeometryType geometryType = |
|
64 |
geometryManager.getGeometryType(Geometry.TYPES.POINT, |
|
65 |
Geometry.SUBTYPES.GEOM2D); |
|
61 | 66 |
type.add("geom", org.gvsig.fmap.geom.DataTypes.GEOMETRY) |
62 |
.setGeometryType(Geometry.TYPES.POINT) |
|
63 |
.setGeometrySubType(Geometry.SUBTYPES.GEOM2D); |
|
67 |
.setGeometryType(geometryType); |
|
64 | 68 |
type.setDefaultGeometryAttributeName("geom"); |
65 | 69 |
type.add("field1", DataTypes.STRING).setSize(2); |
66 | 70 |
|
... | ... | |
80 | 84 |
//Edit the store and add a new Feature. |
81 | 85 |
store.edit(); |
82 | 86 |
|
83 |
GeometryManager geometryManager = GeometryLocator.getGeometryManager(); |
|
84 |
|
|
85 | 87 |
EditableFeature feature1 = store.createNewFeature().getEditable(); |
86 | 88 |
feature1.setGeometry(type.getDefaultGeometryAttributeIndex(), |
87 | 89 |
geometryManager.createPoint(0, 0, SUBTYPES.GEOM2D)); |
Also available in: Unified diff