invalide extension in the wms capabilit y file
Chris Tweedie
chris at NARX.NET
Tue Feb 7 19:59:14 PST 2006
Rainer, depends on your use i guess.
Have a read through all the options at,
http://mapserver.gis.umn.edu/docs/howto/wms_server/?searchterm=wms
Most of the optional paramters are for CITE compliance or other
features (such as WMS-Time and WFS).
So long as your capabilities are reporting the correct online_resource
url and a correct BBOX, most clients should function without any
problems.
Chris
Quoting Rainer Spittel <rainer.spittel at terralink.co.nz>:
> Hi Chris
>
> cool, now it works. Thanks a lot.
>
> Might there be some more wms-metadata fields I should add except the
> mandatory fields?
>
> Cheers
> Rainer Spittel
>
> -----Original Message-----
> From: chris at narx.net [mailto:chris at narx.net]
> Sent: Wednesday, 8 February 2006 2:02 p.m.
> To: Rainer Spittel
> Cc: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] invalide extension in the wms capability
> file
>
>
> Rainer,
>
> try adding the wms_extent parameter to your LAYER / METADATA object.
>
> This will override the need for MS to try and determine the extents
> from PostGIS, i have had some occasions where the BBOX was reported
> incorrectly (especially from postgis/sde). Just make sure what you
> specify is in the correct SRS.
>
> eg.
> LAYER ..
> METADATA
> wms_extent "2000073 5310090 3001881 6785641"
>
> Quoting Rainer Spittel <rainer.spittel at TERRALINK.CO.NZ>:
>
>> Hi there,
>>
>> I have a problem with my WMS server. I am using the NZMG (ESPG:27200)
>> projection and my php client is accessing and visualise the data
>> perfect. But when I call the WMS service, I get a <inf> value in the
>> extention of the layers. I checked the exstension. ogrinfo delivers
>> the used map's extension and the epsg definition file defines the
>> projection as follow:
>>
>> # NZGD49 / New Zealand Map Grid
>> <27200> +proj=nzmg +lat_0=-41 +lon_0=173 +x_0=2510000 +y_0=6023150
>> +ellps=intl +units=m +no_defs no_defs <>
>>
>> The mapfile is like this:
>>
>> MAP
>> NAME "devServer"
>> STATUS ON
>>
>> # New Zealand
>> EXTENT 2000073 5310090 3001881 6785641
>>
>> SIZE 640 400
>>
>> # ---- parameters
>> SHAPEPATH "/opt/fgs-base/data"
>>
>> FONTSET "../etc/fonts.txt"
>> SYMBOLSET "../etc/symbols.sym"
>>
>> [...]
>>
>> PROJECTION
>> "init=epsg:27200" # NZMG (temporal projection)
>> END
>>
>> WEB
>> METADATA
>> wms_title "NZ - Portal DevBox (WMS)"
>> wms_onlineresource "http://test:8082/cgi-bin/wms_service?"
>> wms_srs "epsg:27200 epsg:4326"
>> END
>>
>> # ---- path
>> IMAGEPATH "/opt/fgs-base/tmp/ms_tmp/"
>> IMAGEURL "/ms_tmp/"
>> LOG "/opt/fgs-base/tmp/ms_tmp/gmap.log"
>> END
>>
>> [...]
>> LAYER
>> NAME "area"
>> GROUP "Basemap"
>> STATUS OFF
>>
>> CONNECTIONTYPE POSTGIS
>> CONNECTION "host=localhost dbname=... user=... password=..."
>> DATA "the_geom from (select * from area) as foo USING UNIQUE gid
>> USING srid=27200"
>> TYPE POLYGON
>>
>> # ---- setting up on the fly projection
>> PROJECTION
>> "init=epsg:27200"
>> END
>>
>> TEMPLATE "ttt.html"
>>
>> METADATA
>> wms_title "Area"
>> END
>>
>> # ---- classification for graphical visualization
>> CLASS
>> NAME "Areal;Areal"
>> STYLE
>> COLOR 255 0 0
>> OUTLINECOLOR 0 0 0
>> END
>> END
>> END
>> END #Mapfile
>>
>> Calling the GetCapabilities request delivered following entities in
>> the extension of the maps:
>>
>> <?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?> <!DOCTYPE
>> WMT_MS_Capabilities SYSTEM
>> "http://schemas.opengeospatial.net/wms/1.1.1/WMS_MS_Capabilities.dtd"
>> [
>> <!ELEMENT VendorSpecificCapabilities EMPTY>
>> ]> <!-- end of DOCTYPE declaration -->
>>
>> <WMT_MS_Capabilities version="1.1.1">
>>
>> <!-- MapServer version 4.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG
>> OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER
>> SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
>> INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -->
>>
>> <Service>
>> <Name>OGC:WMS</Name>
>> <Title>devServer</Title>
>> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
>> xlink:href="http://test:8082/cgi-bin/wms_service?"/>
>> </Service>
>>
>> <Capability>
>> <Request>
>> [...]
>> [...]
>> </Request>
>> <Exception>
>> [...]
>> [...]
>> </Exception>
>> <VendorSpecificCapabilities />
>> <UserDefinedSymbolization SupportSLD="1" UserLayer="0" UserStyle="1"
>> RemoteWFS="0"/> <Layer>
>> <Name>devServer</Name>
>> <Title>NZ - Portal DevBox (WMS)</Title>
>> <SRS>epsg:27200 epsg:4326</SRS>
>> <LatLonBoundingBox minx="166.266" miny="-47.4146" maxx="179.484"
>> maxy="-34.0029" />
>> <BoundingBox SRS="EPSG:27200"
>> minx="2.00007e+06" miny="5.31009e+06" maxx="3.00188e+06"
>> maxy="6.78564e+06" />
>> <Layer>
>> <Layer queryable="1" opaque="0" cascaded="0">
>> <Name>area</Name>
>> <Title>Area</Title>
>> <SRS>EPSG:27200</SRS>
>> <LatLonBoundingBox minx="-153.889" miny="-75.0898" maxx="121.962"
>> maxy="inf" />
>> <BoundingBox SRS="EPSG:27200"
>> minx="-2.5e+07" miny="-2.5e+07" maxx="2.5e+07"
>> maxy="2.5e+07" />
>> <Style>
>> <Name>default</Name>
>> <Title>default</Title>
>> <LegendURL width="18" height="12">
>> <Format>image/png</Format>
>> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
>> xlink:type="simple"
>>
> xlink:href="http://test:8082/cgi-bin/wms_server?version=1.1.1&service=WM
> S&request=GetLegendGraphic&layer=b_area&format=image/png"/>
>> </LegendURL>
>> </Style>
>> </Layer>
>> </Layer>
>> </Layer>
>> </Capability>
>> </WMT_MS_Capabilities>
>>
>> The entity maxy="inf" in the LatLonBoudningBox field makes big
>> problems for WMS clients to parse this capability file. What might be
>> wrong on that?
>>
>> Cheers
>> Rainer
>>
>
More information about the MapServer-users
mailing list