Open mhines-usgs opened 8 years ago
@mhines-usgs, the OP is service-oriented, not file-oriented, so a user would upload a shapefile to ScienceBase, which would make it available via a WFS service. The OP could then consume the WFS service, according to https://github.com/USGS-CMG/usgs-cmg-portal/issues/176#issuecomment-196528782
Axiom folks, how do you see us getting WFS data layers from ScienceBase into the Portal?
Can we try an example with this WFS endpoint: https://www.sciencebase.gov/catalogMaps/mapping/ows/5342c5fce4b0aa151574a8ed for the portal?
Here's what it looks like in Python: https://github.com/rsignell-usgs/notebook/blob/master/WFS/WFS_plot_in_Cartopy.ipynb
Here's what it looks like in TerriaJS (clicked on "add data" and pasted the WFS endpoint)
It would be great to have the ability to display WFS in the portal, and also to be able to click on the feature to get info, as in TerriaJS:
Example WFS is here: http://cmgdata.usgsportals.net/#map?lg=813383f3-1d48-46f7-8822-a66a12fda8aa&p=proj3857&b=google_hybrid
I'll look into the click functionality with @akbstone
Excellent. Thanks.
@kwilcox how do we go about adding WFS layers to the portal?
Can we just add items with WFS endpoints and project=CMG_Portal
to be discovered via our CSW endpoint?
@rsignell-usgs If you start adding datasets to your CSW that have WMS and WFS service definitions then I can work on the automation on my side to get them into the portal. When you get an example dataset in there throw me the UUID so I can start looking at it.
@kwilcox, okay, cool. @zdefne-usgs , can you see if you can get ISO metadata out of ScienceBase for that dataset?
Here is a dataset we actually plan to have on the portal. I believe WFS is not necessary, WMS should work for this purpose (#176). https://www.sciencebase.gov/arcgis/services/Catalog/59a427efe4b077f005673271/MapServer/WMSServer?request=GetCapabilities&service=WMS
ISO metadata are available from Sciencebase page for each dataset: https://www.sciencebase.gov/catalog/item/59a427efe4b077f005673271?format=isohtml
The metadata where I added the 'CMG_Portal' is available here: https://github.com/USGS-CMG/usgs-cmg-portal/blob/master/gis_usgs_cmg/lrr_59a427efe4b077f005673271.xml
@kwilcox, @rsignell-usgs We would like to present this feature at an outreach event for high school teachers in mid-July. Please see my reply above and let me know if you need anything else from me. Thanks.
@kwilcox, this event is coming up in 2 weeks. Any chance of getting getFeatureInfo
working for the GIS layers?
If you query CSW like:
val = 'CMG_Portal'
filter1 = fes.PropertyIsLike(propertyname='apiso:AnyText',literal=('*%s*' % val),
escapeChar='\\',wildCard='*',singleChar='?')
val = 'EBFNWR'
filter2 = fes.PropertyIsLike(propertyname='apiso:AnyText',literal=('*%s*' % val),
escapeChar='\\',wildCard='*',singleChar='?')
filter_list = [fes.And([filter1, filter2])]
get_csw_records(csw, filter_list, maxrecords=1000)
print(len(csw.records.keys()))
for rec in list(csw.records.keys()):
print('title:'+csw.records[rec].title)
print('identifier:'+csw.records[rec].identifier)
print('modified:'+csw.records[rec].modified)
pprint(csw.records[rec].references[2])
print(' ')
you should get back 1 GIS record:
1
title:Conceptual salt marsh units for wetland synthesis: Edwin B. Forsythe National Wildlife Refuge, New Jersey
identifier:57fe81fbe4b0824b2d148389
modified:2016-10-28T19:11:45Z
{'scheme': 'WWW:LINK-1.0-http--link',
'url': 'https://www.sciencebase.gov/arcgis/rest/services/Catalog/57fe81fbe4b0824b2d148389/MapServer/kml/mapImage.kmz'}
Is that sufficient for you guys to take the next step?
This dataset was auto-added to the portal from the CSW: https://cmgdata.usgsportals.net/#module-metadata/326b04bc-a68c-477c-a7fc-558d4cdf1895/e15b9093-bcf9-4e1f-8d5f-f9fa614c1a06
Is this all set?
@kwilcox, To implement the point and get feature info? Yes, it is ready for you to implement click and get feature info.
As of now not all of the ISO xml in the gis_usgs_cmg show on the portal. That is a separate issue that I will be looking into. @rsignell-usgs, I uploaded the iso.xml in the folder following the instructions. Which code do we need to run to update the catalog?
Does the OP allow data uploads as a shapefile data type?