[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mapserver-users
Subject:    Re: AW: [mapserver-users] Mapserver Projection Errors
From:       SixDegrees <paulcarlisle () comcast ! net>
Date:       2011-10-21 19:41:00
Message-ID: 1319226060639-6918286.post () n2 ! nabble ! com
[Download RAW message or body]

Excellent. I believe this means my problems will be solved simply by adding
the wms_src setting to each layer. Pity Mapserver doesn't just use the
map-level definition if it isn't defined, as the documentation states, but I
expect that will be solved in a future release.

Thanks again to everyone for all the patience and help.


Rahkonen Jukka wrote:
> 
> If you make the request in EPSG:4326 then yes. 
> 
> Compare EPSG:2393
> http://188.64.1.61/cgi-bin/mapserv?map=/usr/map/osm-mapserver_i.map&REQUEST=GetMap&S \
> ERVICE=WMS&VERSION=1.1.1&WIDTH=459&HEIGHT=353&LAYERS=sea&TRANSPARENT=TRUE&FORMAT=ima \
> ge%2Fpng&BBOX=2451307.6345609063,6544820.0,4359512.365439094,8012350.0&SRS=EPSG:2393&STYLES=
>  
> and EPSG:4326
> http://188.64.1.61/cgi-bin/mapserv?map=/usr/map/osm-mapserver_i.map&REQUEST=GetMap&S \
> ERVICE=WMS&VERSION=1.1.1&WIDTH=459&HEIGHT=353&LAYERS=sea&TRANSPARENT=TRUE&FORMAT=ima \
> ge%2Fpng&BBOX=3.5931,49.05782679738563,45.5442,81.3208732026144&SRS=EPSG:4326&STYLES=
>  
> Best to take a GIS program as WMS client and open some known data file to
> the same project for having something to compare with. I like OpenJUMP
> because it can show the WMS request it is sending with Customize -
> BeanTools - Display_WMS_URL.  Download a nightly build, I am not sure if
> the release version has that tool already.
> 
> -Jukka Rahkonen-
> 
> SixDegrees wrote:
> 
> > OK. So if my image is in UTM 38N and I have a PROJECTION block in the
> > layer
> with the Proj.4 string for that projection, but the wms_src setting in the
> layer metadata is epsg:4326, will Mapserver reproject the image into
> epsg:4326 when queried? It sounds that way, but I want to be certain.
> 
> 
> Rahkonen Jukka wrote:
> > 
> > Hi,
> > 
> > The layer wms_srs (as well as the map level wms_srs) helps in building
> > the
> > list of projections which you want to support for output.  I believe you
> > can safely insert there a list of SRS/CRS valurs you want to offer for
> > your clients. For the projections on that list you must have a
> > corresponding line in the epsg file. WMS clients do not use
> > &SRS=+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs, they
> > want
> > to use &SRS=4326.
> > 
> > -Jukka Rahkonen-
> > 
> > SixDegrees wrote:
> > 
> > > Well, that certainly seems to explain things. If I supply a wms_srs
> > > setting,
> > the errors disappear. Sadly, I do not have the epsg codes, only the proj4
> > strings, and I'm not sure the WMS XML concocted by Mapserver is correct.
> > If
> > I supply
> > 
> > > "wms_srs" "+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs"
> > 
> > for example, the GetCapabilities request generates the following layer:
> > 
> > <Layer queryable="0" opaque="0" cascaded="0">
> > <Name>MyImage</Name>
> > <Title>MyImage</Title>
> > <SRS>+proj=longlat</SRS>
> > <SRS>+ellps=WGS84</SRS>
> > <SRS>+towgs84=0,0,0,0,0,0,0</SRS>
> > <SRS>+no_defs</SRS>
> > <LatLonBoundingBox minx="51.4432" miny="35.7193" maxx="51.6412"
> > maxy="35.8732" />
> > <BoundingBox SRS="+proj=longlat"
> > minx="51.4432" miny="35.7193" maxx="51.6412"
> > maxy="35.8732" />
> > </Layer>
> > 
> > Note how each term in the projection is given its own SRS tag, and the
> > SRS
> > of the BoundingBox only uses the first element. This does not look right
> > to
> > me, although things seem to work OK, as before. The Mapserver
> > documentation
> > states that the layer will use the map-level wms_srs, which is defined as
> > "init=epsg:4326", but I worry that if I supply that in the layer
> > metadata,
> > Mapserver will think this layer is already in that format and fail to
> > reproject when the image is acually in, say, a UTM format.
> > 
> > I have no way of retrieving or constructing the actual epsg code for each
> > layer; most often it simply isn't in the file in any form other than
> > Proj.4.
> > If the layer-level wms_srs needs the actual epsg code of the file the
> > layer
> > references, then this is never going to work.
> > 
> > Thank you very much for taking the time to sort this all out, though.
> > It's
> > much, much farther than I ever would have got on my own.
> > 
> > 
> > 
> > 
> > Eichner, Andreas - SID-NLK wrote:
> > > 
> > > The error is caused by the msOWSPrintBoundingBox() function during the
> > > GetCapabilities request because there's no {ows,wms}_srs metadata set.
> > > The used function msOWSGetEPSGProj() tries to fall back to the
> > > projections "init=" parameter but isn't available here.
> > > It seems the whole thing is used to support bounding boxes for multiple
> > > coordinate systems in the GetCapabilities document. This might only have
> > > an effect if using WMS v1.3.0, {ows,wms}_bbox_extended metadata set to
> > > "true" and {ows,wms}_srs projection list with more than one entry. In
> > > such a case the original layer extent must be reprojected in  the listed
> > > SRS which might fail. In your case this might have no negativ impact
> > > beside the error message.
> > > To get rid off the message you need to set a {ows,wms}_srs metadata at
> > > layer level. It seems to be used to advertise the layer's CRS and build
> > > the multi BBOX feature only. Altough it might not harm you it might
> > > cause trouble in the future....
> > > 
> > > 
> > > > LAYER
> > > > NAME "test_image"
> > > > EXTENT 51.44325 35.71925 51.64125 35.87325
> > > > METADATA
> > > > "wms_title" "test_image"
> > > > "wms_extent" "51.44325 35.71925 51.64125 35.87325"
> > > > END
> > > > PROCESSING "SCALE=AUTO"
> > > > PROCESSING "SCALE_BUCKETS=256"
> > > > TYPE RASTER
> > > > DATA "/data/geodata/yongbyon/test_image.vrt"
> > > > PROJECTION
> > > > "+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs"
> > > > END
> > > > END
> > > _______________________________________________
> > > mapserver-users mailing list
> > > mapserver-users@.osgeo
> > > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> > > 
> > 
> > 
> > --
> > View this message in context:
> > http://osgeo-org.1803224.n2.nabble.com/Mapserver-Projection-Errors-tp6908527p6917339.html
> >  Sent from the Mapserver - User mailing list archive at Nabble.com.
> > _______________________________________________
> > mapserver-users mailing list
> > mapserver-users@.osgeo
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> > _______________________________________________
> > mapserver-users mailing list
> > mapserver-users@.osgeo
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> > 
> 
> 
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/Mapserver-Projection-Errors-tp6908527p6917647.html
>  Sent from the Mapserver - User mailing list archive at Nabble.com.
> _______________________________________________
> mapserver-users mailing list
> mapserver-users@.osgeo
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> _______________________________________________
> mapserver-users mailing list
> mapserver-users@.osgeo
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 


--
View this message in context: \
http://osgeo-org.1803224.n2.nabble.com/Mapserver-Projection-Errors-tp6908527p6918286.html
 Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic