Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
R: [udig-devel] WMS CRS not properly read

Hello Jessie.

Thanks for your replay.

Yes, I agree there's something weird going on.

If I right-click on the resource in the catalog and select Operations -> Resource Summary, it says WGS84 (this was the test I did when I wrote my previous mail).

I checked the layer properties (Right-click on the layer and select Properties). It's WGS84 as well.

I followed your hints. First I set -1 as default map projection (Window->Preferences Menu item -> Project->Map item). That changed nothing: uDig keep using EPSG:4326.

Then I changed the projection used for the layer (Layer->properties), forcing to be 3003. uDig ignores that! I read from its log (and from Geoserver's log) that WMS requests have always SRS=EPSG:4326.

I'm using the SDK version of 1.1.0 RC9 on windows. Maybe there's something I can check around geotools or something like that?

Thank you again!

Cheers,

Fabio

> -----Messaggio originale-----
> Da: udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx 
> [mailto:udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx] Per conto 
> di Jesse Eichar
> Inviato: giovedì 5 aprile 2007 22.03
> A: User-friendly Desktop Internet GIS
> Oggetto: Re: [udig-devel] WMS CRS not properly read
> 
> Hi,
> 
> This is pretty unusual,  I'm looking at the WKT used by udig 
> for 3003  
> and it looks the same at a glance.  How are you checking to see the  
> projection that uDig is assigning to the layer?  There are two ways:
> 
> 1.  Right-click on the layer and select Properties.  Then on the  
> properties dialog select Projection.  The selected projection should  
> be the one that uDig is using... Hopefully it is 3003 if not then  
> choose 3003 and see if it helps
> 2.  Right-click on the resource in the catalog and select Operations- 
>  >Resource Summary.  There should be a line that says the projection.
> 
> 
> One thing to keep in mind is that currently the default 
> projection of  
> all maps is 4326.  So uDig has to reproject the layer from 3003 to  
> 4326.  This would cause some distortion.  One thing you can do is go  
> into the Window->Preferences Menu item.  Select the Project->Map  
> item.  In the right there is a Field "EPSG Code of default CRS).   
> Enter -1 there.  When you do this the projection of the map will be  
> set to be the same as the first layer added.
> 
> One warning about the last point.  This is not default behaviour  
> because right now it can cause performance problems with 
> Geoserver if  
> a Shapefile is added as the first layer and a WMS layer *FROM  
> GEOSERVER* is added second.
> 
> You can enter 3003 to be the default if you want that to be your  
> default projection as well.
> 
> Hope this helps,
> 
> Jesse
> 
> 
> On Apr 5, 2007, at 10:02 AM, Fabio Da Soghe wrote:
> 
> > Hello.
> >
> > I'm using uDig 1.1.0 RC9 on Windows (XP).
> >
> > I open a WMS layer (published by Geoserver 1.5.0 RC2a) and it gets  
> > badly displayed in uDig's map (the image is distorted). The same  
> > layer gets correctly displayed from Geoserver (I've tested it with  
> > the builtin Geoserver's Mapbuilder client).
> >
> > After some (much!) investigation, I've discovered that uDig thinks  
> > the layer is in EPSG:4326 (WGS84), but Geoserver correctly  
> > advertises it having a CRS EPSG:3003: infact the WMS Capabilities  
> > document has this xml fragment:
> >
> >       <Layer queryable="0">
> >         <Name>sprg:tavola_2</Name>
> >         <Title>tavola_2 is a Tagged Image File Format with  
> > Geographic information</Title>
> >         <Abstract>Generated from tavola_2</Abstract>
> >         <KeywordList>
> >           <Keyword>WCS</Keyword>
> >           <Keyword>tavola_2</Keyword>
> >           <Keyword>tavola_2</Keyword>
> >         </KeywordList>
> >         <!--WKT definition of this CRS:
> > PROJCS["Monte Mario / Italy zone 1",
> >   GEOGCS["Monte Mario",
> >     DATUM["Monte Mario",
> >       SPHEROID["International 1924", 6378388.0, 297.0, AUTHORITY 
> > ["EPSG","7022"]],
> >       TOWGS84[-50.2, -50.4, 84.8, -0.69, -2.012, 0.459,  
> > -5.791915759418465],
> >       AUTHORITY["EPSG","6265"]],
> >     PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
> >     UNIT["degree", 0.017453292519943295],
> >     AXIS["Geodetic longitude", EAST],
> >     AXIS["Geodetic latitude", NORTH],
> >     AUTHORITY["EPSG","4265"]],
> >   PROJECTION["Transverse_Mercator"],
> >   PARAMETER["central_meridian", 9.0],
> >   PARAMETER["latitude_of_origin", 0.0],
> >   PARAMETER["scale_factor", 0.9996],
> >   PARAMETER["false_easting", 1500000.0],
> >   PARAMETER["false_northing", 0.0],
> >   UNIT["m", 1.0],
> >   AXIS["Easting", EAST],
> >   AXIS["Northing", NORTH],
> >   AUTHORITY["EPSG","3003"]]-->
> >         <SRS>EPSG:3003</SRS>
> >         <LatLonBoundingBox minx="7.713890299460821"  
> > miny="45.10998810306968" maxx="7.833371499203417"  
> > maxy="45.176887702656046"/>
> >         <BoundingBox SRS="EPSG:3003" minx="1398951.6468292715"  
> > miny="4995997.122649521" maxx="1408236.8944173127"  
> > maxy="5003290.095381425"/>
> >
> > As you can argue, this layer is from a Geoserver coverage (a  
> > geotiff raster). The very same happens with a vector layer.
> >
> > It seems to me what's is going on is:
> >
> > 1) the layer is in EPSG:3003 on the server;
> > 2) it's correctly described in the WMS Capabilities document;
> > 3) uDig thinks it's in EPSG:4326 (why?), so it generates WMS  
> > requests with parameter SRS=EPSG:4326 (I verified this on 
> uDig's log);
> > 4) Geoserver receives a request in 4326, has the layer in 3003 so  
> > reprojects the raster (here it gets a bit ruined);
> > 5) if I (as I have to) change the CRS of the map in uDig to 3003,  
> > uDig reprojects again the image, so it ends up much ruined.
> >
> > Am I missing something? And, more important, is there a way to  
> > workaround this?
> >
> > Thanks for any help.
> >
> > Best Regards,
> >
> > Fabio Da Soghe
> >
> > _______________________________________________
> > User-friendly Desktop Internet GIS (uDig)
> > http://udig.refractions.net
> > http://lists.refractions.net/mailman/listinfo/udig-devel
> 
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
> 
>


Back to the top