LatLongBoundingBox problem with WFS server

Etienne Dube etdube at GMAIL.COM
Tue Jun 21 06:19:13 PDT 2005


Hello,

I'm trying to use MapServer as a WFS server, pulling data from a PostGIS 
DB. My original data is not projected, it's in geographic coordinates 
(lat/long) in the NAD83 datum. When I use the GET method to issue a 
'getcapabilities' request it displays the XML file, but I get weird 
bounding box coordinates :

<LatLongBoundingBox minx="-2.5e+007" miny="-2.5e+007" maxx="2.5e+007" 
maxy="2.5e+007"/>

The extent defined in my MAP file is -69.2 45.0 -33.2 48.2 (in decimal 
degrees). When I try to open the WFS layer in uDig, I can't see 
anything, uDig seems to be confused by the wrong numbers in 
LatLongBoundingBox (when I'm moving the mouse around in the map window, 
it displays out of bound coordinates). On the other hand, when I issue a 
'getfeature' request from a web browser, I get the right numbers for the 
<gml:coordinates> tags :

<gml:coordinates>-69.588602,44.311578 
-62.161745,48.794835</gml:coordinates>

Here is my MAP file :


NAME CRADWFS
      STATUS ON
      SIZE 400 300
      SYMBOLSET ../etc/symbols.sym
      EXTENT -69.200 45.000 -63.200 48.200
      UNITS DD
      IMAGECOLOR 255 255 255
      FONTSET ../etc/fonts.txt
      WEB
        IMAGEPATH "/ms4w/tmp/ms_tmp/"
        IMAGEURL "/ms_tmp/"
        METADATA
          "wfs_title"            "Test wfs craddata"  ## REQUIRED
          "wfs_onlineresource"   
"http://localhost/cgi-bin/mapserv.exe?map=../../apps/gmap/htdocs/wfstest.map&"  
## Recommended
          "wfs_srs"              "EPSG:4269"  ## Recommended
        END
      END

      PROJECTION
        "init=epsg:4269"
      END

      LAYER
        NAME maritimescd
        METADATA
          "wfs_title"    "maritimescd" ## REQUIRED
        END
        TYPE POLYGON
        STATUS ON
        CONNECTIONTYPE POSTGIS
        CONNECTION "dbname=craddata user=crad password=*******"
        DATA "geom from tmp_maritimescd"
        PROJECTION
          "init=epsg:4269"
        END
        DUMP TRUE           ## REQUIRED
        CLASS
          NAME "maritimescd"
          COLOR 128 128 128
          OUTLINECOLOR 0 0 0
        END
      END # Layer
END # Map File


Any ideas? Thanks,

Etienne



More information about the MapServer-users mailing list