Skip to contents

Merges two GeoLocator Data Package objects (x and y) into a single combined package. The metadata properties from both packages are merged according to specific rules, and resource data is combined based on their presence in either package.

Usage

merge_gldp(x, y)

Arguments

x

A GeoLocator Data Package object.

y

A GeoLocator Data Package object.

Value

A single GeoLocator Data Package object containing the merged data from both x and y.

Details

Metadata merging rules:

  • title: Combined from both packages, separated by a "/".

  • contributors: Combined from both packages, with duplicates removed.

  • embargo: Set to the latest date from both packages.

  • licenses: Combined from both packages, with duplicates removed.

  • id: Removed from the merged package.

  • description: Combined as two separate paragraphs, with a newline separator.

  • version: Removed from the merged package.

  • relatedIdentifiers: Combined, with duplicates removed.

  • grants: Combined from both packages, with duplicates removed.

  • keywords: Combined from both packages, with duplicates removed.

  • created: Set to the current timestamp at the time of merging.

  • bibliographicCitation: Removed from the merged package.

  • Custom properties from x are retained in the merged package.

Resource merging logic:

  • Each resource is checked for its presence in both x and y.

  • Data from both sources is combined if the resource exists in either x or y.

  • Resources are only included if they exist in at least one of the packages.