Revision 40931 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.swing/org.gvsig.exportto.swing.impl/src/main/java/org/gvsig/exportto/swing/impl/DefaultExporttoSwingProviderManager.java

View differences:

DefaultExporttoSwingProviderManager.java
29 29
import java.util.List;
30 30
import java.util.Map;
31 31

  
32
import org.cresques.cts.ICoordTrans;
32 33
import org.cresques.cts.IProjection;
33 34
import org.slf4j.Logger;
34 35
import org.slf4j.LoggerFactory;
......
221 222
        throws ServiceException {
222 223
        
223 224
        FeatureStore fstore = vlayer.getFeatureStore();
224
        IProjection proj = vlayer.getProjection(); 
225
        
226
        IProjection proj = null;
227
        ICoordTrans ct = vlayer.getCoordTrans();
228
        if (ct == null) {
229
            // Layer is not reprojected on the fly
230
            proj = vlayer.getProjection(); 
231
        } else {
232
            /*
233
             * If there is on-the-fly reprojection, then
234
             * the projection of the export process is the
235
             * destination projection of the transformation:
236
             */
237
            proj = ct.getPDest();
238
        }
225 239
            
226 240
        DynObject serviceParameters = createServiceParameters(providerName);
227 241
        serviceParameters.setDynValue(PARAMETER_FEATURESTORE, fstore);

Also available in: Unified diff