Skip to content

WFS map-source and BBOX coordinates SRS #524

Description

@brentfraser

I'm trying to set up a map-source of type="wfs", mostly to test and document. I did some searching and found a candidate server

https://sdmdataaccess.nrcs.usda.gov/WebServiceHelp.aspx#SDMWGS84Geographic

Looking getCapabilities doc, it says the layer typename=mapunitpolythematic

<FeatureType>
  <Name>mapunitpolythematic</Name>
  <Title>Soil Mapunit Polygon Thematic Map</Title>
  <Abstract>
    Map unit polygons delineating a selected soil interpretation.
  </Abstract>
  <ows:Keywords>
    <ows:Keyword>Soils</ows:Keyword>
    <ows:Keyword>SSURGO Mapunit</ows:Keyword>
    <ows:Keyword>mapunit polygons</ows:Keyword>
    <ows:Keyword>mapunit interpretation</ows:Keyword>
  </ows:Keywords>
  <DefaultSRS>urn:ogc:def:crs:EPSG::4326</DefaultSRS>
  <OutputFormats>
    <Format>text/xml; subtype=gml/3.1.1</Format>
  </OutputFormats>
  <ows:WGS84BoundingBox dimensions="2">
    <ows:LowerCorner>-179.9999 -80</ows:LowerCorner>
    <ows:UpperCorner>179.9999 80</ows:UpperCorner>
  </ows:WGS84BoundingBox>
  <MetadataURL format="text/xml" type="TC211">
    https://SDMDataAccess.sc.egov.usda.gov/Spatial/SDMWGS84GEOGRAPHIC.wfs?request=GetMetadata&layer=mapunitpolythematic
  </MetadataURL>
</FeatureType>

It looks like it prefers (requires?) EPSG:4326 , and GeoMoose sends the BBOX as:

bbox=-10383601.716728799,5535877.43392501, -10351765.69444802,5569471.507856345, EPSG:3857

Which the server rejects:

Error getting BBOX and extent area from WFS request string (shorthand BBOX filter) - invalid Bounding Box coordinate format (shorthand BBOX).

Having a look at vector.js, around line 80:

                const url_params = Object.assign({}, mapSource.params, {
                    'srsname': 'EPSG:3857',
                    'outputFormat': output_format,
                    'service': 'WFS',
                    'version': '1.1.0',
                    'request': 'GetFeature',
                    'bbox': extent.concat('EPSG:3857').join(',')
                });

I see GM will always send the BBOX in EPSG:3857. While I think we need to change this to allow the map-source parameters to override the default GM ones, instead of the other way around (as is is now).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions