geo_combine 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b168ca81c2b6d5ff2fa0ce75d18154ad9806f5a872cc6f96e41ab0cea628864
4
- data.tar.gz: 9ba88c0cca642ebe79301182f992f2dfe223bc1cf4abaa9b00ac4687293b78f4
3
+ metadata.gz: 4e3fb1725efbf8ad6c3af8b523b514bb899945cca8000820d9ddd3ab2063003b
4
+ data.tar.gz: 61a33c13e094f49a33938c0b4cd37ca0c72218f0d271db035de6a2e0cb5d05f1
5
5
  SHA512:
6
- metadata.gz: 8c54ead8b591bd20fc3b62fddbfec2b0ac6830972cd85bf49fd31f230c84c8cf1a7bd4c0b56de702a235eca130fc643e4c796cb84adf15fd93f0b73075161fe2
7
- data.tar.gz: 28fe9a5209dd77c2f8b60e87fddec8c7892ddf33794afd75522cf09c6827496c445c6c2f52445ad7fa46508ac1a4dcedd0c5068e161d0e176ec7ab232b21d296
6
+ metadata.gz: 25aa2a4ce8ef4bd083a3a125a54b0b77180d5a3f0e15512312a3045972d9c4bdaac972821067b0f634f31f9983730264c2880a31cfe3b1f8dc189f7484512c3a
7
+ data.tar.gz: 51d00efcc3c2555187b0618213cef9180494eda1d9df6b3e93668df8f5f1be903a32fc384779d2d7f3bf7785fd1fbc9f5f78fb6d27959134990738b7183d4d2a
@@ -50,6 +50,7 @@ module GeoCombine
50
50
  end
51
51
 
52
52
  # Convert non-crosswalked fields via lookup tables
53
+ # rubocop:disable Metrics/PerceivedComplexity
53
54
  def convert_non_crosswalked_fields
54
55
  # Keys may or may not include whitespace, so we normalize them.
55
56
  # Resource class is required so we default to "Other"; resource type is not required.
@@ -57,6 +58,9 @@ module GeoCombine
57
58
  resource_type = RESOURCE_TYPE_MAP[@v1_hash['layer_geom_type_s']&.gsub(/\s+/, '')]
58
59
  @v2_hash['gbl_resourceType_sm'] = resource_type unless resource_type.nil?
59
60
 
61
+ # If locn_geometry is in the ENVELOPE format, also add it as dcat_bbox
62
+ @v2_hash['dcat_bbox'] = @v2_hash['locn_geometry'] if @v2_hash['locn_geometry']&.match?(/ENVELOPE/)
63
+
60
64
  # If the user specified a collection id map, use it to convert the collection names to ids
61
65
  is_part_of = @v1_hash['dct_isPartOf_sm']&.map { |name| @collection_id_map[name] }&.compact
62
66
  if is_part_of.present?
@@ -65,6 +69,7 @@ module GeoCombine
65
69
  @v2_hash.delete('dct_isPartOf_sm')
66
70
  end
67
71
  end
72
+ # rubocop:enable Metrics/PerceivedComplexity
68
73
 
69
74
  # Remove fields that are no longer used
70
75
  def remove_deprecated_fields
@@ -80,7 +85,7 @@ module GeoCombine
80
85
  'dc_publisher_s' => 'dct_publisher_sm', # new namespace; single to multi-valued
81
86
  'dct_provenance_s' => 'schema_provider_s', # new URI name
82
87
  'dc_subject_sm' => 'dct_subject_sm', # new namespace
83
- 'solr_geom' => 'dcat_bbox', # new URI name
88
+ 'solr_geom' => 'locn_geometry', # new URI name
84
89
  'solr_year_i' => 'gbl_indexYear_im', # new URI name; single to multi-valued
85
90
  'dc_source_sm' => 'dct_source_sm', # new namespace
86
91
  'dc_rights_s' => 'dct_accessRights_s', # new URI name
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GeoCombine
4
- VERSION = '0.9.0'
4
+ VERSION = '0.9.1'
5
5
  end
@@ -44,6 +44,7 @@
44
44
  "stanford-rb371kw9607"
45
45
  ],
46
46
  "dcat_bbox":"ENVELOPE(29.572742, 35.000308, 4.234077, -1.478794)",
47
+ "locn_geometry":"ENVELOPE(29.572742, 35.000308, 4.234077, -1.478794)",
47
48
  "gbl_indexYear_im":[
48
49
  2005
49
50
  ],
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geo_combine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Reed
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-29 00:00:00.000000000 Z
11
+ date: 2024-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -376,7 +376,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
376
376
  - !ruby/object:Gem::Version
377
377
  version: '0'
378
378
  requirements: []
379
- rubygems_version: 3.3.7
379
+ rubygems_version: 3.4.19
380
380
  signing_key:
381
381
  specification_version: 4
382
382
  summary: A Ruby toolkit for managing geospatial metadata