alexander-petkov / wfas

A placeholder for the WFAS project.
4 stars 1 forks source link

Add regional boundaries to AWS Geoserver deployment #37

Open wmjolly opened 3 years ago

wmjolly commented 3 years ago

Add regional boundaries for:

US Forest Service (USFS) Bureau of Land Management (BLM) National Park Service (NPS) US Fish and Wildfire Service (FWS) Bureau of Indian Affairs (BIA)

wmjolly commented 3 years ago

Administrative Forests should use this layer: https://data.fs.usda.gov/geodata/edw/edw_resources/shp/S_USA.AdministrativeRegion.zip

wmjolly commented 3 years ago

image

The entire West coast is missing from this National Park Service regional boundary.

wmjolly commented 3 years ago

image

DOI regions seems to be missing some parts of the country as well.

alexander-petkov commented 3 years ago

Fixed DOI and National Park Service regional boundaries. Which BLM layers should I configure under Geoserver? Screenshot from 2020-12-02 12-46-31

wmjolly commented 3 years ago

We should use this one: https://gis.blm.gov/EGISDownload/LayerPackages/BLM_National_Administrative_Units.zip

alexander-petkov commented 3 years ago

We should use this one: https://gis.blm.gov/EGISDownload/LayerPackages/BLM_National_Administrative_Units.zip

That archive contains the five layers in the screenshot above. Should I configure one or al of them under Geoserver?

wmjolly commented 3 years ago

Let's just publish them all but I think we only need the state_poly.

alexander-petkov commented 3 years ago

Now I need to figure out how to get BIA data.

wmjolly commented 3 years ago

Let's hold off on BIA for now. I'm not sure we'll need that one.

On Thu, Dec 3, 2020 at 11:11 AM alexander-petkov notifications@github.com wrote:

Now I need to figure out how to get BIA data.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/alexander-petkov/wfas/issues/37#issuecomment-738187184, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4G3D7CCCFLY7SONX7SXW3SS7ID5ANCNFSM4UK3VDFA .

alexander-petkov commented 3 years ago

Layer Groups

The main requirement for these layers is to return features from all of them for a point (or a geometry) which is contained. Hopefully with a single request, for convenience.

There is the concept of Layer Groups in Geoserver, where layers can be grouped under a variety of modes and addressed as a single layer in a request:

https://docs.geoserver.org/latest/en/user/data/webadmin/layergroups.html

I created a group named admin_unit_boundaries defined in EPSG:4326, and containing the following layers:

Screenshot from 2020-12-03 20-16-29

Clicking on the OpenLayers map preview for this group gives feature results from all layers:

Screenshot from 2020-12-03 20-22-17

I haven't worked an example with a WPS, but should be possible to extract JSON results for all layers in the group.

I think even a straight forward WFS GetFeature request would work with a cql filter.

alexander-petkov commented 3 years ago

Here is a WMS GetFeatureInfo request that gets us pretty close to what's needed:

https://aws.wfas.net/geoserver/wfas/wms?
   SERVICE=WMS
   &VERSION=1.1.1
   &REQUEST=GetFeatureInfo
   &QUERY_LAYERS=wfas%3Aadmin_unit_boundaries
   &LAYERS=wfas%3Aadmin_unit_boundaries
   &INFO_FORMAT=application%2Fjson
   &FEATURE_COUNT=5
   &X=1&Y=1
   &SRS=EPSG%3A4326
   &WIDTH=1&HEIGHT=1
   &BBOX=-110.000001%2C44%2C-110%2C44.000001

Here I queried the layer group for lat/lon coordinates (44 -110). I padded the coordinates to the highest precision allowed (7 decimal digits) in order to get a bounding box.

FEATURE_COUNT will return a specified number of features. The layer group has 5 boundary layers, so FEATURE_COUNT should equal 5 to get information for every layer in the group. If FEATURE_COUNT is higher than 5, we'd still get 5 features returned, since our bbox parameter covers a very small area.

Supported output formats are:

alexander-petkov commented 3 years ago

Looks like GetFeatureInfo requests work even when one of the layers in a group is a raster.

From the Spearfish Demo:

Screenshot from 2020-12-07 06-13-09

wmjolly commented 3 years ago

So we can do a layer group of rasters and vectors and it works the same way? This is pretty cool Alex.

On Mon, Dec 7, 2020 at 6:20 AM alexander-petkov notifications@github.com wrote:

Looks like GetFeatureInfo requests work even when one of the layers in a group is a raster.

From the Spearfish Demo:

[image: Screenshot from 2020-12-07 06-13-09] https://user-images.githubusercontent.com/39599557/101355241-89300a00-3853-11eb-9e03-a305572f0182.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/alexander-petkov/wfas/issues/37#issuecomment-739914019, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4G3DYIEQRXDYFDYY7MRUDSTTJCLANCNFSM4UK3VDFA .