Hi I've been trying out 12-RC1 and have noticed that WMSLayer now has inferior behavior compared to 11.1. 12-RC1 seems to ask the WMS with a different SRS from what I ask for, and then transform the image on the client, where 11.1 just asks the WMS for the right SRS to begin with. Here is some code that can demonstrate the suspected regression. You may have to zoom in one level to see that the text that was horizontal with 11.1, is slanted with 12-RC, plus the fact that the image quality is worse. The WMS I use may have some limits as to how often it may be called.
--- import org.geotools.data.wms.WebMapServer; import org.geotools.geometry.jts.ReferencedEnvelope; import org.geotools.map.MapContent; import org.geotools.map.MapViewport; import org.geotools.map.WMSLayer; import org.geotools.ows.ServiceException; import org.geotools.referencing.CRS; import org.geotools.swing.JMapFrame; import org.opengis.referencing.FactoryException; import org.opengis.referencing.crs.CoordinateReferenceSystem; import javax.swing.*; import java.awt.Dimension; import java.io.IOException; import java.net.URL; public class WmsTest { public static void main(String[] args) throws IOException, ServiceException, FactoryException { CoordinateReferenceSystem crs = CRS.decode("EPSG:32633"); ReferencedEnvelope referencedEnvelope = new ReferencedEnvelope(-127998, 1.14551e+06, 6.37792e+06, 7.9768e+06, crs); WebMapServer webMapServer = new WebMapServer(new URL("http://openwms.statkart.no/skwms1/wms.topo2")); final MapContent mapContent = new MapContent(); mapContent.setViewport(new MapViewport(referencedEnvelope, true)); mapContent.addLayer(new WMSLayer(webMapServer, webMapServer.getCapabilities().getLayer())); SwingUtilities.invokeLater(new Runnable() { @Override public void run() { JMapFrame mapFrame = new JMapFrame(mapContent); mapFrame.enableToolBar(true); mapFrame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); mapFrame.setSize(new Dimension(768, 768)); mapFrame.setLocationRelativeTo(null); mapFrame.setVisible(true); } }); } } --- Regards Tor Egil Riegels Strand Developer Direct: +47 32 11 81 61 E-mail: tor.egil.str...@kartverket.no Switchboard: +47 32 11 83 00 www.kartverket.no ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users