Hi Bart,

Could you please file a bug and Julien will have a look and provide more precise answers?

Quick comments about the issues that you raised:

About the EPSG code not being recognized, we've used 4326 before and I don't thing the pszValue+5 implies that the EPSG code needs to be 5 digits, I think it's there to skip the "EPSG:" prefix. It has to be something else, we'll need to check further with this

About #1: you're right that this is missing

About #2: MapServer 4.9 should spit out "OGC:WMS" for v1.1.0 contexts, and "WMS" for 1.0.0 ... I didn't double-check the specs, but I think this is the correct behavior.

Daniel


Bart van den Eijnden wrote:
Hi list,

I am trying to use a WMC document generated by Ionic in Mapserver, but
cannot get it to work (no layers in map object). The Ionic context
validates in Oxygen.

First problem, Ionic does not use a XML header for the context, so
Mapserver comes back with:

PHP Warning:  [MapServer Error]: msLoadMapContext(): Invalid XML file
(/data/geoservices/apps/geoservices/htdocs/ionic.cml)
 in /data/geoservices/apps/geoservices/htdocs/wmc_ionic.php on line 5

So I added the XML header by hand. Then the following problem occurs:

PHP Warning:  [MapServer Error]: msLoadMapContext(): Unable to set units
for projection ''

Could it be that the Mapserver code assumes a 5 letter SRS EPSG code? If I
use e.g. 28992 it runs fine.

sprintf(pszProj, "init=epsg:%s", pszValue+5);

I have seen a few other potential problems in the Mapserver code:

1) the parsing code for queryable etc. assumes to get a 0 or 1, whereas
true or false are also valid values for xs:boolean

2) when outputting a WMC, Mapserver uses WMS for the value of the service
attribute of Server, whereas the OGC example (on schemas.opengis.net) as
well as Ionic use OGC:WMS

<Server service="OGC:WMS"

I have attached the context if somebody is interested to try this out.

Best regards,
Bart


------------------------------------------------------------------------

  <ViewContext xmlns:xlink="http://www.w3.org/1999/xlink"; xsi:schemaLocation="http://www.opengis.net/context 
http://schemas.opengis.net/context/1.0.0/context.xsd"; xmlns="http://www.opengis.net/context"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; id="none" version="1.0.0">
    <General>
      <Window width="600" height="300"></Window>

      <BoundingBox SRS="EPSG:4326" miny="28.200000000000017" maxy="58.80000000000001" 
maxx="41.39999999999999" minx="-19.799999999999994"></BoundingBox>

      <Title>World view</Title>

      <Abstract>Example Context</Abstract>

    </General>

    <LayerList>
      <Layer hidden="0" queryable="false">
        <Server service="OGC:WMS" title="WORLD" version="1.1.1">
          <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"; 
xlink:href="http://webservices.ionicsoft.com/worldData/map/WORLD"; 
xlink:type="simple"></OnlineResource>

        </Server>

        <Name>WORLD</Name>

        <Title>WORLD</Title>

        <Abstract></Abstract>

        <StyleList>
          <Style current="1">
            <Name>default</Name>

            <Title>default</Title>

          </Style>

        </StyleList>

      </Layer>

    </LayerList>

  </ViewContext>


--
Daniel Morissette
http://www.mapgears.com/

Reply via email to