[mapguide-users] WMS config files and image formats

Berg, James James.Berg at stantec.com
Thu Jun 6 11:23:17 PDT 2013


Ah, I see. I had a feeling the image format had something to do with it.

Just as an update, we managed to solve our WMS problem. We started using a different WMS: http://geoint.lmic.state.mn.us/cgi-bin/wms?VERSION=1.3.0&SERVICE=WMS&REQUEST=GetCapabilities which is almost the same as the previous WMS. The difference is that the original has a single layer that is a composite of about 50 aerials. This WMS lists the layers individually.

Through a stroke of luck we managed to expose a layer by modifying the config document. Not sure what we did right. Even with the Format tag set to JPG it still works somehow. Clicking the Advanced button in Maestro now throws an error "Object reference not set to an instance of an object" but I don't mind because the its working otherwise. Here's the config document that works with this new wms:

<?xml version="1.0" encoding="UTF-8"?>
<DataStore xmlns:fdo="http://fdo.osgeo.org/schemas" xmlns:gml="http://www.opengis.net/gml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://fdo.osgeo.org/schemas" xsi:schemaLocation="http://fdo.osgeo.org/schemas FdoDocument.xsd">
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://fdo.osgeo.org/schemas/feature/WMS" xmlns:fdo="http://fdo.osgeo.org/schemas" xmlns:WMS="http://fdo.osgeo.org/schemas/feature/WMS" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:element name="nga2012Type" type="WMS:nga2012Type" abstract="false" substitutionGroup="gml:_Feature">
      <xs:key name="nga2012TypeKey">
        <xs:selector xpath=".//nga2012Type"/>
        <xs:field xpath="Id"/>
      </xs:key>
    </xs:element>
    <xs:complexType name="nga2012Type" abstract="false">
      <xs:complexContent>
        <xs:extension base="gml:AbstractFeatureType">
          <xs:sequence>
            <xs:element name="Id">
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="256"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="Image" type="fdo:RasterPropertyType" fdo:defaultImageXSize="800" fdo:defaultImageYSize="600">
              <xs:annotation>
                <xs:appinfo source="http://fdo.osgeo.org/schemas">
                  <fdo:DefaultDataModel organization="Row" bitsPerPixel="32" tileSizeX="100" tileSizeY="100"/>
                </xs:appinfo>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:schema>
  <SchemaMapping provider="OSGeo.WMS.3.1" name="WMS" xmlns="http://fdowms.osgeo.org/schemas">
    <complexType name="nga2012Type">
      <RasterDefinition name="Image">
        <Format>JPG</Format>
        <Transparent>false</Transparent>
        <BackgroundColor>0xFFFFFF</BackgroundColor>
        <Time />
        <Elevation />
        <SpatialContext>EPSG:26915</SpatialContext>
        <Layer name="nga2012">
          <Style name="" />
        </Layer>
      </RasterDefinition>
    </complexType>
  </SchemaMapping>
</DataStore>

-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Jackie Ng
Sent: Thursday, June 06, 2013 7:15 AM
To: mapguide-users at lists.osgeo.org
Subject: Re: [mapguide-users] WMS config files and image formats

Ok, here is the problem.

The configuration contains a bad mime type for the jpeg format. This is what's causing MapGuide to throw that MgUnclassifiedException

It's image/jpg when it should be image/jpeg

And that's the solution, fix that bad mime type by editing the configuration document's XML form and replace "image/jpg" with "image/jpeg", at least until I fix the problem in Maestro proper.

- Jackie



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMS-config-files-and-image-formats-tp5057179p5058397.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users



More information about the mapguide-users mailing list