I'm trying to use an OGC web feature service in some software I am involved in developing. The service is described at the bottom of this page: https://hazards.fema.gov/femaportal/wps/portal/NFHLWMS

The problem I am having is that sometimes this service works and I am able to download data and other times I get an error when trying to download data.

Here is an example:

When I type the following web address into a browser, the web service returns a GML file with some valid data that can be read into any application that supports reading GML files (this example is on the above web page; I have made a slight variation to get it to work):


However, when I use the following web address, I get an http 400 error:


Everything is the same in both addresses, but the second one has different "BBOX" or bounding box coordinates. Both should have valid flood hazard zone data. Do you know why the second request returns the HTTP error code? Is there a way to work around this problem?

  • My browser just hangs on the second URL. Could you try a smaller bounding box? It's pretty small now, but perhaps just as a test.
    – user1462
    Sep 4, 2018 at 21:02
  • I've tried smaller areas such as this with the same result: hazards.fema.gov/gis/nfhl/services/public/NFHL/MapServer/… I know that different areas such as the one described above work fine. This particular area has problems though. It used to work (2 months ago). I think it could be because FEMA has somehow limited the amount of data that can be downloaded and this area has a large polygon.
    – Burrow
    Sep 5, 2018 at 3:05
  • This still doesn't work with the FEMA WFS server as described above, but the URLs above were incorrect (the first one was working before though) and I updated them. The Lat/Lon coordinates for the BBOX parameter were in the wrong order.
    – Burrow
    Sep 19, 2018 at 20:18

2 Answers 2


It seems that this service struggles with large(ish) requests. If you change your second request to maxFeatures=10 it returns correctly so there is no issue with the bounds or the request, it is just too big.

It may be worth contacting FEMA (though there is no contact information in the capabilities document) and suggesting they switch to a better server such as GeoServer or MapServer that could handle this data better.

  • thank you for this response. Lowering the maxFeatures works for me also. From my testing, it looks like the 26th feature requested gives me the http 400 error and times out. I think the likelihood of getting FEMA to convert from their ESRI server to GeoServer or MapServer is very low, but I'll contact them.
    – Burrow
    Sep 6, 2018 at 3:45
  • Alternatively you could ask for the data and serve it your self
    – Ian Turton
    Sep 6, 2018 at 7:26

You can determine the number of results by using resultType=hits& like:


Gives us 27

Then you can page through the results set using the count=& and startindex=& to get all the results.

So for the first 5 (five gives me results haven't tried a larger number)


then next 5 ...


then ...

  • This helped me figure out which feature gave me the http 400 error. It was feature #26. All the other ones seem to work. I wonder if there's a way to query which features won't work and to request everything besides the invalid features.
    – Burrow
    Sep 6, 2018 at 3:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.