Opened 14 years ago

Last modified 14 years ago

#3580 new defect

WFS 1.0 Capabilities has wrong latlong box in some cases

Reported by: warmerdam Owned by: mapserverbugs
Priority: normal Milestone:
Component: WFS Server Version: svn-trunk (development)
Severity: normal Keywords:
Cc:

Description

A WFS 1.0 GetCapabilities against the attached map file produces a capabilities response including:

    <FeatureType>
        <Name>road</Name>
        <Title>road</Title>
        <SRS>EPSG:3978</SRS>
        <LatLongBoundingBox minx="2.25898e+06" miny="-70747.9" maxx="2.61535e+06" maxy="495481" />
    </FeatureType>
    <FeatureType>
        <Name>popplace</Name>
        <Title>popplace</Title>
        <SRS>EPSG:3978</SRS>
        <LatLongBoundingBox minx="2.2794e+06" miny="-55344.5" maxx="2.60038e+06" maxy="461587" />
    </FeatureType>
    <FeatureType>
        <Name>multi</Name>
        <Title>multi</Title>
        <SRS>EPSG:27700</SRS>
        <LatLongBoundingBox minx="0" miny="0" maxx="100" maxy="100" />
    </FeatureType>

The request is:

 map=[MAPFILE]&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetCapabilities

The map file should be evaluated sitting in msautotest/wxs.

The latlong bounding boxes are returned in projected coordinates instead of being transformed to latlong. Notably the map has no map level projection set.

Attachments (1)

wfs_ogr.map (6.0 KB ) - added by warmerdam 14 years ago.

Download all attachments as: .zip

Change History (4)

by warmerdam, 14 years ago

Attachment: wfs_ogr.map added

comment:1 by warmerdam, 14 years ago

Reviewing the code (msWFSDumpLayer() and msOWSPrintLatLonBoundingBox()) it appears this can only work properly if the default SRS is lat/long though I might be missing something.

comment:2 by warmerdam, 14 years ago

Version: unspecifiedsvn-trunk (development)

comment:3 by warmerdam, 14 years ago

I should note that WFS 1.1 GetCapabilities is fine where the following code forces things to lat/long:

        /*convert to latlong*/
        if (lp->projection.numargs > 0)
        {
            if (!pj_is_latlong(&lp->projection.proj))
              msProjectRect(&lp->projection, NULL, &ext);
        }
        else if (map->projection.numargs > 0 && !pj_is_latlong(&map->projection.proj))
          msProjectRect(&map->projection, NULL, &ext);
Note: See TracTickets for help on using tickets.