Revision 44469 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.prov/org.gvsig.exportto.swing.prov.jdbc/src/main/java/org/gvsig/export/jdbc/service/ExportJDBCService.java

View differences:

ExportJDBCService.java
24 24
package org.gvsig.export.jdbc.service;
25 25

  
26 26
import java.text.MessageFormat;
27
import org.apache.commons.lang3.StringUtils;
28 27
import org.cresques.cts.ICoordTrans;
29
import org.cresques.cts.IProjection;
30 28
import org.gvsig.export.ExportAttributes;
31 29

  
32 30
import org.gvsig.fmap.dal.exception.DataException;
......
226 224

  
227 225
            // ======================================
228 226
            // Reprojection
229
            FeatureAttributeDescriptor geo_att = this.getParameters().getSourceFeatureType().getDefaultGeometryAttribute();
230
            IProjection sourceProjection;
231
            ICoordTrans coord_trans = null;
232
            Geometry reproj_geom;
233
            IProjection targetProjection = this.getParameters().getTargetProjection();
234
            if (geo_att != null) {
235
                sourceProjection = geo_att.getSRS();
236
                // this comparison is perhaps too preventive
237
                // we could  have two instances of same projection
238
                // so we would do more computations than needed
239
                if (sourceProjection != null && targetProjection != null && sourceProjection != targetProjection) {
240
                    coord_trans = sourceProjection.getCT(targetProjection);
241
                }
242
            }
227
            ICoordTrans coord_trans = this.getParameters().getTransformationToUse();
243 228
            // ============================================
244 229

  
245 230
            DataManager dataManager = DALLocator.getDataManager();

Also available in: Unified diff