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

Adding overview images to records #35

Open
andy3092 opened this issue Sep 24, 2018 · 6 comments
Open

Adding overview images to records #35

andy3092 opened this issue Sep 24, 2018 · 6 comments

Comments

@andy3092
Copy link

Overview images are not being added or appearing in metadata records under this schema due to a new way overview images are handled in the iso19115-3 schema. This is due to the deprecation of the old method. See the discussion below for further details.

Hi Guys
Note: in ISO 19115-3 there is a new way of managing overviews
The original way is still there but deprecated
Ideally use:

/mdb:MD_Metadata/mdb:identificationInfo/mri:MD_DataIdentification/mri:graphicOverview/mcc:MD_BrowseGraphic/~
     mcc:fileName/gco:CharacterString       <!-- this element is mandatory although cit:name below duplicates its use -->
                                                                                 <!-- this was always a clumsy way of providing the filePath -->
                                                                                 <!-- this element could be managed as null eg  mcc:filename/ -->
     mcc:linkage/cit:CI_OnlineResource/~
            cit:linkage/gco:CharacterString        <!-- this was claen way of providing the filePath -->
            cit:name/gco:CharacterString          <!-- Tidier way of dealing with the name (not filename) of the browse graphic -->
            cit:description/gco:CharacterString <!-- Good way of dealing with the WCAG2 requirements for description of images -->
     

Cheers

e
BLEYS Evert Mr
Data Manager
Australian Bureau of Agricultural and Resource Economics and Sciences
Department of Agriculture and Water Resources

Hi All

I have been testing the iso19115-3 template using 3.4.3 with the
iso19115-3 schema being compiled in.

I have been having issues with adding overview images to new records.
I go through the motions of trying to add a new resource.

Setting the as Link dropdown as Overview for the rull resource or a
subset

I add the url for the image, the image appears and then I click the
green Add online resource button.

The window disappears and takes me back to the metadata record.

With no overview resource being added. Saved the metadata record still
no overview visible.

Tried it by uploading an image and selecting it and also adding the
url of an already hosted image on a webserver. No luck.

Also monitored the log for any errors with nothing appearing in the log.

I tried adding another resource like an ArcGIS lyr file without any
issues and the tried adding a pdf file as well to see if there were
issues for other resources. These links appeared fine within the
metadata document.

I also tried importing (although maybe or may not be a separate issue)
when importing mef pr individual records originally being in
iso-19139 they imported fine if imported as iso-19139 with the
overviews being added as expected. When I tried to do a conversion
from 19139 to
19115-3 I had the same issue with the overviews not appearing.

@sraAusstage
Copy link

Hey Andy - is there a workaround for this issue?
I'm not sure I understand the code you posted to use?

@fxprunayre
Copy link
Contributor

fxprunayre commented Oct 2, 2018

Testing it graphic overview are added and visible properly in the search results. So the feature is working but encoding could be improved probably.

image

image

Encoding is currently made using the same as in ISO19139

         <mri:graphicOverview>
            <mcc:MD_BrowseGraphic>
               <mcc:fileName>
                  <gco:CharacterString>http://localhost:8080/geonetwork/srv/api/records/e12921cc-8cf3-49b2-9dca-1f8da01156d1/attachments/DSC06149.JPG</gco:CharacterString>
               </mcc:fileName>
               <mcc:fileDescription>
                  <gco:CharacterString>Tree map</gco:CharacterString>
               </mcc:fileDescription>
            </mcc:MD_BrowseGraphic>
         </mri:graphicOverview>

A "better" encoding would be

         <mri:graphicOverview>
            <mcc:MD_BrowseGraphic>
               <mcc:fileName>
                  <gco:CharacterString>??</gco:CharacterString>
               </mcc:fileName>
               <mcc:fileDescription>
                  <gco:CharacterString>Tree map</gco:CharacterString>
               </mcc:fileDescription>
               <mcc:linkage>
                  <cit:CI_OnlineResource>
                     <cit:linkage>
                        <gco:CharacterString>http://localhost:8080/geonetwork/srv/api/records/e12921cc-8cf3-49b2-9dca-1f8da01156d1/attachments/DSC06149.JPG</gco:CharacterString>
                     </cit:linkage>
                  </cit:CI_OnlineResource>
               </mcc:linkage>

