Revision 28790 branches/v2_0_0_prep/libraries/libFMap_dalfile/src/org/gvsig/fmap/dal/store/shp/utils/SHPPolygon.java

View differences:

SHPPolygon.java
64 64
public class SHPPolygon extends SHPMultiLine {
65 65
	private static final GeometryManager geomManager = GeometryLocator.getGeometryManager();
66 66
	private static final Logger logger = LoggerFactory.getLogger(SHPPolygon.class);
67
	
67

  
68 68
	/**
69 69
	 * Crea un nuevo SHPPolygon.
70 70
	 */
......
220 220
			buffer.putDouble(points[t].getY());
221 221
		}
222 222

  
223
		   if (m_type == SHP.POLYGON3D) {
224
		   double[] zExtreame = SHP.getZMinMax(zs);
225
		   if (Double.isNaN(zExtreame[0])) {
226
		       buffer.putDouble(0.0);
227
		       buffer.putDouble(0.0);
228
		   } else {
229
		       buffer.putDouble(zExtreame[0]);
230
		       buffer.putDouble(zExtreame[1]);
231
		   }
232
		   for (int t = 0; t < npoints; t++) {
233
		       double z = zs[t];
234
		       if (Double.isNaN(z)) {
235
		           buffer.putDouble(0.0);
236
		       } else {
237
		           buffer.putDouble(z);
238
		       }
239
		   }
240
		   }
223
		if (m_type == SHP.POLYGON3D) {
224
			double[] zExtreame = SHP.getZMinMax(zs);
225
			if (Double.isNaN(zExtreame[0])) {
226
				buffer.putDouble(0.0);
227
				buffer.putDouble(0.0);
228
			} else {
229
				buffer.putDouble(zExtreame[0]);
230
				buffer.putDouble(zExtreame[1]);
231
			}
232
			for (int t = 0; t < npoints; t++) {
233
				double z = zs[t];
234
				if (Double.isNaN(z)) {
235
					buffer.putDouble(0.0);
236
				} else {
237
					buffer.putDouble(z);
238
				}
239
			}
240
		}
241 241

  
242 242
		if ((m_type == SHP.POLYGONM) ||
243 243
				(m_type == SHP.POLYGON3D)) {

Also available in: Unified diff