geo_combine 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +5 -1
- data/README.md +9 -1
- data/lib/geo_combine.rb +3 -0
- data/lib/geo_combine/esri_open_data.rb +0 -9
- data/lib/geo_combine/exceptions.rb +6 -0
- data/lib/geo_combine/geoblacklight.rb +21 -2
- data/lib/geo_combine/version.rb +1 -1
- data/lib/tasks/geo_combine.rake +1 -1
- data/lib/xslt/fgdc2geoBL.xsl +95 -154
- data/lib/xslt/iso2geoBL.xsl +62 -84
- data/spec/fixtures/docs/basic_geoblacklight.json +5 -7
- data/spec/fixtures/docs/full_geoblacklight.json +2 -8
- data/spec/lib/geo_combine/esri_open_data_spec.rb +1 -14
- data/spec/lib/geo_combine/fgdc_spec.rb +11 -14
- data/spec/lib/geo_combine/geoblacklight_spec.rb +101 -6
- data/spec/lib/geo_combine/iso19139_spec.rb +5 -2
- metadata +4 -5
- data/lib/schema/geoblacklight-schema.json +0 -169
@@ -19,7 +19,7 @@ RSpec.describe GeoCombine::Iso19139 do
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
describe '#to_geoblacklight' do
|
22
|
-
let(:valid_geoblacklight) { iso_object.to_geoblacklight('layer_geom_type_s' => 'Polygon'
|
22
|
+
let(:valid_geoblacklight) { iso_object.to_geoblacklight('layer_geom_type_s' => 'Polygon') }
|
23
23
|
it 'should create a GeoCombine::Geoblacklight object' do
|
24
24
|
expect(valid_geoblacklight).to be_an GeoCombine::Geoblacklight
|
25
25
|
end
|
@@ -27,6 +27,9 @@ RSpec.describe GeoCombine::Iso19139 do
|
|
27
27
|
valid_geoblacklight.enhance_metadata
|
28
28
|
expect(valid_geoblacklight.valid?).to be_truthy
|
29
29
|
end
|
30
|
+
it 'should have geoblacklight_version' do
|
31
|
+
expect(valid_geoblacklight.metadata['geoblacklight_version']).to eq '1.0'
|
32
|
+
end
|
30
33
|
it 'should have dc_creator_sm' do
|
31
34
|
expect(valid_geoblacklight.metadata["dc_creator_sm"]).to be_an Array
|
32
35
|
expect(valid_geoblacklight.metadata["dc_creator_sm"]).to eq ["Circuit Rider Productions"]
|
@@ -34,7 +37,7 @@ RSpec.describe GeoCombine::Iso19139 do
|
|
34
37
|
it 'should have dc_publisher_sm' do
|
35
38
|
expect(valid_geoblacklight.metadata["dc_publisher_sm"]).to be_an Array
|
36
39
|
expect(valid_geoblacklight.metadata["dc_publisher_sm"]).to eq ["Circuit Rider Productions"]
|
37
|
-
end
|
40
|
+
end
|
38
41
|
end
|
39
42
|
describe '#to_html' do
|
40
43
|
it 'should create a transformation of the metadata as a String' do
|
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.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jack Reed
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rsolr
|
@@ -157,6 +157,7 @@ files:
|
|
157
157
|
- lib/geo_combine.rb
|
158
158
|
- lib/geo_combine/cli.rb
|
159
159
|
- lib/geo_combine/esri_open_data.rb
|
160
|
+
- lib/geo_combine/exceptions.rb
|
160
161
|
- lib/geo_combine/fgdc.rb
|
161
162
|
- lib/geo_combine/formats.rb
|
162
163
|
- lib/geo_combine/formatting.rb
|
@@ -165,7 +166,6 @@ files:
|
|
165
166
|
- lib/geo_combine/iso19139.rb
|
166
167
|
- lib/geo_combine/subjects.rb
|
167
168
|
- lib/geo_combine/version.rb
|
168
|
-
- lib/schema/geoblacklight-schema.json
|
169
169
|
- lib/tasks/geo_combine.rake
|
170
170
|
- lib/xslt/fgdc2geoBL.xsl
|
171
171
|
- lib/xslt/fgdc2html.xsl
|
@@ -219,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
219
219
|
version: '0'
|
220
220
|
requirements: []
|
221
221
|
rubyforge_project:
|
222
|
-
rubygems_version: 2.4.5
|
222
|
+
rubygems_version: 2.4.5.1
|
223
223
|
signing_key:
|
224
224
|
specification_version: 4
|
225
225
|
summary: A Ruby toolkit for managing geospatial metadata
|
@@ -239,4 +239,3 @@ test_files:
|
|
239
239
|
- spec/lib/geo_combine/iso19139_spec.rb
|
240
240
|
- spec/lib/geo_combine_spec.rb
|
241
241
|
- spec/spec_helper.rb
|
242
|
-
has_rdoc:
|
@@ -1,169 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
-
"description": "Schema for GeoBlacklight as implemented for Solr 4.10+. See http://journal.code4lib.org/articles/9710 for more details. Note that the Solr schema uses dynamic typing based on the suffix of the field name. For example, _s denotes a string where _sm denotes a multi-valued string (array of strings).",
|
4
|
-
"id": "http://geoblacklight.org/schema",
|
5
|
-
"title": "GeoBlacklight Schema",
|
6
|
-
"required": [
|
7
|
-
"uuid",
|
8
|
-
"dc_identifier_s",
|
9
|
-
"dc_title_s",
|
10
|
-
"dc_description_s",
|
11
|
-
"dc_rights_s",
|
12
|
-
"dct_provenance_s",
|
13
|
-
"dct_references_s",
|
14
|
-
"georss_box_s",
|
15
|
-
"layer_id_s",
|
16
|
-
"layer_geom_type_s",
|
17
|
-
"layer_modified_dt",
|
18
|
-
"layer_slug_s",
|
19
|
-
"solr_geom",
|
20
|
-
"solr_year_i"
|
21
|
-
],
|
22
|
-
"type": "object",
|
23
|
-
"properties": {
|
24
|
-
"uuid": {
|
25
|
-
"type": "string",
|
26
|
-
"description": "Unique identifier for layer that is globally unique."
|
27
|
-
|
28
|
-
},
|
29
|
-
"dc_identifier_s": {
|
30
|
-
"type": "string",
|
31
|
-
"description": "Unique identifier for layer. May be same as UUID but may be an alternate identifier."
|
32
|
-
},
|
33
|
-
"dc_title_s": {
|
34
|
-
"type": "string",
|
35
|
-
"description": "Title for the layer."
|
36
|
-
|
37
|
-
},
|
38
|
-
"dc_description_s": {
|
39
|
-
"type": "string",
|
40
|
-
"description": "Description for the layer."
|
41
|
-
|
42
|
-
},
|
43
|
-
"dc_rights_s": {
|
44
|
-
"type": "string",
|
45
|
-
"enum": ["Public", "Restricted"],
|
46
|
-
"description": "Access rights for the layer."
|
47
|
-
|
48
|
-
},
|
49
|
-
"dct_provenance_s": {
|
50
|
-
"type": "string",
|
51
|
-
"description": "Institution who holds the layer."
|
52
|
-
|
53
|
-
},
|
54
|
-
"dct_references_s": {
|
55
|
-
"type": "string",
|
56
|
-
"description": "JSON hash for external resources, where each key is a URI for the protocol or format and the value is the URL to the resource."
|
57
|
-
|
58
|
-
},
|
59
|
-
"georss_box_s": {
|
60
|
-
"type": "string",
|
61
|
-
"description": "Bounding box as maximum values for S W N E. Example: 12.6 -119.4 19.9 84.8."
|
62
|
-
|
63
|
-
},
|
64
|
-
"layer_id_s": {
|
65
|
-
"type": "string",
|
66
|
-
"description": "The complete identifier for the layer via WMS/WFS/WCS protocol. Example: druid:vr593vj7147."
|
67
|
-
|
68
|
-
},
|
69
|
-
"layer_geom_type_s": {
|
70
|
-
"type": "string",
|
71
|
-
"enum": ["Point", "Line", "Polygon", "Raster", "Scanned Map", "Mixed"],
|
72
|
-
"description": "Geometry type for layer data, using controlled vocabulary."
|
73
|
-
},
|
74
|
-
"layer_modified_dt": {
|
75
|
-
"type": "string",
|
76
|
-
"format": "date-time",
|
77
|
-
"description": "Last modification date for the metadata record, using XML Schema dateTime format (YYYY-MM-DDThh:mm:ssZ)."
|
78
|
-
},
|
79
|
-
"layer_slug_s": {
|
80
|
-
"type": "string",
|
81
|
-
"description": "Unique identifier visible to the user, used for Permalinks. Example: stanford-vr593vj7147."
|
82
|
-
|
83
|
-
},
|
84
|
-
"solr_geom": {
|
85
|
-
"type": "string",
|
86
|
-
"pattern": "ENVELOPE(.*,.*,.*,.*)",
|
87
|
-
"description": "Derived from georss_polygon_s or georss_box_s. Shape of the layer as a ENVELOPE WKT using W E N S. Example: ENVELOPE(76.76, 84.76, 19.91, 12.62). Note that this field is indexed as a Solr spatial (RPT) field."
|
88
|
-
|
89
|
-
},
|
90
|
-
"solr_year_i": {
|
91
|
-
"type": "integer",
|
92
|
-
"description": "Derived from dct_temporal_sm. Year for which layer is valid and only a single value. Example: 1989. Note that this field is indexed as a Solr numeric field."
|
93
|
-
|
94
|
-
},
|
95
|
-
"dc_creator_sm": {
|
96
|
-
"type": "array",
|
97
|
-
"items": {
|
98
|
-
"type": "string"
|
99
|
-
},
|
100
|
-
"description": "Author(s). Example: George Washington, Thomas Jefferson."
|
101
|
-
|
102
|
-
},
|
103
|
-
"dc_format_s": {
|
104
|
-
"type": "string",
|
105
|
-
"enum": ["Shapefile", "GeoTIFF", "ArcGRID"],
|
106
|
-
"description": "File format for the layer, using a controlled vocabulary."
|
107
|
-
|
108
|
-
},
|
109
|
-
"dc_language_s": {
|
110
|
-
"type": "string",
|
111
|
-
"description": "Language for the layer. Example: English."
|
112
|
-
|
113
|
-
},
|
114
|
-
"dc_publisher_s": {
|
115
|
-
"type": "string",
|
116
|
-
"description": "Publisher. Example: ML InfoMap."
|
117
|
-
|
118
|
-
},
|
119
|
-
"dc_subject_sm": {
|
120
|
-
"type": "array",
|
121
|
-
"items": {
|
122
|
-
"type": "string"
|
123
|
-
},
|
124
|
-
"description": "Subjects, preferrably in a controlled vocabulary. Examples: Census, Human settlements."
|
125
|
-
|
126
|
-
},
|
127
|
-
"dc_type_s": {
|
128
|
-
"type": "string",
|
129
|
-
"enum": ["Dataset", "Image", "PhysicalObject"],
|
130
|
-
"description": "Resource type, using DCMI Type Vocabulary."
|
131
|
-
|
132
|
-
},
|
133
|
-
"dct_spatial_sm": {
|
134
|
-
"type": "array",
|
135
|
-
"items": {
|
136
|
-
"type": "string"
|
137
|
-
},
|
138
|
-
"description": "Spatial coverage and place names, preferrably in a controlled vocabulary. Example: 'Paris, France'."
|
139
|
-
|
140
|
-
},
|
141
|
-
"dct_temporal_sm": {
|
142
|
-
"type": "array",
|
143
|
-
"items": {
|
144
|
-
"type": "string"
|
145
|
-
},
|
146
|
-
"description": "Temporal coverage, typically years or dates. Example: 1989, circa 2010, 2007-2009. Note that this field is not in a specific date format."
|
147
|
-
|
148
|
-
},
|
149
|
-
"dct_issued_dt": {
|
150
|
-
"type": "string",
|
151
|
-
"format": "date-time",
|
152
|
-
"description": "Issued date for the layer, using XML Schema dateTime format (YYYY-MM-DDThh:mm:ssZ)."
|
153
|
-
|
154
|
-
},
|
155
|
-
"dct_isPartOf_sm": {
|
156
|
-
"type": "array",
|
157
|
-
"items": {
|
158
|
-
"type": "string"
|
159
|
-
},
|
160
|
-
"description": "Holding dataset for the layer, such as the name of a collection. Example: Village Maps of India."
|
161
|
-
|
162
|
-
},
|
163
|
-
"georss_point_s": {
|
164
|
-
"type": "string",
|
165
|
-
"description": "Point representation for layer as y, x - i.e., centroid. Example: 12.6 -119.4."
|
166
|
-
|
167
|
-
}
|
168
|
-
}
|
169
|
-
}
|