Opened 16 years ago

Closed 15 years ago

#700 closed defect (fixed)

WMS Support for ESPG

Reported by: crispinatime Owned by:
Priority: medium Milestone: 2.1
Component: Server Version: 2.0.1
Severity: major Keywords: WMS ESPG
Cc: External ID:

Description

Hi,

having tried every combination under the sun and read and re-read the help on "Overriding WMS Provider Settings" I still get problems creating a map based on ESPG:27700.

Happy to provide the WMS server details to anyone who can help.

Crispin

 Error: Failed to stylize layer: WMS_Fife_250k
        An exception occurred in FDO component.
        The spatial context 'EPSG:27700' is not supported by the layer 'os250k'. 
 StackTrace:
  - MgMappingUtil.StylizeLayers line 792 file g:\temp\mapguide\mgdev\server\src\services\mapping\MappingUtil.cpp	Failed to stylize layer: WMS_Fife_250k
An exception occurred in FDO component.
The spatial context 'EPSG:27700' is not supported by the layer 'os250k'. 

I have the following in my data connection config.xml file:

<SchemaMapping provider="OSGeo.WMS.3.3" name="WMS" xmlns="http://fdowms.osgeo.org/schemas">
    <complexType name="Fife_WMS_Class">
      <RasterDefinition name="Image">
        <Format>png</Format>
        <Transparent>true</Transparent>
        <BackgroundColor>0xFFFFFF</BackgroundColor>
        <Time>current</Time>
        <Elevation>0</Elevation>
        <SpatialContext>EPSG:27700</SpatialContext>
        <Layer name="os250k">
          <Style/>
        </Layer>
      </RasterDefinition>
    </complexType>
  </SchemaMapping>

In the getCapabilities I know the coord system is supported:

<Layer queryable="0" opaque="0" cascaded="0">
        <Name>os50k</Name>
        <Title>os50k</Title>
        <SRS>EPSG:27700</SRS>
        <ScaleHint min="4.9895273871448" max="14.9670854528891" />
      </Layer>

Change History (3)

comment:1 by crispinatime, 16 years ago

Just in case anyone spots it first... I copied the wrong layer section from the getCapabilities - there is a WMS <layer> <name> called "os250k" that I am using - as well as "os50k" that I pasted.

comment:2 by crispinatime, 16 years ago

Hi,

I would tag this as "have workaround" and if someone can clarify the WMS specification documentation then it can be closed (or fixed).

The workaround is to explicitly have a bounding box definition for the local SRS within the WMS GetCapabilities XLM (ie not a MapGuide workaround but from the WMS provider)... I have included a sample below.

If the WMS specification does not absolutely require a bbox then it should stay open. Otherwise it can be closed (but a better error message would have been more helpful).

Many thanks to TF and GAIA for helping with this.

Crispin

      <Layer queryable="1" opaque="0" cascaded="0">
        <Name>mm_topo_line</Name>
        <Title>mm_topo_line</Title>
        <SRS>EPSG:27700</SRS>
        <LatLonBoundingBox minx="-3.78604" miny="55.9703" maxx="-2.56098" maxy="56.4879" />
        <BoundingBox SRS="EPSG:27700"
                    minx="290000" miny="676650" maxx="365000" maxy="733000" />
        <ScaleHint min="0" max="0.748354272644456" />
      </Layer>

comment:3 by crispinatime, 15 years ago

Resolution: fixed
Status: newclosed

Hi - With the release of v2.1 and all the raster re-projection, cs-Map integration and WMS fixes I am going to close this ticket.

I currently have MG 2.1 installs successfully connecting to servers from ArcGIS, Smallworld and MapServer. Though there are some WMS issues I do not believe that they are now EPSG coordinate system support related hence closing this ticket on the 2.1 milestone

Note: See TracTickets for help on using tickets.