geoblacklight 0.3.4 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitmodules +0 -5
- data/.travis.yml +3 -0
- data/README.md +24 -76
- data/Rakefile +2 -3
- data/app/assets/javascripts/geoblacklight/downloaders.js +1 -0
- data/app/assets/javascripts/geoblacklight/downloaders/downloader.js +51 -0
- data/app/assets/javascripts/geoblacklight/downloaders/hgl_downloader.js +32 -0
- data/app/assets/javascripts/geoblacklight/modules/download.js +7 -41
- data/app/controllers/download_controller.rb +19 -1
- data/app/controllers/wms_controller.rb +1 -1
- data/app/views/catalog/_show_sidebar.html.erb +25 -13
- data/app/views/download/hgl.html.erb +25 -0
- data/config/locales/geoblacklight.en.yml +1 -0
- data/lib/generators/geoblacklight/install_generator.rb +3 -2
- data/lib/generators/geoblacklight/templates/geoblacklight.js +1 -0
- data/lib/geoblacklight.rb +2 -0
- data/lib/geoblacklight/constants.rb +2 -1
- data/lib/geoblacklight/download/hgl_download.rb +17 -0
- data/lib/geoblacklight/engine.rb +1 -0
- data/lib/geoblacklight/solr_document.rb +4 -0
- data/lib/geoblacklight/version.rb +1 -1
- data/lib/geoblacklight/wms_layer.rb +31 -31
- data/lib/geoblacklight/wms_layer/feature_info_response.rb +26 -24
- data/lib/tasks/geoblacklight.rake +2 -2
- data/spec/controllers/download_controller_spec.rb +13 -2
- data/spec/features/download_layer_spec.rb +18 -3
- data/spec/features/home_page_spec.rb +3 -3
- data/spec/features/layer_preview_spec.rb +3 -3
- data/spec/features/split_view.html.erb_spec.rb +2 -4
- data/spec/fixtures/solr_documents/actual-papermap1.json +26 -0
- data/spec/fixtures/solr_documents/actual-point1.json +27 -0
- data/spec/fixtures/solr_documents/actual-polygon1.json +26 -0
- data/spec/fixtures/solr_documents/actual-raster1.json +44 -0
- data/spec/fixtures/{test-dct-references6.json → solr_documents/harvard_raster.json} +2 -6
- data/spec/fixtures/solr_documents/public_iiif_princeton.json +38 -0
- data/spec/fixtures/solr_documents/public_polygon_mit.json +47 -0
- data/spec/fixtures/solr_documents/restricted-line.json +43 -0
- data/spec/lib/geoblacklight/download/hgl_download_spec.rb +14 -0
- data/spec/lib/geoblacklight/solr_document_spec.rb +20 -0
- data/spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb +5 -5
- data/spec/lib/geoblacklight/wms_layer_spec.rb +4 -4
- metadata +25 -22
- data/spec/features/dct_references_spec.rb +0 -77
- data/spec/fixtures/test-dct-references1.json +0 -38
- data/spec/fixtures/test-dct-references2.json +0 -41
- data/spec/fixtures/test-dct-references3.json +0 -45
- data/spec/fixtures/test-dct-references4.json +0 -60
- data/spec/fixtures/test-dct-references5.json +0 -57
- data/spec/fixtures/test-dct-references7.json +0 -42
- data/spec/fixtures/test-dct-references8.json +0 -46
- data/spec/support/dct_references_generate.rb +0 -100
@@ -1,38 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"uuid": "urn:hul.harvard.edu:HARVARD.SDE2.USGS_NU_ESTELI_RDL",
|
3
|
-
"dc_description_s": "Roads for the Esteli region, Nicaragua. This layer was vectorized from original hard copy 1:50,000 topographic maps produced by the Instituto Geogra?fico Nacional, Nicaragua.\n\nHurricane Mitch devastated Central America during the months of October-November of 1998. From 1998 to 2001 the US Geological Survey was involved along with other federal agencies in the reconstruction effort. The source CD consists of a compilation of GIS data layers and computer applications focused on hazard prevention and useful in municipal planning. Each dataset includes layers for a base area around the urban center of each municipality in the Hurricane Mitch project.",
|
4
|
-
"dc_format_s": "Shapefile",
|
5
|
-
"dc_identifier_s": "urn:hul.harvard.edu:HARVARD.SDE2.USGS_NU_ESTELI_RDL",
|
6
|
-
"dc_language_s": "English",
|
7
|
-
"dc_publisher_s": "US Geological Survey, Hurricane Mitch Program",
|
8
|
-
"dc_rights_s": "Public",
|
9
|
-
"dc_subject_sm": [
|
10
|
-
"Transportation Roads transportation"
|
11
|
-
],
|
12
|
-
"dc_title_s": "Roads, Esteli Region, Nicaragua, 2001",
|
13
|
-
"dc_type_s": "Dataset",
|
14
|
-
"dct_references_s": "{\"http://www.w3.org/1999/xhtml\":\"http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.USGS_NU_ESTELI_RDL/metadata.html\"}",
|
15
|
-
"dct_spatial_sm": [
|
16
|
-
"Nicaragua Esteli",
|
17
|
-
"Departamento de Esteli"
|
18
|
-
],
|
19
|
-
"dct_temporal_sm": [
|
20
|
-
"2001"
|
21
|
-
],
|
22
|
-
"dct_issued_s": "2000",
|
23
|
-
"dct_provenance_s": "Harvard",
|
24
|
-
"georss_box_s": "13.028337 -86.420715 13.154937 -86.291663",
|
25
|
-
"georss_polygon_s": "13.154937 -86.420715 13.154937 -86.291663 13.028337 -86.291663 13.028337 -86.420715 13.154937 -86.420715",
|
26
|
-
"layer_slug_s": "harvard-usgs-nu-esteli-rdl",
|
27
|
-
"layer_id_s": "sde:SDE2.USGS_NU_ESTELI_RDL",
|
28
|
-
"layer_geom_type_s": "Line",
|
29
|
-
"layer_modified_dt": "2014-05-27T18:09:37Z",
|
30
|
-
"solr_bbox": "-86.420715 13.028337 -86.291663 13.154937",
|
31
|
-
"solr_ne_pt": "13.154937,-86.291663",
|
32
|
-
"solr_sw_pt": "13.028337,-86.420715",
|
33
|
-
"solr_geom": "ENVELOPE(-86.420715, -86.291663, 13.154937, 13.028337)",
|
34
|
-
"solr_year_i": 2001,
|
35
|
-
"solr_issued_dt": "2000-01-01T00:00:00Z",
|
36
|
-
"solr_wms_url": "http://hgl.harvard.edu:8080/geoserver/wms",
|
37
|
-
"solr_wfs_url": "http://hgl.harvard.edu:8080/geoserver/wfs"
|
38
|
-
}
|
@@ -1,41 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"uuid": "urn:hul.harvard.edu:HARVARD.SDE.AMS7810_S250_U54_NG47_11",
|
3
|
-
"dc_description_s": "This layer is a geo-referenced raster image of the Army Map Service 1:250,000 scale China series topographic map of the Ta-Li region. This map (NG47-1) was compiled in 1954 from China Proper SW, 1:250,000, Army Map Service Sheets G47-P, G47-Q, 1946 and was first printed in this series in May 1956.\n\nA digital raster graphic (DRG) is a scanned image of a standard series topographic map, including all map collar information. The image inside the map neatline is geo-referenced to the surface of the earth and fit to the Universal Transverse Mercator projection. The horizontal positional accuracy and datum of the DRG matches closely with the accuracy and datum of the source map.\n\nThis map series of China (Series L500) was created and printed by the US Army Corps of Engineers Army Map Service (AMS) during the 1950s. The AMS was later known as the Defense Mapping Agency, which is now subsumed under NIMA. \nThese maps are a contoured topographic map series based largely on the Survey of India. These color maps have contour intervals of 100 meters. Map sources used to create these maps include British Survey of India maps, Japanese civil survey and military maps; United States Air Force (USAF) and United States Hydrographic Office (USHO) charts and a variety of other source maps simply described as the \"... best available large scale and medium scale maps of China.\"\nThese maps are in English, with modified Wade-Giles romanized Chinese place and feature names, many names also appear as Chinese ideographs. These are typical topographic maps with all of the normal topographic information: contours, transportation, culture, etc. Please pay close attention to map collar information on projections, spheroid and keys to grid numbering and other numbers which appear inside the neatline.",
|
4
|
-
"dc_format_s": "GeoTIFF",
|
5
|
-
"dc_identifier_s": "urn:hul.harvard.edu:HARVARD.SDE.AMS7810_S250_U54_NG47_11",
|
6
|
-
"dc_language_s": "English",
|
7
|
-
"dc_rights_s": "Public",
|
8
|
-
"dc_subject_sm": [
|
9
|
-
"imageryBaseMapsEarthCover Maps",
|
10
|
-
"Topographic Land Use Infrastructure Human settlements Bodies of water Landforms"
|
11
|
-
],
|
12
|
-
"dc_title_s": "AMS China Ta-Li Region",
|
13
|
-
"dc_type_s": "Dataset",
|
14
|
-
"dct_references_s": "{\"http://www.opengis.net/cat/csw/csdgm\":\"http://example.com/urn:hul.harvard.edu:HARVARD.SDE.AMS7810_S250_U54_NG47_11/fgdc.xml\",\"http://schema.org/url\":\"http://example.com/urn:hul.harvard.edu:HARVARD.SDE.AMS7810_S250_U54_NG47_11/homepage\",\"http://www.opengis.net/def/serviceType/ogc/wms\":\"http://hgl.harvard.edu:8080/geoserver/wms\"}",
|
15
|
-
"dct_spatial_sm": [
|
16
|
-
"China",
|
17
|
-
"Ta-Li",
|
18
|
-
"Dali",
|
19
|
-
"Yunnan",
|
20
|
-
"province"
|
21
|
-
],
|
22
|
-
"dct_temporal_sm": [
|
23
|
-
"2005"
|
24
|
-
],
|
25
|
-
"dct_issued_s": "2000",
|
26
|
-
"dct_provenance_s": "Harvard",
|
27
|
-
"georss_box_s": "24.774628 98.881922 26.090835 100.788377",
|
28
|
-
"georss_polygon_s": "26.090835 98.881922 26.090835 100.788377 24.774628 100.788377 24.774628 98.881922 26.090835 98.881922",
|
29
|
-
"layer_slug_s": "harvard-ams7810-s250-u54-ng47-11",
|
30
|
-
"layer_id_s": "cite:SDE.AMS7810_S250_U54_NG47_11",
|
31
|
-
"layer_geom_type_s": "Raster",
|
32
|
-
"layer_modified_dt": "2014-05-27T18:09:35Z",
|
33
|
-
"solr_bbox": "98.881922 24.774628 100.788377 26.090835",
|
34
|
-
"solr_ne_pt": "26.090835,100.788377",
|
35
|
-
"solr_sw_pt": "24.774628,98.881922",
|
36
|
-
"solr_geom": "ENVELOPE(98.881922, 100.788377, 26.090835, 24.774628)",
|
37
|
-
"solr_year_i": 2005,
|
38
|
-
"solr_issued_dt": "2000-01-01T00:00:00Z",
|
39
|
-
"solr_wms_url": "http://hgl.harvard.edu:8080/geoserver/wms",
|
40
|
-
"solr_wcs_url": "http://hgl.harvard.edu:8080/geoserver/wcs"
|
41
|
-
}
|
@@ -1,45 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"uuid": "urn:hul.harvard.edu:HARVARD.SDE.TG00NJPUMA",
|
3
|
-
"dc_description_s": "This datalayer displays the Public Use Microdata Areas (PUMAs) for the state. \nA public use microdata area is a decennial census area for which the U.S. Census Bureau provides selected extracts of raw data from a small sample of long-form census records that are screened to protect confidentiality. These extracts are referred to as Public Use Microdata Sample (PUMS) files. Since 1960, data users have been using these files to create their own statistical tabulations and data summaries. For Census 2000, state, District of Columbia, and Puerto Rico participants, following U.S. Census Bureau criteria, delineated two types of PUMAs within their states or statistically equivalent entity. \n\nPUMAs of one type comprise areas that contain at least 100,000 people. The PUMS files for these PUMAs contain a 5-percent sample of the long-form records. The other type of PUMAs, super-PUMAs, comprise areas of at least 400,000 people. The sample size is 1-percent for the PUMS files for super-PUMAs. \n\nPUMAs cannot be in more than one state or statistically equivalent entity. The larger 1-percent PUMAs are aggregations of the smaller 5-percent PUMAs. The UA Census 2000 TIGER/Line files contain a Public Use Microdata Area File, 2000 field containing the PUMA codes from the 5- percent sample.",
|
4
|
-
"dc_format_s": "Shapefile",
|
5
|
-
"dc_identifier_s": "urn:hul.harvard.edu:HARVARD.SDE.TG00NJPUMA",
|
6
|
-
"dc_language_s": "English",
|
7
|
-
"dc_publisher_s": "U.S. Department of Commerce, Bureau of the Census",
|
8
|
-
"dc_rights_s": "Public",
|
9
|
-
"dc_subject_sm": [
|
10
|
-
"boundaries",
|
11
|
-
"Census",
|
12
|
-
"districts",
|
13
|
-
"Statistics",
|
14
|
-
"Boundaries",
|
15
|
-
"Public",
|
16
|
-
"use",
|
17
|
-
"microdata",
|
18
|
-
"areas"
|
19
|
-
],
|
20
|
-
"dc_title_s": "UA Census Public Use Microdata Areas, 2000 - New Jersey",
|
21
|
-
"dc_type_s": "Dataset",
|
22
|
-
"dct_references_s": "{\"http://www.isotc211.org/schemas/2005/gmd/\":\"http://example.com/urn:hul.harvard.edu:HARVARD.SDE.TG00NJPUMA/iso19139.xml\",\"http://www.loc.gov/mods/v3\":\"http://example.com/urn:hul.harvard.edu:HARVARD.SDE.TG00NJPUMA/mods.xml\",\"http://schema.org/url\":\"http://example.com/urn:hul.harvard.edu:HARVARD.SDE.TG00NJPUMA/homepage\",\"http://www.opengis.net/def/serviceType/ogc/wms\":\"http://hgl.harvard.edu:8080/geoserver/wms\"}",
|
23
|
-
"dct_spatial_sm": [
|
24
|
-
"New Jersey"
|
25
|
-
],
|
26
|
-
"dct_temporal_sm": [
|
27
|
-
"2000"
|
28
|
-
],
|
29
|
-
"dct_issued_s": "2000",
|
30
|
-
"dct_provenance_s": "Harvard",
|
31
|
-
"georss_box_s": "38.9285189995282 -75.5597900005237 41.3573710003341 -73.9026749997039",
|
32
|
-
"georss_polygon_s": "41.3573710003341 -75.5597900005237 41.3573710003341 -73.9026749997039 38.9285189995282 -73.9026749997039 38.9285189995282 -75.5597900005237 41.3573710003341 -75.5597900005237",
|
33
|
-
"layer_slug_s": "harvard-tg00njpuma",
|
34
|
-
"layer_id_s": "sde:SDE.TG00NJPUMA",
|
35
|
-
"layer_geom_type_s": "Polygon",
|
36
|
-
"layer_modified_dt": "2014-05-27T18:09:35Z",
|
37
|
-
"solr_bbox": "-75.5597900005237 38.9285189995282 -73.9026749997039 41.3573710003341",
|
38
|
-
"solr_ne_pt": "41.3573710003341,-73.9026749997039",
|
39
|
-
"solr_sw_pt": "38.9285189995282,-75.5597900005237",
|
40
|
-
"solr_geom": "ENVELOPE(-75.5597900005237, -73.9026749997039, 41.3573710003341, 38.9285189995282)",
|
41
|
-
"solr_year_i": 2000,
|
42
|
-
"solr_issued_dt": "2000-01-01T00:00:00Z",
|
43
|
-
"solr_wms_url": "http://hgl.harvard.edu:8080/geoserver/wms",
|
44
|
-
"solr_wfs_url": "http://hgl.harvard.edu:8080/geoserver/wfs"
|
45
|
-
}
|
@@ -1,60 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"uuid": "urn:hul.harvard.edu:HARVARD.SDE2.ESRI04LAKES",
|
3
|
-
"dc_description_s": "World Lakes represents the major lakes and inland seas within the world.",
|
4
|
-
"dc_format_s": "Shapefile",
|
5
|
-
"dc_identifier_s": "urn:hul.harvard.edu:HARVARD.SDE2.ESRI04LAKES",
|
6
|
-
"dc_language_s": "English",
|
7
|
-
"dc_publisher_s": "ESRI",
|
8
|
-
"dc_rights_s": "Restricted",
|
9
|
-
"dc_subject_sm": [
|
10
|
-
"Lakes",
|
11
|
-
"Seas",
|
12
|
-
"Bodies",
|
13
|
-
"of",
|
14
|
-
"water",
|
15
|
-
"Hydrography",
|
16
|
-
"inlandWaters",
|
17
|
-
"polygon",
|
18
|
-
"lakes",
|
19
|
-
"seas",
|
20
|
-
"hydrography"
|
21
|
-
],
|
22
|
-
"dc_title_s": "ESRI Data Maps 2004 : World Lakes",
|
23
|
-
"dc_type_s": "Dataset",
|
24
|
-
"dct_references_s": "{\"http://www.opengis.net/cat/csw/csdgm\":\"http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.ESRI04LAKES/fgdc.xml\",\"http://iiif.io/api/image\":\"http://example.com/iiif\"}",
|
25
|
-
"dct_spatial_sm": [
|
26
|
-
"Earth",
|
27
|
-
"Northern",
|
28
|
-
"Hemisphere",
|
29
|
-
"Southern",
|
30
|
-
"Eastern",
|
31
|
-
"Western",
|
32
|
-
"Africa",
|
33
|
-
"Asia",
|
34
|
-
"Europe",
|
35
|
-
"North",
|
36
|
-
"America",
|
37
|
-
"South",
|
38
|
-
"Polar",
|
39
|
-
"regions"
|
40
|
-
],
|
41
|
-
"dct_temporal_sm": [
|
42
|
-
"1992"
|
43
|
-
],
|
44
|
-
"dct_issued_s": "2000",
|
45
|
-
"dct_provenance_s": "Harvard",
|
46
|
-
"georss_box_s": "-16.606264 -125.123318 67.046936 109.965",
|
47
|
-
"georss_polygon_s": "67.046936 -125.123318 67.046936 109.965 -16.606264 109.965 -16.606264 -125.123318 67.046936 -125.123318",
|
48
|
-
"layer_slug_s": "harvard-esri04lakes",
|
49
|
-
"layer_id_s": "sde:SDE2.ESRI04LAKES",
|
50
|
-
"layer_geom_type_s": "Polygon",
|
51
|
-
"layer_modified_dt": "2014-05-27T18:09:36Z",
|
52
|
-
"solr_bbox": "-125.123318 -16.606264 109.965 67.046936",
|
53
|
-
"solr_ne_pt": "67.046936,109.965",
|
54
|
-
"solr_sw_pt": "-16.606264,-125.123318",
|
55
|
-
"solr_geom": "ENVELOPE(-125.123318, 109.965, 67.046936, -16.606264)",
|
56
|
-
"solr_year_i": 1992,
|
57
|
-
"solr_issued_dt": "2000-01-01T00:00:00Z",
|
58
|
-
"solr_wms_url": "http://hgl.harvard.edu:8080/geoserver/wms",
|
59
|
-
"solr_wfs_url": "http://hgl.harvard.edu:8080/geoserver/wfs"
|
60
|
-
}
|
@@ -1,57 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"uuid": "urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH",
|
3
|
-
"dc_description_s": "This polygon data layer represents the 2010 TIGER/Line Census American Indian/Alaska Native/Native Hawaiian areas for the United States. The TIGER/Line Files are shapefiles and related database files (.dbf) that are an extract of selected geographic and cartographic information from the U.S. Census Bureau's Master Address File / Topologically Integrated Geographic Encoding and Referencing (MAF/TIGER) Database (MTDB). The MTDB represents a seamless national file with no overlaps or gaps between parts, however, each TIGER/Line File is designed to stand alone as an independent data set, or they can be combined to cover the entire nation. The American Indian / Alaska Native / Native Hawaiian (AIANNH) Areas Shapefile includes the following legal entities: federally recognized American Indian reservations and off-reservation trust land areas, State-recognized American Indian reservations, and Hawaiian home lands (HHLs). The statistical entities included are Alaska Native village statistical areas (ANVSAs), Oklahoma tribal statistical areas (OTSAs), tribal designated statistical areas (TDSAs), and State designated tribal statistical areas (SDTSAs). Joint use areas are also included in this shapefile and mean that the area is administered jointly and/or claimed by two or more American Indian tribes. The Census Bureau designates both legal and statistical joint use areas as unique geographic entities for the purpose of presenting statistical data. Note that tribal subdivisions and Alaska Native Regional Corporations (ANRCs) are additional types of American Indian / Alaska Native areas stored by the Census Bureau, but are displayed in separate shapefiles because of how the fall within the Census Bureau's geographic hierarchy. The 2010 Census boundaries for federally recognized American Indian reservations and off-reservation trust lands are as of January 1, 2010, as reported by the federally recognized tribal governments through the Census Bureau's Boundary and Annexation Survey (BAS). The State of Hawaii's Office of Hawaiian Home Lands provided the legal boundaries used in Census 2000 for the HHLs, but provided no updates since and none for the 2010 Census although there is strong evidence of HHL land acquisitions and large housing and commercial development on most HHLs. The boundaries for ANVSAs, OTSAs, and TDSAs were delineated for the 2010 Census through the Tribal Statistical Areas Program (TSAP) by participants from the federally recognized tribal governments. The Bureau of Indian Affairs (BIA) within the U.S. Department of the Interior (DOI) provides the list of federally recognized Tribes and only provides legal boundary information when the Tribes need supporting records, if a boundary is based on treaty or another document that is historical or open to legal interpretation, or when another Tribal, State, or local government challenges the depiction of a reservation or off-reservation trust land. The boundaries for State recognized American Indian reservations and for SDTSAs were delineated State governor appointed liaisons for the 2010 Census through the State American Indian Reservation Program and TSAP respectively.",
|
4
|
-
"dc_format_s": "Shapefile",
|
5
|
-
"dc_identifier_s": "urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH",
|
6
|
-
"dc_language_s": "English",
|
7
|
-
"dc_rights_s": "Public",
|
8
|
-
"dc_subject_sm": [
|
9
|
-
"Boundaries",
|
10
|
-
"Indian",
|
11
|
-
"reservations",
|
12
|
-
"Census",
|
13
|
-
"Administrative",
|
14
|
-
"and",
|
15
|
-
"political",
|
16
|
-
"divisions",
|
17
|
-
"boundaries",
|
18
|
-
"Nation",
|
19
|
-
"Polygon",
|
20
|
-
"American",
|
21
|
-
"Area",
|
22
|
-
"AIA",
|
23
|
-
"Alaska",
|
24
|
-
"Native",
|
25
|
-
"ANA",
|
26
|
-
"Hawaiian",
|
27
|
-
"Home",
|
28
|
-
"Land"
|
29
|
-
],
|
30
|
-
"dc_title_s": "American Indian/Alaska Native/Native Hawaiian Areas (AIANNH) United States 2010",
|
31
|
-
"dc_type_s": "Dataset",
|
32
|
-
"dct_references_s": "{\"http://schema.org/downloadUrl\":\"http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/data.zip\",\"http://www.isotc211.org/schemas/2005/gmd/\":\"http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/iso19139.xml\",\"http://www.loc.gov/mods/v3\":\"http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/mods.xml\",\"http://schema.org/url\":\"http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/homepage\",\"http://www.opengis.net/def/serviceType/ogc/wms\":\"http://hgl.harvard.edu:8080/geoserver/wms\",\"http://www.opengis.net/def/serviceType/ogc/wfs\":\"http://hgl.harvard.edu:8080/geoserver/wfs\"}",
|
33
|
-
"dct_spatial_sm": [
|
34
|
-
"United",
|
35
|
-
"States",
|
36
|
-
"U.S."
|
37
|
-
],
|
38
|
-
"dct_temporal_sm": [
|
39
|
-
"2010"
|
40
|
-
],
|
41
|
-
"dct_issued_s": "2000",
|
42
|
-
"dct_provenance_s": "Harvard",
|
43
|
-
"georss_box_s": "17.831509 -179.231086 71.441059 179.859681",
|
44
|
-
"georss_polygon_s": "71.441059 -179.231086 71.441059 179.859681 17.831509 179.859681 17.831509 -179.231086 71.441059 -179.231086",
|
45
|
-
"layer_slug_s": "harvard-tg10usaiannh",
|
46
|
-
"layer_id_s": "sde:SDE2.TG10USAIANNH",
|
47
|
-
"layer_geom_type_s": "Polygon",
|
48
|
-
"layer_modified_dt": "2014-05-27T18:09:37Z",
|
49
|
-
"solr_bbox": "-179.231086 17.831509 179.859681 71.441059",
|
50
|
-
"solr_ne_pt": "71.441059,179.859681",
|
51
|
-
"solr_sw_pt": "17.831509,-179.231086",
|
52
|
-
"solr_geom": "ENVELOPE(-179.231086, 179.859681, 71.441059, 17.831509)",
|
53
|
-
"solr_year_i": 2010,
|
54
|
-
"solr_issued_dt": "2000-01-01T00:00:00Z",
|
55
|
-
"solr_wms_url": "http://hgl.harvard.edu:8080/geoserver/wms",
|
56
|
-
"solr_wfs_url": "http://hgl.harvard.edu:8080/geoserver/wfs"
|
57
|
-
}
|
@@ -1,42 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"uuid": "urn:hul.harvard.edu:HARVARD.SDE.TG95NYCTYPY",
|
3
|
-
"dc_description_s": "This datalayer displays the counties for the state, based on a ground condition of January 1, 1990. The primary legal divisions of most states are termed ''counties.'' Each county and statistically equivalent entity is assigned a three-digit Federal Information Processing Standards code that is unique within the state. These codes are assigned in alphabetical order of county or county equivalent within each state.",
|
4
|
-
"dc_format_s": "Shapefile",
|
5
|
-
"dc_identifier_s": "urn:hul.harvard.edu:HARVARD.SDE.TG95NYCTYPY",
|
6
|
-
"dc_language_s": "English",
|
7
|
-
"dc_publisher_s": "U.S. Department of Commerce, Bureau of the Census, Geography Division",
|
8
|
-
"dc_rights_s": "Public",
|
9
|
-
"dc_subject_sm": [
|
10
|
-
"boundaries",
|
11
|
-
"Census",
|
12
|
-
"Administrative",
|
13
|
-
"divisions",
|
14
|
-
"County",
|
15
|
-
"government"
|
16
|
-
],
|
17
|
-
"dc_title_s": "Census Counties, 1990 - New York (State)",
|
18
|
-
"dc_type_s": "Dataset",
|
19
|
-
"dct_references_s": "{\"http://schema.org/downloadUrl\":\"http://example.com/urn:hul.harvard.edu:HARVARD.SDE.TG95NYCTYPY/data.json\"}",
|
20
|
-
"dct_spatial_sm": [
|
21
|
-
"New York (State)"
|
22
|
-
],
|
23
|
-
"dct_temporal_sm": [
|
24
|
-
"1990"
|
25
|
-
],
|
26
|
-
"dct_issued_s": "2000",
|
27
|
-
"dct_provenance_s": "Harvard",
|
28
|
-
"georss_box_s": "40.496105 -79.762152 45.01258 -71.85615",
|
29
|
-
"georss_polygon_s": "45.01258 -79.762152 45.01258 -71.85615 40.496105 -71.85615 40.496105 -79.762152 45.01258 -79.762152",
|
30
|
-
"layer_slug_s": "harvard-tg95nyctypy",
|
31
|
-
"layer_id_s": "sde:SDE.TG95NYCTYPY",
|
32
|
-
"layer_geom_type_s": "Polygon",
|
33
|
-
"layer_modified_dt": "2014-05-27T18:09:35Z",
|
34
|
-
"solr_bbox": "-79.762152 40.496105 -71.85615 45.01258",
|
35
|
-
"solr_ne_pt": "45.01258,-71.85615",
|
36
|
-
"solr_sw_pt": "40.496105,-79.762152",
|
37
|
-
"solr_geom": "ENVELOPE(-79.762152, -71.85615, 45.01258, 40.496105)",
|
38
|
-
"solr_year_i": 1990,
|
39
|
-
"solr_issued_dt": "2000-01-01T00:00:00Z",
|
40
|
-
"solr_wms_url": "http://hgl.harvard.edu:8080/geoserver/wms",
|
41
|
-
"solr_wfs_url": "http://hgl.harvard.edu:8080/geoserver/wfs"
|
42
|
-
}
|
@@ -1,46 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"uuid": "urn:hul.harvard.edu:HARVARD.SDE.ESRIMIZIP",
|
3
|
-
"dc_description_s": "Michigan ZIP Code Areas represents five-digit ZIP Code areas used by the U.S. Postal Service to deliver mail more effectively. The first digit of a five-digit ZIP Code divides the country into 10 large groups of states numbered from 0 in the Northeast to 9 in the far West. Within these areas, each state is divided into an average of 10 smaller geographical areas, identified by the 2nd and 3rd digits. These digits, in conjunction with the first digit, represent a sectional center facility or a mail processing facility area. The 4th and 5th digits identify a post office, station, branch or local delivery area.",
|
4
|
-
"dc_format_s": "Shapefile",
|
5
|
-
"dc_identifier_s": "urn:hul.harvard.edu:HARVARD.SDE.ESRIMIZIP",
|
6
|
-
"dc_language_s": "English",
|
7
|
-
"dc_publisher_s": "Environmental Systems Research Institute, Inc. (ESRI)",
|
8
|
-
"dc_rights_s": "Restricted",
|
9
|
-
"dc_subject_sm": [
|
10
|
-
"location",
|
11
|
-
"boundaries",
|
12
|
-
"polygon",
|
13
|
-
"zip",
|
14
|
-
"codes",
|
15
|
-
"areas",
|
16
|
-
"five-digit",
|
17
|
-
"post",
|
18
|
-
"offices",
|
19
|
-
"population"
|
20
|
-
],
|
21
|
-
"dc_title_s": "Michigan ZIP Code Areas",
|
22
|
-
"dc_type_s": "Dataset",
|
23
|
-
"dct_references_s": "{\"http://www.w3.org/1999/xhtml\":\"http://example.com/#doc['uuid']/metadata.html\",\"http://www.opengis.net/def/serviceType/ogc/wms\":\"http://hgl.harvard.edu:8080/geoserver/wms\"}",
|
24
|
-
"dct_spatial_sm": [
|
25
|
-
"United States Michigan"
|
26
|
-
],
|
27
|
-
"dct_temporal_sm": [
|
28
|
-
"1999"
|
29
|
-
],
|
30
|
-
"dct_issued_s": "2000",
|
31
|
-
"dct_provenance_s": "Harvard",
|
32
|
-
"georss_box_s": "41.69609 -90.418136 48.190509 -82.418635",
|
33
|
-
"georss_polygon_s": "48.190509 -90.418136 48.190509 -82.418635 41.69609 -82.418635 41.69609 -90.418136 48.190509 -90.418136",
|
34
|
-
"layer_slug_s": "harvard-esrimizip",
|
35
|
-
"layer_id_s": "sde:SDE.ESRIMIZIP",
|
36
|
-
"layer_geom_type_s": "Polygon",
|
37
|
-
"layer_modified_dt": "2014-05-27T18:09:35Z",
|
38
|
-
"solr_bbox": "-90.418136 41.69609 -82.418635 48.190509",
|
39
|
-
"solr_ne_pt": "48.190509,-82.418635",
|
40
|
-
"solr_sw_pt": "41.69609,-90.418136",
|
41
|
-
"solr_geom": "ENVELOPE(-90.418136, -82.418635, 48.190509, 41.69609)",
|
42
|
-
"solr_year_i": 1999,
|
43
|
-
"solr_issued_dt": "2000-01-01T00:00:00Z",
|
44
|
-
"solr_wms_url": "http://hgl.harvard.edu:8080/geoserver/wms",
|
45
|
-
"solr_wfs_url": "http://hgl.harvard.edu:8080/geoserver/wfs"
|
46
|
-
}
|
@@ -1,100 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
require 'json'
|
3
|
-
require 'geoblacklight'
|
4
|
-
|
5
|
-
def do_write n, doc
|
6
|
-
unless File.size?("spec/fixtures/test-dct-references#{n}.json")
|
7
|
-
puts "Writing spec/fixtures/test-dct-references#{n}.json"
|
8
|
-
File.open("spec/fixtures/test-dct-references#{n}.json", 'wb') {|f| f << JSON.pretty_generate(doc) }
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
URIs = Geoblacklight::Constants::URI
|
13
|
-
selected = JSON.parse(File.open('schema/examples/selected.json').read)
|
14
|
-
|
15
|
-
# scenario 'Case 1: Minimal case of HTML metadata only' do
|
16
|
-
doc = selected.sample
|
17
|
-
doc['dct_references_s'] = {
|
18
|
-
URIs[:html] => "http://example.com/#{doc['uuid']}/metadata.html"
|
19
|
-
}.to_json
|
20
|
-
do_write 1, doc
|
21
|
-
|
22
|
-
# scenario 'Case 2: Minimal case of FGDC metadata, a URL (homepage), and WMS tile server' do
|
23
|
-
doc = selected.sample
|
24
|
-
doc['dct_references_s'] = {
|
25
|
-
URIs[:fgdc] => "http://example.com/#{doc['uuid']}/fgdc.xml",
|
26
|
-
URIs[:url] => "http://example.com/#{doc['uuid']}/homepage",
|
27
|
-
URIs[:wms] => doc['solr_wms_url']
|
28
|
-
}.to_json
|
29
|
-
do_write 2, doc
|
30
|
-
|
31
|
-
# scenario 'Case 3: ISO & MODS metadata, a URL, and WMS tile server' do
|
32
|
-
doc = selected.sample
|
33
|
-
doc['dct_references_s'] = {
|
34
|
-
URIs[:iso19139] => "http://example.com/#{doc['uuid']}/iso19139.xml",
|
35
|
-
URIs[:mods] => "http://example.com/#{doc['uuid']}/mods.xml",
|
36
|
-
URIs[:url] => "http://example.com/#{doc['uuid']}/homepage",
|
37
|
-
URIs[:wms] => doc['solr_wms_url']
|
38
|
-
}.to_json
|
39
|
-
do_write 3, doc
|
40
|
-
|
41
|
-
# scenario 'Case 4: FGDC metadata and IIIF tile server' do
|
42
|
-
doc = selected.sample
|
43
|
-
doc['dct_references_s'] = {
|
44
|
-
URIs[:fgdc] => "http://example.com/#{doc['uuid']}/fgdc.xml",
|
45
|
-
URIs[:iiif] => "http://example.com/iiif"
|
46
|
-
}.to_json
|
47
|
-
do_write 4, doc
|
48
|
-
|
49
|
-
# scenario 'Case 5: ISO & MODS metadata, a URL, Shapefile ZIP and WFS, and WMS tile server' do
|
50
|
-
doc = selected.sample
|
51
|
-
while doc['dc_format_s'] != 'Shapefile'
|
52
|
-
doc = selected.sample
|
53
|
-
end
|
54
|
-
raise ArgumentError, doc['dc_format_s'] unless doc['dc_format_s'] == 'Shapefile'
|
55
|
-
doc['dct_references_s'] = {
|
56
|
-
URIs[:download] => "http://example.com/#{doc['uuid']}/data.zip",
|
57
|
-
URIs[:iso19139] => "http://example.com/#{doc['uuid']}/iso19139.xml",
|
58
|
-
URIs[:mods] => "http://example.com/#{doc['uuid']}/mods.xml",
|
59
|
-
URIs[:url] => "http://example.com/#{doc['uuid']}/homepage",
|
60
|
-
URIs[:wms] => doc['solr_wms_url'],
|
61
|
-
URIs[:wfs] => doc['solr_wfs_url']
|
62
|
-
}.to_json
|
63
|
-
do_write 5, doc
|
64
|
-
|
65
|
-
# scenario 'Case 6: ISO & MODS metadata, GeoTIFF ZIP and WCS, and WMS tile server' do
|
66
|
-
doc = selected.sample
|
67
|
-
while doc['dc_format_s'] != 'GeoTIFF'
|
68
|
-
doc = selected.sample
|
69
|
-
end
|
70
|
-
doc['dct_references_s'] = {
|
71
|
-
URIs[:download] => "http://example.com/#{doc['uuid']}/data.zip",
|
72
|
-
URIs[:iso19139] => "http://example.com/#{doc['uuid']}/iso19139.xml",
|
73
|
-
URIs[:mods] => "http://example.com/#{doc['uuid']}/mods.xml",
|
74
|
-
URIs[:wms] => doc['solr_wms_url'],
|
75
|
-
URIs[:wcs] => doc['solr_wcs_url']
|
76
|
-
}.to_json
|
77
|
-
do_write 6, doc
|
78
|
-
|
79
|
-
# scenario 'Case 7: No metadata, GeoJSON'
|
80
|
-
doc = selected.sample
|
81
|
-
while doc['dc_format_s'] != 'Shapefile'
|
82
|
-
doc = selected.sample
|
83
|
-
end
|
84
|
-
doc['dct_references_s'] = {
|
85
|
-
URIs[:download] => "http://example.com/#{doc['uuid']}/data.json"
|
86
|
-
}.to_json
|
87
|
-
do_write 7, doc
|
88
|
-
|
89
|
-
# scenario 'Case 8: HTML metadata and WMS tile server'
|
90
|
-
doc = selected.sample
|
91
|
-
doc['dct_references_s'] = {
|
92
|
-
URIs[:html] => "http://example.com/#doc['uuid']/metadata.html",
|
93
|
-
URIs[:wms] => doc['solr_wms_url']
|
94
|
-
}.to_json
|
95
|
-
do_write 8, doc
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|