Revision 21724 branches/v2_0_0_prep/libraries/libFMap_dataFile/src/org/gvsig/data/datastores/vectorial/file/shp/ShpFeaturesWriter.java

View differences:

ShpFeaturesWriter.java
65 65
		fullExtent = null;
66 66
	}
67 67

  
68
	public void insertFeature_old(Feature feature) throws WriteException, UnsupportedEncodingException {
69
		/* System.out.println("Intento escribir el registro " +
70
		 numRows + " de la capa " + lyrVect.getName()); */
71

  
72
		Geometry theGeom = (Geometry)feature.getDefaultGeometry();
73
		if (theGeom==null){
74
			theGeom=new NullGeometry();
75
		}
76
		// Revisamos que podemos escribir esa entidad
77
		// En un shpFile, podemos meter pol?gonos, pero que sean como
78
		// lineas. En cambio, en uno de puntos solo se pueden meter puntos
79
		// Con capas de anotaciones ?nicamente se pueden salvar los puntos,
80
		// de momento no hay problema porque est? limitado
81
		// y no se puede tener anotaciones de otro tipo de shape.
82
		if (canWriteGeometry(theGeom.getType()))// || canWriteGeometry(gvSIG_geometryType))
83
			{
84
			System.out.println(feature.get("NOMBRE"));
85
			super.insertFeature(feature);
86
			fileSize = shpWrite.writeIGeometry(theGeom);
87
			Rectangle2D boundsShp = theGeom.getBounds2D();
88
			if (boundsShp!=null){
89
				if (fullExtent == null) {
90
					fullExtent = boundsShp;
91
				} else {
92
					fullExtent.add(boundsShp);
93
				}
94
			}
95

  
96
		}
97
	}
98

  
99
	
100 68
	public void insertFeature(Feature feature) throws WriteException, UnsupportedEncodingException {
101 69

  
102 70
		Geometry theGeom = (Geometry)feature.getDefaultGeometry();

Also available in: Unified diff