Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider changing some metadata elements from required to optional #855

Closed
3 tasks done
karenmajewicz opened this issue Nov 19, 2019 · 5 comments · Fixed by #871
Closed
3 tasks done

Consider changing some metadata elements from required to optional #855

karenmajewicz opened this issue Nov 19, 2019 · 5 comments · Fixed by #871
Assignees
Labels
topic:metadata Issues that involve metadata editing tools, strategies, and rules

Comments

@karenmajewicz
Copy link
Contributor

karenmajewicz commented Nov 19, 2019

Descriptive summary

The GeoBlacklight schema requires several elements that effectively restrict what kind of layers can be loaded into a GeoBlacklight application. Examples of records that someone might want to add to GeoBlacklight without adding a value for a required element include:

  • Scanned map without bounding box coordinates (no solr_geom)
  • Collection level record describing a group or subject (potentially no layer_geom_type_s, solr_geom, or provenance)
  • Collective record held by multiple institutions (multiple provenances)
  • Resource held by external organization (no institutional or obvious provenance)

Additionally, there is a slight discrepancy between the required elements in the schema documentation as opposed to what is actually necessary to load into the application. This table shows the affected elements (at least as configured for the BTAA geoportal - please update if these are incorrect for default GeoBlacklight):

element name required by schema documentation required for loading into application tied to icon display
dc_identifier_s X X
dc_rights_s X X X
dc_title_s X X
dct_provenance_s X X X
geoblacklight_version X
layer_slug_s X X
solr_geom X ?
layer_geom_type_s X X

Proposed Changes

This ticket proposes that we consider releasing the requirement for the following elements to facilitate more flexible records:

  • dct_provenance_s
  • solr_geom
  • layer_geom_type_s

Perhaps we could add another level to the schema beyond Required & Optional to indicate that these values are "Strongly Recommended"?

Related work

Link to related tickets or prior related work here.

#628 (geometry type is still causing browser error for BTAA; anyone else?)

@karenmajewicz karenmajewicz added the topic:metadata Issues that involve metadata editing tools, strategies, and rules label Nov 19, 2019
@ewlarson ewlarson self-assigned this Jan 23, 2020
@ewlarson ewlarson moved this from To do to In progress in Winter Code Sprint 2020 Jan 23, 2020
@karenmajewicz
Copy link
Contributor Author

karenmajewicz commented Jan 23, 2020

Some investigations:

Omitting Provenance: the record loads to Solr, but the page does not display in the application. A workaround is including the field in the record and setting the value to a space.

Omitting Geometry Type: the record loads to Solr and a direct link to the page works. However, faceted search pages that include the record will return a 500 error.

Omitting Solr Geom (bounding box): this seems to work fine in the BTAA geoportal. Does it work for others?

@karenmajewicz
Copy link
Contributor Author

testRecords.zip

@ewlarson Here are 3 records to use for testing.

@ewlarson
Copy link
Member

Running your test docs using GeoBlacklight#master. Here's what I'm seeing:

No Solr Geom

Mostly this just seems to work, with the caveat any map-based query will exclude these documents from a bounding-box-scoped search.

Also, clicking on a result item to view the show page creates a JS error: "Uncaught Invalid bounding box string"

/**
* Convert bounding box string to Leaflet LatLngBounds.
* @param {String} bbox Space-separated string of sw-lng sw-lat ne-lng ne-lat
* @return {L.LatLngBounds} Converted Leaflet LatLngBounds object
*/
L.bboxToBounds = function(bbox) {
bbox = bbox.split(' ');
if (bbox.length === 4) {
return L.latLngBounds([[bbox[1], bbox[0]], [bbox[3], bbox[2]]]);
} else {
throw "Invalid bounding box string";
}
};

no_solr_geom_js_error

Possible resolution

We'll need to adjust the event handler here to not expect every result to have a bbox.


Omitting Provenance

Show action does not display. Record errs calling BL's "fetch" method in this GBL function:

https://github.com/geoblacklight/geoblacklight/blob/master/app/models/concerns/geoblacklight/solr_document.rb#L47-L49

Screen Shot 2020-01-23 at 3 16 27 PM

Possible resolution

Wrap the GBL same_institution? method to check the doc for provenance.


Omitting Geometry Type

I'm not seeing anything wrong here. Doc works in GeoBlacklight. Perhaps a Geoportal customization is causing this document to fail there?

omitting_geom_type


I'll start working on fixes for the first two scenarios here.

ewlarson added a commit that referenced this issue Jan 24, 2020
ewlarson added a commit that referenced this issue Jan 24, 2020
Only draw a bounding box on the map if data-bbox exists.

Addresses #855
@ewlarson
Copy link
Member

@karenmajewicz The code side of this issue is now resolved in my branch. Once this is merged, we'll need to update our schema documentation accordingly.

ewlarson added a commit that referenced this issue Jan 24, 2020
ewlarson added a commit that referenced this issue Jan 24, 2020
Only draw a bounding box on the map if data-bbox exists.

Addresses #855
@ewlarson ewlarson moved this from In progress to Review in Winter Code Sprint 2020 Jan 24, 2020
@karenmajewicz
Copy link
Contributor Author

Updated chart [in progress]

element name required by schema documentation errors if missing tied to app behavior
dc_identifier_s X  
dc_rights_s X record will not display icon and layer access
dc_title_s X  if missing, slug will display as title
dct_provenance_s X [requirement removed in PR #871 ] icon
geoblacklight_version X    
layer_slug_s X will not load to Solr (assuming it is configured as key) solr key and item slug
solr_geom X spatial index, bbox display  
layer_geom_type_s   [js errors fixed in PR #871] icon

@karenmajewicz karenmajewicz moved this from Review to Done in Winter Code Sprint 2020 Jan 31, 2020
mejackreed pushed a commit that referenced this issue Jun 2, 2020
mejackreed pushed a commit that referenced this issue Jun 2, 2020
Only draw a bounding box on the map if data-bbox exists.

Addresses #855
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:metadata Issues that involve metadata editing tools, strategies, and rules
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants