hey Peppe,
while the below works, the clean and future proof way would be layerable instanceof ReferencedImagesLayer or ReferencedImagesLayer.class.isInstance(layerable) can you please adopt? ..ede On 27.11.2017 10:37, jump-pilot-svn--- via Jump-pilot-devel wrote: > Revision: 5588 > http://sourceforge.net/p/jump-pilot/code/5588 > Author: ma15569 > Date: 2017-11-27 09:37:15 +0000 (Mon, 27 Nov 2017) > Log Message: > ----------- > Limit image reprojection to ReferencedImageLayers > > Modified Paths: > -------------- > > core/trunk/src/com/vividsolutions/jump/plugin/edit/AffineTransformationPlugIn.java > > Modified: > core/trunk/src/com/vividsolutions/jump/plugin/edit/AffineTransformationPlugIn.java > =================================================================== > --- > core/trunk/src/com/vividsolutions/jump/plugin/edit/AffineTransformationPlugIn.java > 2017-11-26 19:02:20 UTC (rev 5587) > +++ > core/trunk/src/com/vividsolutions/jump/plugin/edit/AffineTransformationPlugIn.java > 2017-11-27 09:37:15 UTC (rev 5588) > @@ -73,6 +73,7 @@ > import com.vividsolutions.jump.workbench.WorkbenchContext; > import > com.vividsolutions.jump.workbench.datasource.SaveFileDataSourceQueryChooser; > import com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset; > +import com.vividsolutions.jump.workbench.imagery.ReferencedImageStyle; > import > com.vividsolutions.jump.workbench.imagery.geoimg.GeoImageFactoryFileLayerLoader; > import com.vividsolutions.jump.workbench.model.Layer; > import com.vividsolutions.jump.workbench.model.StandardCategoryNames; > @@ -223,13 +224,15 @@ > trans.compose(fromOriginTrans); > > trans.translate(transX, transY); > - if (dialog.getBoolean(FORCE_IMAGEWARP)) { > + // Image transformation should work only for ReferencedImageLayer > + Layer layer = context.getLayerManager().getLayer(layerName); > + if (dialog.getBoolean(FORCE_IMAGEWARP) > + & layer.getStyle(ReferencedImageStyle.class) != null) { > forceImageToWarp(context, trans); > > } > > - FeatureCollection fc = context.getLayerManager().getLayer(layerName) > - .getFeatureCollectionWrapper(); > + FeatureCollection fc = layer.getFeatureCollectionWrapper(); > > FeatureCollection resultFC = new > FeatureDataset(fc.getFeatureSchema()); > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel