Revision 31466 tags/v1_9_Build_1250/extensions/extGPE-gvSIG/src/org/gvsig/fmap/drivers/gpe/writer/ExportGeometry.java

View differences:

ExportGeometry.java
1 1
package org.gvsig.fmap.drivers.gpe.writer;
2 2

  
3 3
import java.awt.geom.PathIterator;
4
import java.awt.geom.Rectangle2D;
5 4

  
6 5
import org.cresques.cts.ICoordTrans;
7 6
import org.cresques.cts.IProjection;
......
15 14
import com.iver.cit.gvsig.fmap.core.FShape;
16 15
import com.iver.cit.gvsig.fmap.core.IGeometry;
17 16

  
18
/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
17
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
19 18
 *
20 19
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
21 20
 *
......
37 36
 *
38 37
 *  Generalitat Valenciana
39 38
 *   Conselleria d'Infraestructures i Transport
40
 *   Av. Blasco Ib��ez, 50
39
 *   Av. Blasco Ib??ez, 50
41 40
 *   46010 VALENCIA
42 41
 *   SPAIN
43 42
 *
......
62 61
 *
63 62
 */
64 63
/**
65
 * @author Jorge Piera LLodr (jorge.piera@iver.es)
64
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
66 65
 */
67 66
public class ExportGeometry {
68 67
	private GPEWriterHandler writer = null;
......
79 78
		this.writer = writer;
80 79
	}
81 80

  
82
	
83 81
	/**
84 82
	 * It writes a geometry
85 83
	 * @param geom
......
320 318
	public IProjection getProjDest() {
321 319
		return projDest;
322 320
	}
323

  
324

  
325
	public IProjection getProjOrig() {
326
		return projOrig;
327
	}
328

  
329

  
330
	public Rectangle2D getExtent(Rectangle2D extent) {
331
		//If the project orig its different than the destination one, then must be reprojected
332
		if (getProjDest().getAbrev().compareTo(getProjOrig().getAbrev())!=0){
333
			if (coordTrans == null){
334
				if ((projOrig == null) || (projDest == null)){
335
					return null;
336
				}
337
				coordTrans = projOrig.getCT(projDest);
338
			}
339
			return coordTrans.convert(extent);
340
		}
341
		return extent;
342
	}
343 321
}

Also available in: Unified diff