Revision: 5657 http://sourceforge.net/p/jump-pilot/code/5657 Author: edso Date: 2018-01-04 16:41:14 +0000 (Thu, 04 Jan 2018) Log Message: ----------- comment/disable on-the-fly reprojection, which was never implemented completely anyway
Modified Paths: -------------- core/trunk/src/com/vividsolutions/jump/coordsys/CoordinateSystem.java core/trunk/src/com/vividsolutions/jump/coordsys/Reprojector.java core/trunk/src/com/vividsolutions/jump/workbench/model/LayerManager.java Modified: core/trunk/src/com/vividsolutions/jump/coordsys/CoordinateSystem.java =================================================================== --- core/trunk/src/com/vividsolutions/jump/coordsys/CoordinateSystem.java 2018-01-03 16:00:38 UTC (rev 5656) +++ core/trunk/src/com/vividsolutions/jump/coordsys/CoordinateSystem.java 2018-01-04 16:41:14 UTC (rev 5657) @@ -77,8 +77,13 @@ return name; } + /** + * @deprecated reprojection will be implemented differently at a later point + */ + @Deprecated public Projection getProjection() { - return projection; + throw new UnsupportedOperationException(); + //return projection; } public int getEPSGCode() { Modified: core/trunk/src/com/vividsolutions/jump/coordsys/Reprojector.java =================================================================== --- core/trunk/src/com/vividsolutions/jump/coordsys/Reprojector.java 2018-01-03 16:00:38 UTC (rev 5656) +++ core/trunk/src/com/vividsolutions/jump/coordsys/Reprojector.java 2018-01-04 16:41:14 UTC (rev 5657) @@ -35,16 +35,35 @@ import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.CoordinateFilter; import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jump.feature.Feature; /** * The source and destination coordinate reference systems must have * the same datum (for example, WGS 84). + * + * @deprecated */ +@Deprecated public class Reprojector { - private static Reprojector instance = new Reprojector(); + // [12/2017 ede] reprojection is not properly implemented as of right now + // therefore use a dummy reprojector that does nothing + private static Reprojector instance = new Reprojector(){ + @Override + public boolean wouldChangeValues(CoordinateSystem source, CoordinateSystem destination) { + return false; + } + + @Override + public void reproject(Coordinate coordinate, CoordinateSystem source, CoordinateSystem destination) { + } + + @Override + public void reproject(Geometry geometry, CoordinateSystem source, CoordinateSystem destination) { + } + + }; + private Reprojector() { } Modified: core/trunk/src/com/vividsolutions/jump/workbench/model/LayerManager.java =================================================================== --- core/trunk/src/com/vividsolutions/jump/workbench/model/LayerManager.java 2018-01-03 16:00:38 UTC (rev 5656) +++ core/trunk/src/com/vividsolutions/jump/workbench/model/LayerManager.java 2018-01-04 16:41:14 UTC (rev 5657) @@ -148,14 +148,17 @@ public void addLayerable(String categoryName, Layerable layerable) { + if (layerable instanceof Layer) { if (size() == 0 && getCoordinateSystem() == CoordinateSystem.UNSPECIFIED) { setCoordinateSystem(((Layer) layerable) .getFeatureCollectionWrapper().getFeatureSchema() .getCoordinateSystem()); - } else { - reproject((Layer) layerable, coordinateSystem); } +// [12/2017 ede] reprojection is not properly implemented as of right now +// else { +// reproject((Layer) layerable, coordinateSystem); +// } layerReferencesToDispose.add(new WeakReference<>(layerable)); } addCategory(categoryName); ------------------------------------------------------------------------------ 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