But then what to put in filename which is mandatory ?

Can be improved in here https://github.com/metadata101/iso19115-3/blob/3.4.x/src/main/plugin/iso19115-3/process/thumbnail-add.xsl#L90

Ref document https://github.com/ISO-TC211/XML/blob/master/standards.iso.org/iso/19115/-3/mcc/1.0/commonClasses.xsd#L10

@sraAusstage
Copy link

sraAusstage commented Nov 22, 2018

Hey there.
I'm sorry to be a hassle - I'm still really new at this and getting my head around how Geonetwork works. I've tried to understand the responses above but can't find a way to get the overview images to save to a record.

Could someone please point me in the direction of the plugin files that need to be edited?
I'm using the plugin version iso19115-3-3.4.x with Geonetwork 3.4.1.0

@josegar74
Copy link
Contributor

Thumbnails and other files that can be added to the metadata are added to the xml using an xslt process (GeoNetwork uses heavily xslt for metadata updates).

Xslt processes are defined in this folder of the schema: https://github.com/metadata101/iso19115-3/tree/3.4.x/src/main/plugin/iso19115-3/process

For example, when you add a thumbnail image, it's called a service in the backend that uses this xslt process: https://github.com/metadata101/iso19115-3/blob/3.4.x/src/main/plugin/iso19115-3/process/thumbnail-add.xsl

The process updates the metadata with the mri:graphicOverview element.

@sraAusstage
Copy link

Thanks for that josegar74

I managed to resolve the issue with that information.

for anyone playing along at home -I had a look at
geonetwork\WEB-INF\data\config\schema_plugins\iso19115-3\process\thumbnail-add.xsl
and discovered that the parameters expected

<xsl:param name="thumbnail_url"/>  
<xsl:param name="thumbnail_desc" select="''"/>

were not actually receiving any values.
I managed to get thumbnail images to attach to a record by adding the following

<xsl:param name="url"/> <xsl:param name="desc" select="''"/>
and replacing all references to thumbnail_url with url and thumbnail_desc to desc

File attached
thumbnail-add.zip

juanluisrp added a commit to juanluisrp/core-geonetwork that referenced this issue Jun 6, 2019
In branch `3.4.x` of https://github.com/metadata101/iso19115-3 the parameters
of the process `thumbnail_add.xsl` are `thumbnail_url`, `thumbnail_desc` and
`thumbnail_type` (https://github.com/metadata101/iso19115-3/blob/2f484b053aabe8939c48bbeb0018824c1bbd724b/src/main/plugin/iso19115-3/process/thumbnail-add.xsl#L18-L21)

This commit fixes the names of these parameters in the
_Add online resource_ panel configuration to match the names in the schema
process. This also should fix the part of metadata101/iso19115-3#35 about
the overview not being added to the XML.

Backport of geonetwork#3852.
@juanluisrp
Copy link
Member

juanluisrp commented Jun 6, 2019

@sraAusstage this problem with the parameters names would be fixed in geonetwork/core-geonetwork#3852 and geonetwork/core-geonetwork#3853 for GN 3.6.x and 3.4.x.

fxprunayre pushed a commit to geonetwork/core-geonetwork that referenced this issue Jun 7, 2019
In branch `3.4.x` of https://github.com/metadata101/iso19115-3 the parameters
of the process `thumbnail_add.xsl` are `thumbnail_url`, `thumbnail_desc` and
`thumbnail_type` (https://github.com/metadata101/iso19115-3/blob/2f484b053aabe8939c48bbeb0018824c1bbd724b/src/main/plugin/iso19115-3/process/thumbnail-add.xsl#L18-L21)

This commit fixes the names of these parameters in the
_Add online resource_ panel configuration to match the names in the schema
process. This also should fix the part of metadata101/iso19115-3#35 about
the overview not being added to the XML.

Backport of #3852.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants