I don't seem to have permissions to create an issue in your Jira. It requires 
an account I don't have. My next chance at having time to try again might be 
Tuesday.

I have however taken a deeper look at what geotools is doing, and it seems that 
grid coverages are rendered very differently now. The stack trace leading up to 
WebMapServer.issueRequest() is completely different between 11.1 and 12-RC1. So 
the regression might be in the render module, not the WMS module. Or the WMS 
module has not been updated to be fully compatible with the changes in the 
renderer.


Tor Egil


From: Jody Garnett [mailto:jody.garn...@gmail.com] 
Sent: Thursday, August 28, 2014 7:57 PM
To: Tor Egil Strand; johannes.en...@gmx.de
Cc: geotools-gt2-users@lists.sourceforge.net
Subject: Re: [Geotools-gt2-users] WMSLayer in 12-RC1

This is interesting Tor - we just had a similar report (from Johannes Engel) on 
the geoserver-users mailing list.

I have not been following this module closely so I am not aware of what change 
could of caused this regression? Can I ask you to create an issue in the issue 
tracker (we have a very limited window before the release goes out so 
organisation matters).
--
Jody




Jody Garnett

On Thu, Aug 28, 2014 at 1:21 AM, Tor Egil Strand 
<tor.egil.str...@kartverket.no> wrote:
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

------------------------------------------------------------------------------
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

Reply via email to