geo_combine 0.2.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,37 @@
1
+ {
2
+ "uuid": "urn:columbia.edu:Columbia.ESRI_Arcatlas_snow_ln",
3
+ "dc_identifier_s": "urn:columbia.edu:Columbia.ESRI_Arcatlas_snow_ln",
4
+ "dc_title_s": "Worldwide Snow Cover (Polygon), 1996",
5
+ "dc_description_s": "Snow Cover (Polygon) is a polyline theme representing rates or snowcover worldwide.",
6
+ "dc_rights_s": "Restricted",
7
+ "dct_provenance_s": "Columbia",
8
+ "dct_references_s": "{\"http://schema.org/downloadUrl\":\"https://www1.columbia.edu/sec/acis/eds/dgate/studies/C1301/data/snow_poly.zip\",\"http://www.w3.org/1999/xhtml\":\"https://geoblacklight-prod.cul.columbia.edu/metadata/fgdc/html/ESRI_Arcatlas_snow_ln.html\",\"http://www.isotc211.org/schemas/2005/gmd/\":\"https://geoblacklight-prod.cul.columbia.edu/metadata/fgdc/current/ESRI_Arcatlas_snow_ln.xml\"}",
9
+ "georss_box_s": "-85.0 -180.0 85.0 180.0",
10
+ "layer_id_s": "sde:columbia.ESRI_Arcatlas_snow_ln",
11
+ "layer_geom_type_s": "Polygon",
12
+ "layer_modified_dt": "2009-06-16T00:00:00Z",
13
+ "layer_slug_s": "sde-columbia-esri_arcatlas_snow_ln",
14
+ "solr_geom": "ENVELOPE(-180.0, 180.0, 85.0, -85.0)",
15
+ "solr_year_i": 1996,
16
+ "dc_creator_sm": [
17
+ "Environmental Systems Research Institute (Redlands, Calif.)"
18
+ ],
19
+ "dc_format_s": "Shapefile",
20
+ "dc_language_s": "",
21
+ "dc_publisher_s": "ESRI",
22
+ "dc_subject_sm": [
23
+ "climatologyMeteorologyAtmosphere"
24
+ ],
25
+ "dc_type_s": "Dataset",
26
+ "dct_spatial_sm": [
27
+ "Earth"
28
+ ],
29
+ "dct_temporal_sm": [
30
+ "1996"
31
+ ],
32
+ "dct_issued_s": "",
33
+ "dct_isPartOf_sm": [
34
+ "ArcAtlas"
35
+ ],
36
+ "georss_polygon_s": "85.0 -180.0 85.0 180.0 -85.0 180.0 -85.0 -180.0 85.0 -180.0"
37
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "LayerId": "HARVARD.SDE.KNG_SNCARC",
3
+ "Name": "KNG_SNCARC",
4
+ "ExternalLayerId": "188",
5
+ "Institution": "Harvard",
6
+ "Access": "Restricted",
7
+ "DataType": "Line",
8
+ "Availability": "online",
9
+ "LayerDisplayName": "King County, Washington : streets",
10
+ "Publisher": "King County GIS Center",
11
+ "ThemeKeywords": "Roads Transportation Municipal transportation",
12
+ "PlaceKeywords": "Snohomish Pierce King County Washington",
13
+ "GeoReferenced": true,
14
+ "Abstract": "King County, Washington arc features from the King County street network coverage. Covers also portions of Snohomish and Pierce Counties. \n\nThe source coverage was derived from the King County Street Network coverage (kcsn). All feature classes other than arcs have been dropped and items have been removed from the AAT. Scale: 1:24,000.",
15
+ "Location": "{\"wms\": [\"http://hgl.harvard.edu:8080/geoserver/wms\"],\"wfs\": \"http://hgl.harvard.edu:8080/geoserver/wfs\"}",
16
+ "MaxY": 47.986427,
17
+ "MinY": 47.150354,
18
+ "MaxX": -121.6959,
19
+ "MinX": -122.525897,
20
+ "CenterX": -122.11089849999999,
21
+ "CenterY": 47.5683905,
22
+ "HalfWidth": 0.41499850000000293,
23
+ "HalfHeight": 0.4180364999999995,
24
+ "Area": 0.693938081781004,
25
+ "WorkspaceName": "hglshapefiles",
26
+ "ContentDate": "2003-01-01T01:01:01Z",
27
+ "FgdcText": "<?xml version = '1.0' encoding = 'UTF-8'?><metadata> <idinfo> <citation> <citeinfo> <origin>King County (Wash.)</origin> <pubdate>20030630</pubdate> <title>King County, Washington : streets</title> <geoform>vector digital data</geoform> <pubinfo> <pubplace>[Seattle, Washington].</pubplace> <publish>King County GIS Center</publish> </pubinfo> <onlink>http://hgl.harvard.edu:8080/HGL/jsp/HGL.jsp?action=VColl&amp;VCollName=KNG_SNCARC</onlink> </citeinfo> </citation> <descript> <abstract>King County, Washington arc features from the King County street network coverage. Covers also portions of Snohomish and Pierce Counties. The source coverage was derived from the King County Street Network coverage (kcsn). All feature classes other than arcs have been dropped and items have been removed from the AAT. Scale: 1:24,000.</abstract> <purpose>Based on TIGER data, KCSN is suitable for general reference, small-scale map displays, and network analysis. Future enhancements include deriving this data set directly from RECDNET.</purpose> </descript> <timeperd> <timeinfo> <sngdate> <caldate>20030624</caldate> </sngdate> </timeinfo> <current>source coverage publication date</current> </timeperd> <status> <progress>Complete</progress> <update>Irregular</update> </status> <spdom> <bounding> <westbc>-122.525897</westbc> <eastbc>-121.695900</eastbc> <northbc>47.986427</northbc> <southbc>47.150354</southbc> </bounding> </spdom> <keywords> <theme> <themekt>HGL Category Keyword Thesaurus</themekt> <themekey>Municipal</themekey> </theme> <theme> <themekt>LCSH</themekt> <themekey>Roads</themekey> <themekey>Transportation</themekey> </theme> <theme> <themekt>ISO 19115 Topic Category</themekt> <themekey>transportation</themekey> </theme> <place> <placekt>GNIS</placekt> <placekey>Washington</placekey> <placekey>King County</placekey> <placekey>Snohomish County</placekey> <placekey>Pierce County</placekey> </place> </keywords> <accconst>Access is granted to Harvard University Affiliates only. Affiliates are limited to current faculty, staff and students.</accconst> <useconst>Plots/maps displaying streets from this coverage must include a disclaimer indicating that the source of the data is from maps produced by Kroll. This disclaimer must read as follows: THIS DOCUMENT INCLUDES DATA COPYRIGHTED BY THE KROLL MAP COMPANY AND IS BEING USED WITH THEIR PERMISSION. USE IS RESTRICTED. For educational non-commercial use only. This data may not be redistributed by HGL users. King County data are made available with the understanding that they shall be used exclusively by the obtainer or his/her authorized agents.</useconst> <ptcontac> <cntinfo> <cntperp> <cntper>Tamara Davis</cntper> <cntorg>GIS group - Transit Infrastructure and Integration</cntorg> </cntperp> <cntaddr> <addrtype>mailing address</addrtype> <address>Exchange Building</address> <address>821 Second Ave., MS 150</address> <city>Seattle</city> <state>WA</state> <postal>98014</postal> <country>USA</country> </cntaddr> <cntvoice>(206) 684-2118</cntvoice> <cntemail>tamara.davis@metrokc.gov</cntemail> </cntinfo> </ptcontac> <datacred>See use constraints.</datacred> <native>Unknown.</native> </idinfo> <dataqual> <attracc> <attraccr>None</attraccr> </attracc> <logic>None.</logic> <complete>None.</complete> <posacc> <horizpa> <horizpar>This data set is not conflated to the King County Cadastral Base. The positional accuracy of this data set is undetermined.</horizpar> </horizpa> </posacc> <lineage> <srcinfo> <srccite> <citeinfo> <origin>King County (Wash.)</origin> <origin>King County (Wash.). GIS Center.</origin> <pubdate>20030624</pubdate> <title>KCSNC: Streets</title> <geoform>vector digital data</geoform> <pubinfo> <pubplace>[Seattle, Wash.]</pubplace> <publish>King County GIS Center</publish> </pubinfo> <othercit>CD-ROM layer: street-kcsnc</othercit> <lworkcit> <citeinfo> <origin>King County (Wash.). GIS Center</origin> <pubdate>2003</pubdate> <title>King County GIS data.</title> <geoform>digital data</geoform> <pubinfo> <pubplace>King County GIS Center</pubplace> <publish>[Seattle, Wash.]</publish> </pubinfo> <othercit>2 CD-ROMs; CD 1. Standard data -- CD 2. Parcel data.</othercit> </citeinfo> </lworkcit> </citeinfo> </srccite> <srcscale>Unknown</srcscale> <typesrc>online</typesrc> <srctime> <timeinfo> <sngdate> <caldate>20030624</caldate> </sngdate> </timeinfo> <srccurr>publication date</srccurr> </srctime> <srccitea>coverage</srccitea> <srccontr>Source coverage data layer from which shapefile was converted.</srccontr> </srcinfo> <procstep> <procdesc>King County, Washington data was obtained via a CD-ROM. The data were in the format of ArcINFO coverages and were converted to shapefiles using the \"coverage to shapefile\" wizard in ArcToolbox, version 8.3. The shapefiles were then imported to ArcSDE Layers using the ArcSDE command line importing tool, shp2sde, version 8.3.</procdesc> <srcused>coverage</srcused> <procdate>2005</procdate> <srcprod>shapefile</srcprod> <proccont> <cntinfo> <cntorgp> <cntorg>Harvard Geospatial Library</cntorg> </cntorgp> <cntpos>GIS Technician</cntpos> <cntaddr> <addrtype>mailing and physical address</addrtype> <address>Office for Information Systems</address> <address>Harvard University Library</address> <address>90 Mount Auburn Street</address> <city>Cambridge</city> <state>MA</state> <postal>02138</postal> <country>USA</country> </cntaddr> <cntvoice>617-495-2417</cntvoice> <cntfax>617-496-0440</cntfax> <cntemail>hgl_ref@hulmail.harvard.edu</cntemail> <hours>Monday - Friday, 9:00 am - 4:00 pm EST-USA</hours> </cntinfo> </proccont> </procstep> </lineage> </dataqual> <spdoinfo> <direct>Vector</direct> <ptvctinf> <sdtsterm> <sdtstype>String</sdtstype> <ptvctcnt>8185</ptvctcnt> </sdtsterm> </ptvctinf> </spdoinfo> <spref> <horizsys> <planar> <mapproj> <mapprojn>Lambert Conformal Conic</mapprojn> <lambertc> <stdparll>47.500000</stdparll> <stdparll>48.733333</stdparll> <longcm>-120.833333</longcm> <latprjo>47.000000</latprjo> <feast>1640416.666667</feast> <fnorth>0.000000</fnorth> </lambertc> </mapproj> <planci> <plance>coordinate pair</plance> <coordrep> <absres>0.000176</absres> <ordres>0.000176</ordres> </coordrep> <plandu>survey feet</plandu> </planci> </planar> <geodetic> <horizdn>D_North_American_1983_HARN</horizdn> <ellips>Geodetic Reference System 80</ellips> <semiaxis>6378137.000000</semiaxis> <denflat>298.257222</denflat> </geodetic> </horizsys> </spref> <eainfo> <detailed> <enttyp> <enttypl>KNG_SNCARC</enttypl> <enttypd>King County Streets</enttypd> <enttypds>King County GIS Center</enttypds> </enttyp> <attr> <attrlabl>FNODE_</attrlabl> <attrdef>From node</attrdef> <attrdefs>None</attrdefs> </attr> <attr> <attrlabl>TNODE_</attrlabl> <attrdef>To node</attrdef> <attrdefs>None</attrdefs> </attr> <attr> <attrlabl>LPOLY_</attrlabl> <attrdef>Left polygon</attrdef> <attrdefs>None</attrdefs> </attr> <attr> <attrlabl>RPOLY_</attrlabl> <attrdef>Right polygon</attrdef> <attrdefs>None</attrdefs> </attr> <attr> <attrlabl>LENGTH</attrlabl> <attrdef>Length of feature in coverage units.</attrdef> <attrdefs>ESRI</attrdefs> </attr> <attr> <attrlabl>KCSNC_</attrlabl> <attrdef>Internal feature number</attrdef> <attrdefs>None</attrdefs> <attrdomv> <udom>Sequential unique whole numbers that are automatically generated.</udom> </attrdomv> </attr> <attr> <attrlabl>KCSNC_ID</attrlabl> <attrdef>Internal feature number</attrdef> <attrdefs>None</attrdefs> </attr> <attr> <attrlabl>FRADDL</attrlabl> <attrdef>From Address Left : Address at the bottom from node on the left side of street</attrdef> <attrdefs>King County GIS Center</attrdefs> </attr> <attr> <attrlabl>TOADDL</attrlabl> <attrdef>To Address Left : Address at the to node on the left side of street</attrdef> <attrdefs>King County GIS Center</attrdefs> </attr> <attr> <attrlabl>FRADDR</attrlabl> <attrdef>From Address Right : Address at the from node on the right side of street</attrdef> <attrdefs>King County GIS Center</attrdefs> </attr> <attr> <attrlabl>TOADDR</attrlabl> <attrdef>To Address Right : Address at the to node on the right side of street</attrdef> <attrdefs>King County GIS Center</attrdefs> </attr> <attr> <attrlabl>ZIPL</attrlabl> <attrdef>Zip Code Left : The postal zip code on the left side of the street</attrdef> <attrdefs>King County GIS Center</attrdefs> </attr> <attr> <attrlabl>ZIPR</attrlabl> <attrdef>Zip Code Right : The postal zip code on right side of street</attrdef> <attrdefs>King County GIS Center</attrdefs> </attr> <attr> <attrlabl>KEYNAME</attrlabl> <attrdef>Key name : Link key identifier to street name table (kcsn.stname)</attrdef> <attrdefs>King County GIS Center</attrdefs> </attr> <attr> <attrlabl>FEATURE</attrlabl> <attrdef>Feature : Full street name (with space between street name &amp; suffix direction)</attrdef> <attrdefs>King County GIS Center</attrdefs> <attrdomv> <udom>Text.</udom> </attrdomv> </attr> <attr> <attrlabl>FEATURE2</attrlabl> <attrdef>Feature 2 : Full street name (without space between street name &amp; suffix direction)</attrdef> <attrdefs>King County GIS Center</attrdefs> <attrdomv> <udom>Text.</udom> </attrdomv> </attr> <attr> <attrlabl>ALIAS1</attrlabl> <attrdef>Full Second street name and type/suffix direction</attrdef> <attrdefs>King County GIS Center</attrdefs> <attrdomv> <udom>Text.</udom> </attrdomv> </attr> <attr> <attrlabl>ALIAS2</attrlabl> <attrdef>Full 3rd street name and type/suffix direction</attrdef> <attrdefs>King County GIS Center</attrdefs> <attrdomv> <udom>Text.</udom> </attrdomv> </attr> <attr> <attrlabl>KEYALIAS1</attrlabl> <attrdef>Key Alias 1 : 2nd link key identifier to street name table (kcsn.stname)</attrdef> <attrdefs>King County GIS Center</attrdefs> </attr> <attr> <attrlabl>KEYALIAS2</attrlabl> <attrdef>Key Alias 2 : 3rd link key identifier to street name table (kcsn.stname)</attrdef> <attrdefs>King County GIS Center</attrdefs> </attr> <attr> <attrlabl>PREFIX</attrlabl> <attrdef>Prefix of the street</attrdef> <attrdefs>King County GIS Center</attrdefs> <attrdomv> <udom>Text.</udom> </attrdomv> </attr> <attr> <attrlabl>STNAME</attrlabl> <attrdef>Name of the street</attrdef> <attrdefs>King County GIS Center</attrdefs> <attrdomv> <udom>Text.</udom> </attrdomv> </attr> <attr> <attrlabl>STYPE</attrlabl> <attrdef>Type of the street</attrdef> <attrdefs>King County GIS Center</attrdefs> <attrdomv> <udom>Text.</udom> </attrdomv> </attr> <attr> <attrlabl>SUFFIX</attrlabl> <attrdef>Suffix of the street</attrdef> <attrdefs>King County GIS Center</attrdefs> <attrdomv> <udom>Text.</udom> </attrdomv> </attr> <attr> <attrlabl>GRADE</attrlabl> <attrdef>Slope of the street</attrdef> <attrdefs>King County GIS Center</attrdefs> </attr> <attr> <attrlabl>BARRIER</attrlabl> <attrdef>Barrier : Trip planning defines streets where pedestrian crossings are not allowed</attrdef> <attrdefs>King County GIS Center</attrdefs> </attr> <attr> <attrlabl>TROLLEY</attrlabl> <attrdef>Number identify streets as trolley overhead</attrdef> <attrdefs>King County GIS Center</attrdefs> </attr> <attr> <attrlabl>HOV</attrlabl> <attrdef>Numbers Indicate the direction of HOV lanes</attrdef> <attrdefs>King County GIS Center</attrdefs> <attrdomv> <edom> <edomv>0</edomv> </edom> <edom> <edomv>2</edomv> <edomvd>South</edomvd> <edomvds>King County GIS Center</edomvds> </edom> <edom> <edomv>5</edomv> <edomvd>Both</edomvd> <edomvds>King County GIS Center</edomvds> </edom> </attrdomv> </attr> <attr> <attrlabl>FID</attrlabl> <attrdef>Internal feature number.</attrdef> <attrdefs>ESRI</attrdefs> <attrdomv> <udom>Sequential unique whole numbers that are automatically generated.</udom> </attrdomv> </attr> <attr> <attrlabl>SHAPE</attrlabl> <attrdef>Feature geometry.</attrdef> <attrdefs>ESRI</attrdefs> <attrdomv> <udom>Coordinates defining the features.</udom> </attrdomv> </attr> <attr> <attrlabl>SHAPE.LEN</attrlabl> <attrdef>Length of feature in coverage units.</attrdef> <attrdefs>ESRI</attrdefs> </attr> </detailed> </eainfo> <distinfo> <distrib> <cntinfo> <cntorgp> <cntorg>Harvard Geospatial Library</cntorg> </cntorgp> <cntaddr> <addrtype>mailing and physical address</addrtype> <address>Harvard University Library</address> <address>Office For Information Systems</address> <address>90 Mount Auburn Street</address> <city>Cambridge</city> <state>MA</state> <postal>02138</postal> <country>USA</country> </cntaddr> <cntvoice>617-495-2417</cntvoice> <cntfax>617-496-0440</cntfax> <cntemail>hgl_ref@hulmail.harvard.edu</cntemail> <hours>Monday - Friday, 9:00 am - 4:00 pm EST-USA</hours> </cntinfo> </distrib> <resdesc>Downloadable Data</resdesc> <distliab>Although this data is being distributed by Harvard University, no warranty expressed or implied is made by the University as to the accuracy of the data and related materials. The act of distribution shall not constitute any such warranty, and no responsibility is assumed by the University in the use of this data, or related materials.</distliab> <stdorder> <digform> <digtinfo> <formname>SHAPE</formname> <filedec>ZIP</filedec> </digtinfo> <digtopt> <onlinopt> <computer> <networka> <networkr>http://hgl.harvard.edu/</networkr> </networka> </computer> </onlinopt> </digtopt> </digform> <fees>None</fees> <ordering>Web-based distribution only</ordering> </stdorder> </distinfo> <metainfo> <metd>20070125</metd> <metc> <cntinfo> <cntorgp> <cntorg>Harvard Geospatial Library</cntorg> </cntorgp> <cntpos>Geospatial Resources Cataloger</cntpos> <cntaddr> <addrtype>mailing and physical address</addrtype> <address>Harvard University Library</address> <address>Office For Information Systems</address> <address>90 Mount Auburn Street</address> <city>Cambridge</city> <state>MA</state> <postal>02138</postal> <country>USA</country> </cntaddr> <cntvoice>617-495-2417</cntvoice> <cntfax>617-496-0440</cntfax> <cntemail>hgl_ref@hulmail.harvard.edu</cntemail> <hours>Monday - Friday, 9:00 am - 4:00 pm EST-USA</hours> </cntinfo> </metc> <metstdn>FGDC Content Standards for Digital Geospatial Metadata</metstdn> <metstdv>FGDC-STD-001-1998</metstdv> <mettc>local time</mettc> <metextns> <onlink>http://www.esri.com/metadata/esriprof80.html</onlink> <metprof>ESRI Metadata Profile</metprof> </metextns> </metainfo></metadata>"
28
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "LayerId": "HARVARD.SDE2.G1059_W57_1654_PF_SH1",
3
+ "Name": "G1059_W57_1654_PF_SH1",
4
+ "ExternalLayerId": "1188",
5
+ "Institution": "Harvard",
6
+ "Access": "Public",
7
+ "DataType": "Paper Map",
8
+ "Availability": "online",
9
+ "LayerDisplayName": "World Map, 1654 (Raster Image)",
10
+ "Publisher": "Harvard Map Collection, Harvard Library",
11
+ "ThemeKeywords": "Human settlements Landforms imageryBaseMapsEarthCover Transportation Bodies water Maps and towns of Villages Cities",
12
+ "PlaceKeywords": "regions Europe Africa Hemisphere South Earth Western Asia Northern America Eastern North Southern Australia Arctic",
13
+ "GeoReferenced": true,
14
+ "Abstract": "This layer is a georeferenced raster image of the historic paper map entitled: Nova totius terrarum orbis geographica ac hydrographica tabula, autore N.I. Piscator, from the Frederik de Wit's untitled Dutch Sea Atlas. It was published by F. de Wit in 1654. Scale [ca. 1:100,000,000]. Map in Latin.\n\nThe image inside the map neatline is georeferenced to the surface of the earth and fit to the World Geodetic System 1984 (WGS 84) coordinate system. All map collar and inset information is also available as part of the raster image, including any inset maps, profiles, statistical tables, directories, text, illustrations, index maps, legends, or other information associated with the principal map. \n\nThis map shows features such as drainage, cities and other human settlements, territorial boundaries, shoreline features, and more. Relief shown pictorially. \n\nThis layer is part of a selection of digitally scanned and georeferenced historic maps from the Harvard Map Collection. These maps typically portray both natural and manmade features. The selection represents a range of originators, ground condition dates, scales, and map purposes.",
15
+ "Location": "{\"wms\": [\"http://pelham.lib.harvard.edu:8080/geoserver/wms\"],\"wcs\": \"http://pelham.lib.harvard.edu:8080/geoserver/wcs\",\"download\": \"http://pelham.lib.harvard.edu:8080/HGL/HGLOpenDelivery\"}",
16
+ "MaxY": 90.0,
17
+ "MinY": -90.0,
18
+ "MaxX": 180.0,
19
+ "MinX": -180.0,
20
+ "CenterX": 0.0,
21
+ "CenterY": 0.0,
22
+ "HalfWidth": 180.0,
23
+ "HalfHeight": 90.0,
24
+ "Area": 64800.0,
25
+ "WorkspaceName": "cite",
26
+ "ContentDate": "1654-01-01T01:01:01Z",
27
+ "FgdcText": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE metadata SYSTEM \"http://www.fgdc.gov/metadata/fgdc-std-001-1998.dtd\"><metadata><idinfo><citation><citeinfo><origin>Harvard Map Collection, Harvard Library</origin><origin>Visscher, Claes Jansz., 1586 or 1587-1652.</origin><origin>Wit, Frederik de.</origin><pubdate>201404</pubdate><title>World Map, 1654 (Raster Image)</title><geoform>map</geoform><pubinfo><pubplace>Cambridge, Massachusetts</pubplace><publish>Harvard Map Collection, Harvard Library</publish></pubinfo><onlink>http://hgl.harvard.edu:8080/HGL/hgl.jsp?action=VCollandamp;VCollName=G1059_W57_1654_PF_SH1</onlink></citeinfo></citation><descript><abstract>This layer is a georeferenced raster image of the historic paper map entitled: Nova totius terrarum orbis geographica ac hydrographica tabula, autore N.I. Piscator, from the Frederik de Wit's untitled Dutch Sea Atlas. It was published by F. de Wit in 1654. Scale [ca. 1:100,000,000]. Map in Latin.The image inside the map neatline is georeferenced to the surface of the earth and fit to the World Geodetic System 1984 (WGS 84) coordinate system. All map collar and inset information is also available as part of the raster image, including any inset maps, profiles, statistical tables, directories, text, illustrations, index maps, legends, or other information associated with the principal map. This map shows features such as drainage, cities and other human settlements, territorial boundaries, shoreline features, and more. Relief shown pictorially. This layer is part of a selection of digitally scanned and georeferenced historic maps from the Harvard Map Collection. These maps typically portray both natural and manmade features. The selection represents a range of originators, ground condition dates, scales, and map purposes.</abstract><purpose>Historic paper maps can provide an excellent view of the changes that have occurred in the cultural and physical landscape. The wide range of information provided on these maps make them useful in the study of historic geography, and urban and rural land use change. As this map has been georeferenced, it can be used in a GIS as a source or background layer in conjunction with other GIS data.</purpose></descript><timeperd><timeinfo><sngdate><caldate>1654</caldate></sngdate></timeinfo><current>source map publication date</current></timeperd><status><progress>Complete</progress><update>None planned</update></status><spdom><bounding><westbc>-180</westbc><eastbc>180</eastbc><northbc>90</northbc><southbc>-90</southbc></bounding></spdom><keywords><theme><themekt>LCSH</themekt><themekey>Maps</themekey><themekey>Human settlements</themekey><themekey>Cities and towns</themekey><themekey>Villages</themekey><themekey>Bodies of water</themekey><themekey>Landforms</themekey><themekey>Transportation</themekey></theme><theme><themekt>ISO 19115 Topic Category</themekt><themekey>imageryBaseMapsEarthCover</themekey></theme><place><placekt>LCSH</placekt><placekey>Earth</placekey><placekey>Northern Hemisphere</placekey><placekey>Southern Hemisphere</placekey><placekey>Eastern Hemisphere</placekey><placekey>Western Hemisphere</placekey><placekey>Africa</placekey><placekey>Asia</placekey><placekey>Australia</placekey><placekey>Europe</placekey><placekey>North America</placekey><placekey>South America</placekey><placekey>Arctic regions</placekey></place></keywords><accconst>None</accconst><useconst>For educational, non-commercial use only.</useconst><ptcontac><cntinfo><cntorgp><cntorg>Harvard Map Collection, Harvard Library</cntorg></cntorgp><cntpos>Harvard Geospatial Library</cntpos><cntaddr><addrtype>mailing and physical address</addrtype><address>Harvard Map Collection</address><address>Pusey Library</address><address>Harvard University</address><city>Cambridge</city><state>MA</state><postal>02138</postal><country>USA</country></cntaddr><cntvoice>617-495-2417</cntvoice><cntfax>617-496-0440</cntfax><cntemail>hgl_ref@hulmail.harvard.edu</cntemail><hours>Monday - Friday, 9:00 am - 4:00 pm EST-USA</hours></cntinfo></ptcontac><native>ESRI ArcGIS 10.1</native></idinfo><dataqual><attracc><attraccr>The georeferenced raster is a faithfully reproduced digital image of the original source map. Some differences may be detected between the source graphic used and the raster image due to the RGB values assigned that particular color. The intent is to recreate those colors as near as possible.</attraccr></attracc><complete>Data completeness for raster digital image files reflect content of the source graphic. Features may have been eliminated or generalized on the source graphic due to scale and legibility constraints</complete><posacc><horizpa><horizpar>The horizontal positional accuracy of a raster image is approximately the same as the accuracy of the published source map. The lack of a greater accuracy is largely the result of the inaccuracies with the original measurements and possible distortions in the original paper map document. There may also be errors introduced during the digitizing and georeferencing process. In most cases, however, errors in the raster image are small compared with sources of error in the original map graphic. The RMS error for this map is 7.40181 Decimal Degrees. This value describes how consistent the transformation is between the different control points (links). The RMS error is only an assessment of the accuracy of the transformation.</horizpar></horizpa></posacc><lineage><srcinfo><srccite><citeinfo><origin>Visscher, Claes Jansz., 1586 or 1587-1652.</origin><origin>Wit, Frederik de.</origin><pubdate>1654</pubdate><title>Nova totius terrarum orbis geographica ac hydrographica tabula</title><geoform>map</geoform><pubinfo><pubplace>Amsterdam</pubplace><publish>F. de Wit</publish></pubinfo><othercit>1 map : hand col. ; 29 x 43 cm., on sheet 49 x 57 cm.</othercit><lworkcit><citeinfo><origin>Wit, Frederik de.</origin><origin>Visscher, Claes Jansz., 1586 or 1587-1652.</origin><origin>Blaeu, Willem Janszoon, 1571-1638.</origin><origin>Jacobsz, Anthonie. 1606?-1650.</origin><origin>Jacobsz, Theunis, 1632?-1679.</origin><pubdate>1654</pubdate><title>[Dutch sea atlas].</title><geoform>atlas</geoform><pubinfo><pubplace>Amsterdam</pubplace><publish>F. de Wit</publish></pubinfo><othercit>1 atlas : 15 col. maps ; 50 x 61 cm.</othercit></citeinfo></lworkcit></citeinfo></srccite><srcscale>100000000</srcscale><typesrc>paper</typesrc><srctime><timeinfo><sngdate><caldate>1654</caldate></sngdate></timeinfo><srccurr>publication date</srccurr></srctime><srccitea>Paper Map</srccitea><srccontr>Source map for raster image</srccontr></srcinfo><procstep><procdesc>Production of this raster image began with the scanning of the paper map on a high-resolution scanner (Colortrac Smart LF Gx+T42 scanner and SmartWorksPro version 1.1.1.5 scanning software) at 400dpi. Resulting images were rotated and cropped as needed using Adobe Photoshop CS5 Extended version 12.0. Images were saved as lossless JPEG2000 files.</procdesc><srcused>Paper Map</srcused><procdate>2012</procdate><srcprod>JP2 Map Image</srcprod><proccont><cntinfo><cntorgp><cntorg>Harvard Geospatial Library</cntorg></cntorgp><cntpos>GIS Technician</cntpos><cntaddr><addrtype>mailing and physical address</addrtype><address>Harvard University Information Technology</address><address>Library Technology Services</address><address>90 Mount Auburn Street</address><city>Cambridge</city><state>MA</state><postal>02138</postal><country>USA</country></cntaddr><cntvoice>617-495-2417</cntvoice><cntfax>617-496-0440</cntfax><cntemail>hgl_ref@hulmail.harvard.edu</cntemail><hours>Monday - Friday, 9:00 am - 4:00 pm EST-USA</hours></cntinfo></proccont></procstep><procstep><procdesc>Using ArcMap 10.1 software, the digital JPEG2000 image was georeferenced to common points located on digital vector shapefiles. For this image, the following vector shapefile was used as a base map for reference: ESRI Data and Maps 2010: World Country Boundaries (1:10,000,000). The base map data is displayed in the World Geodetic System 1984 (WGS 84) coordinate system, and the image was subsequently georeferenced to the same projection. A world file (.j2w) was automatically generated and saved in association with the digital image. See 'Horizontal Accuracy' for the RMS error of this image. Please note that the projection will need to be defined by the user in order to display the image with other projected data and the world file will need to be stored in the same root directory as the image.</procdesc><srcused>JP2 Map Image</srcused><procdate>2012</procdate><srcprod>Georeferenced Raster Data</srcprod><proccont><cntinfo><cntorgp><cntorg>Harvard Geospatial Library</cntorg></cntorgp><cntpos>GIS Technician</cntpos><cntaddr><addrtype>mailing and physical address</addrtype><address>Harvard University Information Technology</address><address>Library Technology Services</address><address>90 Mount Auburn Street</address><city>Cambridge</city><state>MA</state><postal>02138</postal><country>USA</country></cntaddr><cntvoice>617-495-2417</cntvoice><cntfax>617-496-0440</cntfax><cntemail>hgl_ref@hulmail.harvard.edu</cntemail><hours>Monday - Friday, 9:00 am - 4:00 pm EST-USA</hours></cntinfo></proccont></procstep></lineage></dataqual><spdoinfo><direct>Raster</direct><rastinfo><rasttype>Pixel</rasttype><rowcount>7606</rowcount><colcount>8936</colcount><vrtcount>1</vrtcount></rastinfo></spdoinfo><spref><horizsys><geograph><latres>0.000001</latres><longres>0.000001</longres><geogunit>Decimal degrees</geogunit></geograph><geodetic><horizdn>D_WGS_1984</horizdn><ellips>WGS_1984</ellips><semiaxis>6378137.000000</semiaxis><denflat>298.257224</denflat></geodetic></horizsys></spref><eainfo><overview><eaover>The indexes reference a color palette of RGB values from 0 through 255, representing the color value from the original paper sheet map. The colors on that sheet can represent relief, drainage, vegetation, populated places, cultural features, coastal hydrography, transportation features (roads, railroads, tracks and trails), spot elevations and boundaries. The colors are sometimes explained in a legend that is incorporated into the map inset or collar.</eaover><eadetcit>Not applicable.</eadetcit></overview></eainfo><distinfo><distrib><cntinfo><cntorgp><cntorg>Harvard University Information Technology</cntorg></cntorgp><cntpos>Harvard Geospatial Library</cntpos><cntaddr><addrtype>mailing and physical address</addrtype><address>Library Technology Services</address><address>90 Mount Auburn Street</address><city>Cambridge</city><state>MA</state><postal>02138</postal><country>USA</country></cntaddr><cntvoice>617-495-2417</cntvoice><cntfax>617-496-0440</cntfax><cntemail>hgl_ref@hulmail.harvard.edu</cntemail><hours>Monday - Friday, 9:00 am - 4:00 pm EST-USA</hours></cntinfo></distrib><resdesc>Downloadable Data</resdesc><distliab>Although this data set has been developed by Harvard University, no warranty expressed or implied is made by the University as to the accuracy of the data and related materials. The act of distribution shall not constitute any such warranty, and no responsibility is assumed by the University in the use of this data, or related materials.</distliab><stdorder><digform><digtinfo><formname>JPEG2000</formname><filedec>ZIP</filedec></digtinfo><digtopt><onlinopt><computer><networka><networkr>http://hgl.harvard.edu/</networkr></networka></computer></onlinopt></digtopt></digform><fees>None</fees></stdorder></distinfo><metainfo><metd>20140422</metd><metc><cntinfo><cntorgp><cntorg>Harvard Geospatial Library</cntorg></cntorgp><cntpos>Geospatial Metadata Librarian</cntpos><cntaddr><addrtype>mailing and physical address</addrtype><address>Harvard University Information Technology</address><address>Library Technology Services</address><address>90 Mount Auburn Street</address><city>Cambridge</city><state>MA</state><postal>02138</postal><country>USA</country></cntaddr><cntvoice>617-495-2417</cntvoice><cntfax>617-496-0440</cntfax><cntemail>hgl_ref@hulmail.harvard.edu</cntemail><hours>Monday - Friday, 9:00 am - 4:00 pm EST-USA</hours></cntinfo></metc><metstdn>FGDC Content Standards for Digital Geospatial Metadata</metstdn><metstdv>FGDC-STD-001-1998</metstdv><mettc>local time</mettc></metainfo></metadata>"
28
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "LayerId": "Tufts.WorldShorelineArea95",
3
+ "Name": "GISPORTAL.GISOWNER01.WORLDSHORELINEAREA95",
4
+ "CollectionId": "geoserver",
5
+ "Institution": "Tufts",
6
+ "Access": "Public",
7
+ "DataType": "Polygon",
8
+ "Availability": "online",
9
+ "LayerDisplayName": "Vector Shoreline Area World 1995",
10
+ "Publisher": "United States. National Imagery and Mapping Agency",
11
+ "Originator": "United States. National Imagery and Mapping Agency",
12
+ "OriginatorSort": "United States. National Imagery and Mapping Agency",
13
+ "ThemeKeywords": "Shorelines polygon boundaries oceans Boundaries",
14
+ "PlaceKeywords": "Polar Europe Africa Hemisphere South Regions World Western Asia America Northern Eastern North Southern Australia",
15
+ "PlaceKeywordsSynonyms": "Polar Europe Africa Hemisphere South Regions World Western Asia America Northern Eastern North Southern Australia",
16
+ "GeoReferenced": true,
17
+ "Abstract": "This polygon dataset represents coastlines, countries, and oceans. This data set was originally created for mission planning for military operations. Other potential applications include cartographic representation and boundary determination. The original World Vector Shoreline (WVS) was a digital data file containing the shorelines, international boundaries, and country names of the world. WVS data were processed into NGAs Vector Product Format in 1995, resulting in the highest resolution demarcation of coastline globally available, the World Vector Shoreline Plus.",
18
+ "Location": "{\"wfs\":\"http://geoserver01.uit.tufts.edu/wfs\",\"wms\":[\"http://geoserver01.uit.tufts.edu/wms\"]}",
19
+ "MaxY": 90,
20
+ "MinY": -90,
21
+ "MaxX": 180,
22
+ "MinX": -180,
23
+ "CenterX": 0,
24
+ "CenterY": 0,
25
+ "HalfWidth": 180,
26
+ "HalfHeight": 90,
27
+ "Area": 64800,
28
+ "WorkspaceName": "sde",
29
+ "ContentDate": "1995-01-01T01:01:01Z",
30
+ "FgdcText": "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" standalone=\"no\"?>\n<metadata>\n\t<idinfo>\n\t\t<citation>\n\t\t\t<citeinfo>\n\t\t\t\t<origin>United States. National Imagery and Mapping Agency</origin>\n\t\t\t\t<pubdate>1995</pubdate>\n\t\t\t\t<title>Vector Shoreline Area World 1995</title>\n\t\t\t\t<geoform>vector digital data</geoform>\n\t\t\t\t<onlink>http://shoreline.noaa.gov/data/datasheets/wvs.html</onlink>\n\t\t\t\t<lworkcit>\n\t\t\t\t\t<citeinfo>\n\t\t\t\t\t\t<origin>United States. National Imagery and Mapping Agency</origin>\n\t\t\t\t\t\t<pubdate>1995</pubdate>\n\t\t\t\t\t\t<title>World Vector Shoreline Dataset</title>\n\t\t\t\t\t\t<pubinfo>\n\t\t\t\t\t\t\t<pubplace>Charleston (S.C.)</pubplace>\n\t\t\t\t\t\t\t<publish>United States. National Imagery and Mapping Agency</publish>\n\t\t\t\t\t\t</pubinfo>\n\t\t\t\t\t\t<onlink>http://shoreline.noaa.gov/data/datasheets/wvs.html</onlink>\n\t\t\t\t\t</citeinfo>\n\t\t\t\t</lworkcit>\n\t\t\t\t<ftname Sync=\"TRUE\">WorldShorelineArea95</ftname>\n</citeinfo>\n\t\t</citation>\n\t\t<descript>\n\t\t\t<abstract>This polygon dataset represents coastlines, countries, and oceans. This data set was originally created for mission planning for military operations. Other potential applications include cartographic representation and boundary determination. The original World Vector Shoreline (WVS) was a digital data file containing the shorelines, international boundaries, and country names of the world. WVS data were processed into NGAs Vector Product Format in 1995, resulting in the highest resolution demarcation of coastline globally available, the World Vector Shoreline Plus.</abstract>\n\t\t\t<purpose>This dataset is intended for researchers, students, and policy makers for reference and mapping purposes, and may be used for basic applications such as viewing, querying, and map output production, or to provide a basemap to support graphical overlays and analysis with other spatial data.</purpose>\n\t\t\t<langdata Sync=\"TRUE\">en</langdata>\n</descript>\n\t\t<timeperd>\n\t\t\t<timeinfo>\n\t\t\t\t<sngdate>\n\t\t\t\t\t<caldate>1995</caldate>\n\t\t\t\t</sngdate>\n\t\t\t</timeinfo>\n\t\t\t<current>publication date</current>\n\t\t</timeperd>\n\t\t<status>\n\t\t\t<progress>Complete</progress>\n\t\t\t<update>As needed</update>\n\t\t</status>\n\t\t<spdom>\n\t\t\t<bounding>\n\t\t\t\t<westbc>\n-180.000000</westbc>\n\t\t\t\t<eastbc>\n180.000000</eastbc>\n\t\t\t\t<northbc>\n90.000000</northbc>\n\t\t\t\t<southbc>\n-90.000000</southbc>\n\t\t\t</bounding>\n\t\t\t<lboundng>\n<leftbc Sync=\"TRUE\">-180.000000</leftbc>\n<rightbc Sync=\"TRUE\">180.000000</rightbc>\n<bottombc Sync=\"TRUE\">-90.000000</bottombc>\n<topbc Sync=\"TRUE\">90.000000</topbc>\n</lboundng>\n</spdom>\n\t\t<keywords>\n\t\t\t<theme>\n\t\t\t\t<themekt>FGDC</themekt>\n\t\t\t\t<themekey>polygon</themekey>\n\t\t\t</theme>\n\t\t\t<theme>\n\t\t\t\t<themekt>ISO 19115 Topic Category</themekt>\n\t\t\t\t<themekey>oceans</themekey>\n\t\t\t\t<themekey>boundaries</themekey>\n\t\t\t</theme>\n\t\t\t<theme>\n\t\t\t\t<themekt>LCSH</themekt>\n\t\t\t\t<themekey>Shorelines</themekey>\n\t\t\t\t<themekey>Boundaries</themekey>\n\t\t\t</theme>\n\t\t\t<place>\n\t\t\t\t<placekt>LCNH</placekt>\n\t\t\t\t<placekey>Northern Hemisphere</placekey>\n\t\t\t\t<placekey>Western Hemisphere</placekey>\n\t\t\t\t<placekey>Eastern Hemisphere</placekey>\n\t\t\t\t<placekey>Southern Hemisphere</placekey>\n\t\t\t\t<placekey>Africa</placekey>\n\t\t\t\t<placekey>South America</placekey>\n\t\t\t\t<placekey>North America</placekey>\n\t\t\t\t<placekey>Europe</placekey>\n\t\t\t\t<placekey>Asia</placekey>\n\t\t\t\t<placekey>Australia</placekey>\n\t\t\t\t<placekey>Polar Regions</placekey>\n\t\t\t</place>\n\t\t\t<place>\n\t\t\t\t<placekt>Getty</placekt>\n\t\t\t\t<placekey>World</placekey>\n\t\t\t</place>\n\t\t</keywords>\n\t\t<accconst>Unrestricted Access Online</accconst>\n\t\t<useconst>For educational noncommercial use only.</useconst>\n\t\t<ptcontac>\n\t\t\t<cntinfo>\n\t\t\t\t<cntorgp>\n\t\t\t\t\t<cntorg>NOAA Coastal Services Center</cntorg>\n\t\t\t\t</cntorgp>\n\t\t\t\t<cntaddr>\n\t\t\t\t\t<addrtype>mailing and physical address</addrtype>\n\t\t\t\t\t<address>NOAA Coastal Services Center</address>\n\t\t\t\t\t<address>2234 South Hobson Avenue</address>\n\t\t\t\t\t<city>Charleston</city>\n\t\t\t\t\t<state>South Carolina</state>\n\t\t\t\t\t<postal>29405-2413</postal>\n\t\t\t\t\t<country>USA</country>\n\t\t\t\t</cntaddr>\n\t\t\t\t<cntvoice>843-740-1200</cntvoice>\n\t\t\t\t<cntfax>843-740-1224</cntfax>\n\t\t\t\t<cntemail>csc@scs.noaa.gov</cntemail>\n\t\t\t</cntinfo>\n\t\t</ptcontac>\n\t\t<native>Microsoft Windows Vista Version 6.1 (Build 7601) Service Pack 1; ESRI ArcCatalog 9.3.1.4000</native>\n\t\t<natvform Sync=\"TRUE\">Shapefile</natvform>\n</idinfo>\n\t<dataqual>\n\t\t<lineage>\n\t\t\t<srcinfo>\n\t\t\t\t<srcscale>1:250,000</srcscale>\n\t\t\t</srcinfo>\n\t\t\t<procstep>\n\t\t\t\t<procdesc>Metadata imported.</procdesc>\n\t\t\t\t<srcused>C:\\Users\\nsusma01\\AppData\\Local\\Temp\\xmlEFBB.tmp</srcused>\n\t\t\t\t<procdate>20130212</procdate>\n\t\t\t\t<proctime>11073200</proctime>\n\t\t\t</procstep>\n\t\t\t<procstep>\n\t\t\t\t<procdesc>Metadata imported.</procdesc>\n\t\t\t\t<srcused>S:\\GIS_Center_Projects\\EnterpriseGIS\\Layers\\Starter Metadata Template -Tufts - UTF-8.xml</srcused>\n\t\t\t\t<procdate>20130308</procdate>\n\t\t\t\t<proctime>13413000</proctime>\n\t\t\t</procstep>\n\t\t\t<procstep>\n\t\t\t\t<procdesc>Name changed from cocarea to WorldShorelineArea95.</procdesc>\n\t\t\t\t<procdate>20130319</procdate>\n\t\t\t\t<proccont>\n\t\t\t\t\t<cntinfo>\n\t\t\t\t\t\t<cntorgp>\n\t\t\t\t\t\t\t<cntorg>Tufts University Geographic Information Systems Center</cntorg>\n\t\t\t\t\t\t</cntorgp>\n\t\t\t\t\t\t<cntpos>GIS Data Technician</cntpos>\n\t\t\t\t\t\t<cntaddr>\n\t\t\t\t\t\t\t<addrtype>mailing and physical address</addrtype>\n\t\t\t\t\t\t\t<address>Academic Technology</address>\n\t\t\t\t\t\t\t<address>16 Dearborn Ave</address>\n\t\t\t\t\t\t\t<city>Somerville</city>\n\t\t\t\t\t\t\t<state>MA</state>\n\t\t\t\t\t\t\t<postal>02144</postal>\n\t\t\t\t\t\t\t<country>USA</country>\n\t\t\t\t\t\t</cntaddr>\n\t\t\t\t\t\t<cntvoice>617-627-3380</cntvoice>\n\t\t\t\t\t\t<cntemail>gis-support@elist.tufts.edu</cntemail>\n\t\t\t\t\t\t<hours>Monday-Friday, 9:00 AM-5:00 PM, EST-USA</hours>\n\t\t\t\t\t</cntinfo>\n\t\t\t\t</proccont>\n\t\t\t</procstep>\n\t\t\t<procstep>\n\t\t\t\t<procdesc>Dataset copied.</procdesc>\n\t\t\t\t<srcused>\\\\UITATECHGISFL3\\C$\\Users\\nsusma01\\Desktop\\WVS.gdb</srcused>\n\t\t\t\t<procdate>20130319</procdate>\n\t\t\t\t<proctime>12470100</proctime>\n\t\t\t</procstep>\n\t\t</lineage>\n\t</dataqual>\n\t<spdoinfo>\n\t\t<direct>Vector</direct>\n\t\t<ptvctinf>\n\t\t\t<sdtsterm Name=\"WorldShorelineArea95\">\n\t\t\t\t<sdtstype>G-polygon</sdtstype>\n\t\t\t\t<ptvctcnt>193284</ptvctcnt>\n\t\t\t</sdtsterm>\n\t\t\t<esriterm Name=\"WorldShorelineArea95\">\n<efeatyp Sync=\"TRUE\">Simple</efeatyp>\n<efeageom Sync=\"TRUE\">Polygon</efeageom>\n<esritopo Sync=\"TRUE\">FALSE</esritopo>\n<efeacnt Sync=\"TRUE\">193284</efeacnt>\n<spindex Sync=\"TRUE\">TRUE</spindex>\n<linrefer Sync=\"TRUE\">FALSE</linrefer>\n</esriterm>\n</ptvctinf>\n\t</spdoinfo>\n\t<spref>\n\t\t<horizsys>\n\t\t\t<geograph>\n\t\t\t\t<latres>0.000000</latres>\n\t\t\t\t<longres>0.000000</longres>\n\t\t\t\t<geogunit>Decimal degrees</geogunit>\n\t\t\t</geograph>\n\t\t\t<geodetic>\n\t\t\t\t<horizdn>D_WGS_1984</horizdn>\n\t\t\t\t<ellips>WGS_1984</ellips>\n\t\t\t\t<semiaxis>6378137.000000</semiaxis>\n\t\t\t\t<denflat>298.257224</denflat>\n\t\t\t</geodetic>\n\t\t\t<cordsysn>\n<geogcsn Sync=\"TRUE\">GCS_WGS_1984</geogcsn>\n</cordsysn>\n</horizsys>\n\t</spref>\n\t<eainfo>\n\t\t<detailed Name=\"WorldShorelineArea95\">\n\t\t\t<enttyp>\n\t\t\t\t<enttypl>\nWorldShorelineArea95</enttypl>\n\t\t\t\t<enttypt Sync=\"TRUE\">Feature Class</enttypt>\n<enttypc Sync=\"TRUE\">193284</enttypc>\n</enttyp>\n\t\t\t<attr>\n\t\t\t\t<attrlabl>FID</attrlabl>\n\t\t\t\t<attrdef>Internal feature number.</attrdef>\n\t\t\t\t<attrdefs>ESRI</attrdefs>\n\t\t\t\t<attrdomv>\n\t\t\t\t\t<udom>Sequential unique whole numbers that are automatically generated.</udom>\n\t\t\t\t</attrdomv>\n\t\t\t\t<attalias Sync=\"TRUE\">FID</attalias>\n<attrtype Sync=\"TRUE\">OID</attrtype>\n<attwidth Sync=\"TRUE\">4</attwidth>\n<atprecis Sync=\"TRUE\">0</atprecis>\n<attscale Sync=\"TRUE\">0</attscale>\n</attr>\n\t\t\t<attr>\n\t\t\t\t<attrlabl>Shape</attrlabl>\n\t\t\t\t<attrdef>Feature geometry.</attrdef>\n\t\t\t\t<attrdefs>Environmental Systems Research Institute (Redlands, Calif.)</attrdefs>\n\t\t\t\t<attrdomv>\n\t\t\t\t\t<udom>Coordinates defining the features.</udom>\n\t\t\t\t</attrdomv>\n\t\t\t\t<attalias Sync=\"TRUE\">Shape</attalias>\n<attrtype Sync=\"TRUE\">Geometry</attrtype>\n<attwidth Sync=\"TRUE\">0</attwidth>\n<atprecis Sync=\"TRUE\">0</atprecis>\n<attscale Sync=\"TRUE\">0</attscale>\n</attr>\n\t\t\t<attr>\n\t\t\t\t<attrlabl>OBJECTID_1</attrlabl>\n\t\t\t\t<attrdef>Unique identifier</attrdef>\n\t\t\t\t<attrdefs>Tufts University. Geographic Information Systems Center</attrdefs>\n\t\t\t\t<attalias Sync=\"TRUE\">OBJECTID_1</attalias>\n<attrtype Sync=\"TRUE\">Number</attrtype>\n<attwidth Sync=\"TRUE\">9</attwidth>\n</attr>\n\t\t\t<attr>\n\t\t\t\t<attrlabl>fac_id</attrlabl>\n\t\t\t\t<attrdef>Unknown attribute</attrdef>\n\t\t\t\t<attrdefs>Tufts University. Geographic Information Systems Center</attrdefs>\n\t\t\t\t<attalias Sync=\"TRUE\">fac_id</attalias>\n<attrtype Sync=\"TRUE\">Number</attrtype>\n<attwidth Sync=\"TRUE\">9</attwidth>\n</attr>\n\t\t\t<attr>\n\t\t\t\t<attrlabl>facc</attrlabl>\n\t\t\t\t<attrdef>Feature and attribute coding catalog identifier</attrdef>\n\t\t\t\t<attrdefs>Tufts University. Geographic Information Systems Center</attrdefs>\n\t\t\t\t<attrdomv>\n\t\t\t\t\t<edom>\n\t\t\t\t\t\t<edomv>BA040</edomv>\n\t\t\t\t\t\t<edomvd>Water (except inland)</edomvd>\n\t\t\t\t\t\t<edomvds>Tufts University. Geographic Information Systems Center</edomvds>\n\t\t\t\t\t</edom>\n\t\t\t\t</attrdomv>\n\t\t\t\t<attrdomv>\n\t\t\t\t\t<edom>\n\t\t\t\t\t\t<edomv>FA001</edomv>\n\t\t\t\t\t\t<edomvd>Administrative area</edomvd>\n\t\t\t\t\t\t<edomvds>Tufts University. Geographic Information Systems Center</edomvds>\n\t\t\t\t\t</edom>\n\t\t\t\t</attrdomv>\n\t\t\t\t<attalias Sync=\"TRUE\">facc</attalias>\n<attrtype Sync=\"TRUE\">String</attrtype>\n<attwidth Sync=\"TRUE\">5</attwidth>\n</attr>\n\t\t\t<attr>\n\t\t\t\t<attrlabl>facc_descr</attrlabl>\n\t\t\t\t<attalias Sync=\"TRUE\">facc_descr</attalias>\n<attrtype Sync=\"TRUE\">String</attrtype>\n<attwidth Sync=\"TRUE\">254</attwidth>\n</attr>\n\t\t\t<attr>\n\t\t\t\t<attrlabl>nam</attrlabl>\n\t\t\t\t<attrdef>Abbreviated name of the country</attrdef>\n\t\t\t\t<attrdefs>Tufts University. Geographic Information Systems Center</attrdefs>\n\t\t\t\t<attalias Sync=\"TRUE\">nam</attalias>\n<attrtype Sync=\"TRUE\">String</attrtype>\n<attwidth Sync=\"TRUE\">2</attwidth>\n</attr>\n\t\t\t<attr>\n\t\t\t\t<attrlabl>nam_descri</attrlabl>\n\t\t\t\t<attalias Sync=\"TRUE\">nam_descri</attalias>\n<attrtype Sync=\"TRUE\">String</attrtype>\n<attwidth Sync=\"TRUE\">254</attwidth>\n</attr>\n\t\t\t<attr>\n\t\t\t\t<attrlabl>tile_id</attrlabl>\n\t\t\t\t<attrdef>Unique identifier of the tile</attrdef>\n\t\t\t\t<attrdefs>Tufts University. Geographic Information Systems Center</attrdefs>\n\t\t\t\t<attalias Sync=\"TRUE\">tile_id</attalias>\n<attrtype Sync=\"TRUE\">Number</attrtype>\n<attwidth Sync=\"TRUE\">4</attwidth>\n</attr>\n\t\t\t<attr>\n\t\t\t\t<attrlabl>Shape_Leng</attrlabl>\n\t\t\t\t<attalias Sync=\"TRUE\">Shape_Leng</attalias>\n<attrtype Sync=\"TRUE\">Float</attrtype>\n<attwidth Sync=\"TRUE\">19</attwidth>\n<atnumdec Sync=\"TRUE\">11</atnumdec>\n</attr>\n\t\t\t<attr>\n\t\t\t\t<attrlabl>Shape_Area</attrlabl>\n\t\t\t\t<attrdef>Area of feature in internal units squared.</attrdef>\n\t\t\t\t<attrdefs>Environmental Systems Research Institute (Redlands, Calif.)</attrdefs>\n\t\t\t\t<attrdomv>\n\t\t\t\t\t<udom>Positive real numbers that are automatically generated.</udom>\n\t\t\t\t</attrdomv>\n\t\t\t\t<attalias Sync=\"TRUE\">Shape_Area</attalias>\n<attrtype Sync=\"TRUE\">Float</attrtype>\n<attwidth Sync=\"TRUE\">19</attwidth>\n<atnumdec Sync=\"TRUE\">11</atnumdec>\n</attr>\n\t\t</detailed>\n\t</eainfo>\n\t<distinfo>\n\t\t<distrib>\n\t\t\t<cntinfo>\n\t\t\t\t<cntorgp>\n\t\t\t\t\t<cntorg>Tufts University GIS Center</cntorg>\n\t\t\t\t</cntorgp>\n\t\t\t\t<cntpos>GIS Data Analyst</cntpos>\n\t\t\t\t<cntaddr>\n\t\t\t\t\t<addrtype>mailing and physical address</addrtype>\n\t\t\t\t\t<address>Academic Technology</address>\n\t\t\t\t\t<address>16 Dearborn Ave</address>\n\t\t\t\t\t<city>Somerville</city>\n\t\t\t\t\t<state>MA</state>\n\t\t\t\t\t<postal>02144</postal>\n\t\t\t\t\t<country>USA</country>\n\t\t\t\t</cntaddr>\n\t\t\t\t<cntvoice>617-627-3380</cntvoice>\n\t\t\t\t<cntemail>gis-support@elist.tufts.edu</cntemail>\n\t\t\t\t<hours>Monday-Friday, 9:00 AM-5:00 PM, EST-USA</hours>\n\t\t\t</cntinfo>\n\t\t</distrib>\n\t\t<resdesc>Online Dataset</resdesc>\n\t\t<stdorder>\n\t\t\t<digform>\n\t\t\t\t<digtinfo>\n\t\t\t\t\t<transize>178.944</transize>\n\t\t\t\t\t<dssize Sync=\"TRUE\">178.944</dssize>\n</digtinfo>\n\t\t\t</digform>\n\t\t</stdorder>\n\t</distinfo>\n\t<metainfo>\n\t\t<metd>20130416</metd>\n\t\t<metc>\n\t\t\t<cntinfo>\n\t\t\t\t<cntorgp>\n\t\t\t\t\t<cntorg>Tufts University GIS Center</cntorg>\n\t\t\t\t\t<cntper>REQUIRED: The person responsible for the metadata information.</cntper>\n\t\t\t\t</cntorgp>\n\t\t\t\t<cntpos>GIS Data Analyst</cntpos>\n\t\t\t\t<cntaddr>\n\t\t\t\t\t<addrtype>mailing and physical address</addrtype>\n\t\t\t\t\t<address>Academic Technology</address>\n\t\t\t\t\t<address>16 Dearborn Ave</address>\n\t\t\t\t\t<city>Somerville</city>\n\t\t\t\t\t<state>MA</state>\n\t\t\t\t\t<postal>02144</postal>\n\t\t\t\t\t<country>USA</country>\n\t\t\t\t</cntaddr>\n\t\t\t\t<cntvoice>617-627-3380</cntvoice>\n\t\t\t\t<cntemail>gis-support@elist.tufts.edu</cntemail>\n\t\t\t\t<hours>Monday-Friday, 9:00 AM-5:00 PM, EST-USA</hours>\n\t\t\t</cntinfo>\n\t\t</metc>\n\t\t<metstdn>FGDC Content Standards for Digital Geospatial Metadata</metstdn>\n\t\t<metstdv>FGDC-STD-001-1998</metstdv>\n\t\t<mettc>local time</mettc>\n\t\t<metextns>\n\t\t\t<onlink>http://www.esri.com/metadata/esriprof80.html</onlink>\n\t\t\t<metprof>ESRI Metadata Profile</metprof>\n\t\t</metextns>\n\t\t<metextns>\n\t\t\t<onlink>http://www.esri.com/metadata/esriprof80.html</onlink>\n\t\t\t<metprof>ESRI Metadata Profile</metprof>\n\t\t</metextns>\n\t\t<langmeta Sync=\"TRUE\">en</langmeta>\n<metextns>\n<onlink Sync=\"TRUE\">http://www.esri.com/metadata/esriprof80.html</onlink>\n<metprof Sync=\"TRUE\">ESRI Metadata Profile</metprof>\n</metextns>\n</metainfo>\n\t<dataIdInfo>\n<envirDesc Sync=\"TRUE\">Microsoft Windows Vista Version 6.1 (Build 7601) Service Pack 1; ESRI ArcCatalog 9.3.1.4000</envirDesc>\n<dataLang>\n<languageCode Sync=\"TRUE\" value=\"en\"/>\n</dataLang>\n<idCitation>\n<resTitle Sync=\"TRUE\">WorldShorelineArea95</resTitle>\n<presForm>\n<PresFormCd Sync=\"TRUE\" value=\"005\"/>\n</presForm>\n</idCitation>\n<spatRpType>\n<SpatRepTypCd Sync=\"TRUE\" value=\"001\"/>\n</spatRpType>\n<dataExt>\n<geoEle>\n<GeoBndBox esriExtentType=\"native\">\n<westBL Sync=\"TRUE\">-180</westBL>\n<eastBL Sync=\"TRUE\">180</eastBL>\n<northBL Sync=\"TRUE\">90</northBL>\n<southBL Sync=\"TRUE\">-90</southBL>\n<exTypeCode Sync=\"TRUE\">1</exTypeCode>\n</GeoBndBox>\n</geoEle>\n</dataExt>\n<geoBox esriExtentType=\"decdegrees\">\n<westBL Sync=\"TRUE\">-180</westBL>\n<eastBL Sync=\"TRUE\">180</eastBL>\n<northBL Sync=\"TRUE\">90</northBL>\n<southBL Sync=\"TRUE\">-90</southBL>\n<exTypeCode Sync=\"TRUE\">1</exTypeCode>\n</geoBox>\n</dataIdInfo>\n<mdLang>\n<languageCode Sync=\"TRUE\" value=\"en\"/>\n</mdLang>\n<mdStanName Sync=\"TRUE\">ISO 19115 Geographic Information - Metadata</mdStanName>\n<mdStanVer Sync=\"TRUE\">DIS_ESRI1.0</mdStanVer>\n<mdChar>\n<CharSetCd Sync=\"TRUE\" value=\"004\"/>\n</mdChar>\n<mdHrLv>\n<ScopeCd Sync=\"TRUE\" value=\"005\"/>\n</mdHrLv>\n<mdHrLvName Sync=\"TRUE\">dataset</mdHrLvName>\n<distInfo>\n<distributor>\n<distorTran>\n<onLineSrc>\n<orDesc Sync=\"TRUE\">002</orDesc>\n<linkage Sync=\"TRUE\">file://\\\\rstore2\\gisprojects$\\GIS_Center_Projects\\EnterpriseGIS\\Layers\\WVS\\WorldShorelineArea95.shp</linkage>\n<protocol Sync=\"TRUE\">Local Area Network</protocol>\n</onLineSrc>\n<transSize Sync=\"TRUE\">178.944</transSize>\n</distorTran>\n<distorFormat>\n<formatName Sync=\"TRUE\">Shapefile</formatName>\n</distorFormat>\n</distributor>\n</distInfo>\n<refSysInfo>\n<RefSystem>\n<refSysID>\n<identCode Sync=\"TRUE\">GCS_WGS_1984</identCode>\n</refSysID>\n</RefSystem>\n</refSysInfo>\n<spatRepInfo>\n<VectSpatRep>\n<topLvl>\n<TopoLevCd Sync=\"TRUE\" value=\"001\"/>\n</topLvl>\n<geometObjs Name=\"WorldShorelineArea95\">\n<geoObjTyp>\n<GeoObjTypCd Sync=\"TRUE\" value=\"001\"/>\n</geoObjTyp>\n<geoObjCnt Sync=\"TRUE\">193284</geoObjCnt>\n</geometObjs>\n</VectSpatRep>\n</spatRepInfo>\n<Esri>\n<SyncDate>20131115</SyncDate>\n<SyncTime>13264400</SyncTime>\n<ModDate>20131115</ModDate>\n<ModTime>13264400</ModTime>\n</Esri>\n<mdDateSt Sync=\"TRUE\">20131115</mdDateSt>\n</metadata>\n"
31
+ }
@@ -18,4 +18,24 @@ module JsonDocs
18
18
  def esri_opendata_metadata
19
19
  File.read(File.join(File.dirname(__FILE__), './docs/esri_open_data.json'))
20
20
  end
21
+
22
+ def ckan_metadata
23
+ File.read(File.join(File.dirname(__FILE__), './docs/ckan.json'))
24
+ end
25
+
26
+ def ogp_harvard_raster
27
+ File.read(File.join(File.dirname(__FILE__), './docs/ogp_harvard_raster.json'))
28
+ end
29
+
30
+ def ogp_harvard_line
31
+ File.read(File.join(File.dirname(__FILE__), './docs/ogp_harvard_line.json'))
32
+ end
33
+
34
+ def ogp_tufts_vector
35
+ File.read(File.join(File.dirname(__FILE__), './docs/ogp_tufts_vector.json'))
36
+ end
37
+
38
+ def geoblacklight_pre_v1
39
+ File.read(File.join(File.dirname(__FILE__), './docs/geoblacklight_pre_v1.json'))
40
+ end
21
41
  end
@@ -0,0 +1,59 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe GeoCombine::BoundingBox do
4
+ subject(:valid) do
5
+ described_class.new(west: -180, east: 180, north: 90, south: -90)
6
+ end
7
+ describe '#to_envelope' do
8
+ it 'returns a valid envelope syntax' do
9
+ expect(valid.to_envelope).to eq 'ENVELOPE(-180.0, 180.0, 90.0, -90.0)'
10
+ end
11
+ end
12
+ describe '#valid?' do
13
+ context 'when valid' do
14
+ it { valid.valid? }
15
+ end
16
+ context 'when south > north' do
17
+ subject(:invalid) do
18
+ described_class.new(west: -180, east: 180, north: 33, south: 34)
19
+ end
20
+ it { expect { invalid.valid? }.to raise_error GeoCombine::Exceptions::InvalidGeometry }
21
+ end
22
+ context 'when west > east' do
23
+ subject(:invalid) do
24
+ described_class.new(west: 10, east: -20, north: 90, south: -90)
25
+ end
26
+ it { expect { invalid.valid? }.to raise_error GeoCombine::Exceptions::InvalidGeometry }
27
+ end
28
+ context 'when west out of range' do
29
+ subject(:invalid) do
30
+ described_class.new(west: -181, east: 180, north: 90, south: -90)
31
+ end
32
+ it { expect { invalid.valid? }.to raise_error GeoCombine::Exceptions::InvalidGeometry }
33
+ end
34
+ context 'when east out of range' do
35
+ subject(:invalid) do
36
+ described_class.new(west: -180, east: 181, north: 90, south: -90)
37
+ end
38
+ it { expect { invalid.valid? }.to raise_error GeoCombine::Exceptions::InvalidGeometry }
39
+ end
40
+ context 'when north out of range' do
41
+ subject(:invalid) do
42
+ described_class.new(west: -180, east: 180, north: 91, south: -90)
43
+ end
44
+ it { expect { invalid.valid? }.to raise_error GeoCombine::Exceptions::InvalidGeometry }
45
+ end
46
+ context 'when south out of range' do
47
+ subject(:invalid) do
48
+ described_class.new(west: -180, east: 180, north: 90, south: -91)
49
+ end
50
+ it { expect { invalid.valid? }.to raise_error GeoCombine::Exceptions::InvalidGeometry }
51
+ end
52
+ end
53
+ describe '.from_envelope' do
54
+ it { expect(described_class.from_envelope(valid.to_envelope).to_envelope).to eq valid.to_envelope }
55
+ end
56
+ describe '.from_string_delimiter' do
57
+ it { expect(described_class.from_string_delimiter('-180, -90, 180, 90').to_envelope).to eq valid.to_envelope }
58
+ end
59
+ end
@@ -0,0 +1,114 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe GeoCombine::CkanMetadata do
4
+ include JsonDocs
5
+ let(:ckan_sample) { GeoCombine::CkanMetadata.new(ckan_metadata) }
6
+ describe '#to_geoblacklight' do
7
+ it 'returns a GeoCombine::Geoblacklight' do
8
+ expect(ckan_sample.to_geoblacklight).to be_an GeoCombine::Geoblacklight
9
+ end
10
+ end
11
+ describe '#geoblacklight_terms' do
12
+ describe 'builds a hash which maps metadata' do
13
+ let(:metadata) { ckan_sample.instance_variable_get(:@metadata) }
14
+ it 'with dc_identifier_s' do
15
+ expect(ckan_sample.geoblacklight_terms).to include(dc_identifier_s: metadata['id'])
16
+ end
17
+ it 'with dc_title_s' do
18
+ expect(ckan_sample.geoblacklight_terms).to include(dc_title_s: metadata['title'])
19
+ end
20
+ it 'with dc_rights_s' do
21
+ expect(ckan_sample.geoblacklight_terms).to include(dc_rights_s: 'Public')
22
+ end
23
+ it 'with dct_provenance_s' do
24
+ expect(ckan_sample.geoblacklight_terms).to include(dct_provenance_s: metadata['organization']['title'])
25
+ end
26
+ it 'with layer_slug_s' do
27
+ expect(ckan_sample.geoblacklight_terms).to include(layer_slug_s: metadata['name'])
28
+ end
29
+ it 'with solr_geom' do
30
+ expect(ckan_sample.geoblacklight_terms).to include(solr_geom: 'ENVELOPE(-158.2, -105.7, 59.2, 8.9)')
31
+ end
32
+ it 'with dc_subject_sm' do
33
+ expect(ckan_sample.geoblacklight_terms[:dc_subject_sm].length).to eq 63
34
+ end
35
+ context 'with no information resources' do
36
+ let(:ckan_sample) do
37
+ ckan = GeoCombine::CkanMetadata.new(ckan_metadata)
38
+ metadata = ckan.instance_variable_get('@metadata')
39
+ metadata['resources'].delete_if { |resource| resource['resource_locator_function'] == 'information' }
40
+ ckan
41
+ end
42
+ it 'has no url (home page) in dct_references_s' do
43
+ expect(JSON.parse(ckan_sample.geoblacklight_terms[:dct_references_s])).not_to include('http://schema.org/url')
44
+ end
45
+ end
46
+ context 'with no download resources' do
47
+ let(:ckan_sample) do
48
+ ckan = GeoCombine::CkanMetadata.new(ckan_metadata)
49
+ metadata = ckan.instance_variable_get('@metadata')
50
+ metadata['resources'].delete_if { |resource| resource['resource_locator_function'] == 'download' }
51
+ ckan
52
+ end
53
+ it 'has no downloadUrl in dct_references_s' do
54
+ expect(ckan_sample.downloadable?).to be_falsey
55
+ expect(JSON.parse(ckan_sample.geoblacklight_terms[:dct_references_s])).not_to include('http://schema.org/downloadUrl')
56
+ end
57
+ end
58
+ context 'with a ZIP download' do
59
+ let(:ckan_sample) do
60
+ ckan = GeoCombine::CkanMetadata.new(ckan_metadata)
61
+ metadata = ckan.instance_variable_get('@metadata')
62
+ metadata['resources'] = [
63
+ {
64
+ 'resource_locator_function' => 'download',
65
+ 'format' => 'ZIP',
66
+ 'url' => 'https://example.com/layer.zip'
67
+ }
68
+ ]
69
+ ckan
70
+ end
71
+ it 'has a format and a download URL' do
72
+ expect(ckan_sample.downloadable?).to be_truthy
73
+ expect(ckan_sample.geoblacklight_terms).to include(dc_format_s: 'ZIP')
74
+ expect(JSON.parse(ckan_sample.geoblacklight_terms[:dct_references_s])).to include('http://schema.org/downloadUrl' => 'https://example.com/layer.zip')
75
+ end
76
+ end
77
+ context 'without any resources' do
78
+ let(:ckan_sample) do
79
+ ckan = GeoCombine::CkanMetadata.new(ckan_metadata)
80
+ metadata = ckan.instance_variable_get('@metadata')
81
+ metadata.delete('resources')
82
+ ckan
83
+ end
84
+ it 'has no urls in dct_references_s' do
85
+ expect(ckan_sample.downloadable?).to be_falsey
86
+ expect(JSON.parse(ckan_sample.geoblacklight_terms[:dct_references_s])).not_to include('http://schema.org/url')
87
+ expect(JSON.parse(ckan_sample.geoblacklight_terms[:dct_references_s])).not_to include('http://schema.org/downloadUrl')
88
+ end
89
+ end
90
+ context 'with very long descriptions' do
91
+ let(:ckan_sample) do
92
+ ckan = GeoCombine::CkanMetadata.new(ckan_metadata)
93
+ metadata = ckan.instance_variable_get('@metadata')
94
+ metadata['notes'] = 'x' * 50000
95
+ ckan
96
+ end
97
+ it 'restricts the size' do
98
+ expect(ckan_sample.geoblacklight_terms[:dc_description_s].length).to eq GeoCombine::CkanMetadata::MAX_STRING_LENGTH + 1
99
+ end
100
+ end
101
+ context 'with no descriptions' do
102
+ let(:ckan_sample) do
103
+ ckan = GeoCombine::CkanMetadata.new(ckan_metadata)
104
+ metadata = ckan.instance_variable_get('@metadata')
105
+ metadata['notes'] = nil
106
+ ckan
107
+ end
108
+ it 'omits the description' do
109
+ expect(ckan_sample.geoblacklight_terms).not_to include(:dc_description_s)
110
+ end
111
+ end
112
+ end
113
+ end
114
+ end
@@ -19,4 +19,10 @@ RSpec.describe GeoCombine::Formatting do
19
19
  expect(subject.sanitize_and_remove_lines(dirty)).to_not match(/\n/)
20
20
  end
21
21
  end
22
+ describe '#sluggify' do
23
+ let(:preslug) { 'HARVARD...Co_0l' }
24
+ it 'handles multiple . and _ and uppercase' do
25
+ expect(subject.sluggify(preslug)).to eq 'harvard-co-0l'
26
+ end
27
+ end
22
28
  end
@@ -0,0 +1,190 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+ require 'rsolr'
5
+
6
+ RSpec.describe GeoCombine::GeoBlacklightHarvester do
7
+ let(:site_key) { :INSTITUTION }
8
+ let(:stub_json_response) { '{}' }
9
+ let(:stub_solr_connection) { double('RSolr::Connection') }
10
+ subject(:harvester) { described_class.new(site_key) }
11
+
12
+ before do
13
+ allow(described_class).to receive(:config).and_return({
14
+ INSTITUTION: {
15
+ host: 'https://example.com/',
16
+ params: {
17
+ f: { dct_provenance_s: ['INSTITUTION'] }
18
+ }
19
+ }
20
+ })
21
+ end
22
+
23
+ describe 'initialization' do
24
+ context 'when an unconfigured site is sent in' do
25
+ let(:site_key) { 'unknown' }
26
+
27
+ it { expect { harvester }.to raise_error(ArgumentError) }
28
+ end
29
+ end
30
+
31
+ describe '#index' do
32
+ before do
33
+ expect(Net::HTTP).to receive(:get).with(
34
+ URI('https://example.com?f%5Bdct_provenance_s%5D%5B%5D=INSTITUTION&format=json&per_page=100&page=1')
35
+ ).and_return(stub_json_response)
36
+ allow(RSolr).to receive(:connect).and_return(stub_solr_connection)
37
+ end
38
+
39
+ let(:docs) { [{ layer_slug_s: 'abc-123' }, { layer_slug_s: 'abc-321' }] }
40
+ let(:stub_json_response) do
41
+ { response: { docs: docs, pages: { current_page: 1, total_pages: 1 } } }.to_json
42
+ end
43
+
44
+ it 'adds documents returned to solr' do
45
+ expect(stub_solr_connection).to receive(:update).with(hash_including(data: docs.to_json)).and_return(nil)
46
+ harvester.index
47
+ end
48
+
49
+ describe 'document tranformations' do
50
+ let(:docs) do
51
+ [
52
+ { layer_slug_s: 'abc-123', _version_: '1', timestamp: '1999-12-31', score: 0.1 },
53
+ { layer_slug_s: 'abc-321', dc_source_s: 'abc-123' }
54
+ ]
55
+ end
56
+
57
+ context 'when a tranformer is set' do
58
+ before do
59
+ expect(described_class).to receive(:document_transformer).at_least(:once).and_return(
60
+ ->(doc) {
61
+ doc.delete('_version_')
62
+ doc
63
+ }
64
+ )
65
+ end
66
+
67
+ it 'removes the _version_ field as requested' do
68
+ expect(stub_solr_connection).to receive(:update).with(
69
+ hash_including(
70
+ data: [
71
+ { layer_slug_s: 'abc-123', timestamp: '1999-12-31', score: 0.1 },
72
+ { layer_slug_s: 'abc-321', dc_source_s: 'abc-123' }
73
+ ].to_json
74
+ )
75
+ ).and_return(nil)
76
+
77
+ harvester.index
78
+ end
79
+ end
80
+
81
+ context 'when no transformer is set' do
82
+ it 'removes the _version_, timestamp, and score fields' do
83
+ expect(stub_solr_connection).to receive(:update).with(
84
+ hash_including(
85
+ data: [
86
+ { layer_slug_s: 'abc-123' },
87
+ { layer_slug_s: 'abc-321', dc_source_s: 'abc-123' }
88
+ ].to_json
89
+ )
90
+ ).and_return(nil)
91
+
92
+ harvester.index
93
+ end
94
+ end
95
+ end
96
+ end
97
+
98
+ describe 'BlacklightResponseVersionFactory' do
99
+ let(:version_class) { described_class::BlacklightResponseVersionFactory.call(json) }
100
+
101
+ context 'when a legacy blacklight version (6 and earlier)' do
102
+ let(:json) { { 'response' => {} } }
103
+
104
+ it { expect(version_class).to be described_class::LegacyBlacklightResponse }
105
+ end
106
+
107
+ context 'when a modern blacklight version (7 and later)' do
108
+ let(:json) { { 'links' => {}, 'data' => [] } }
109
+
110
+ it { expect(version_class).to be described_class::ModernBlacklightResponse }
111
+ end
112
+
113
+ context 'when a the JSON response is not recognizable' do
114
+ let(:json) { { error: 'Broken' } }
115
+
116
+ it { expect { version_class }.to raise_error(NotImplementedError) }
117
+ end
118
+ end
119
+
120
+ describe 'LegacyBlacklightResponse' do
121
+ before do
122
+ allow(RSolr).to receive(:connect).and_return(stub_solr_connection)
123
+ end
124
+
125
+ let(:first_docs) { [{ 'layer_slug_s' => 'abc-123' }, { 'layer_slug_s' => 'abc-321' }] }
126
+ let(:second_docs) { [{ 'layer_slug_s' => 'xyz-123' }, { 'layer_slug_s' => 'xyz-321' }] }
127
+ let(:stub_first_response) do
128
+ { 'response' => { 'docs' => first_docs, 'pages' => { 'current_page' => 1, 'total_pages' => 2 } } }
129
+ end
130
+ let(:stub_second_response) do
131
+ { 'response' => { 'docs' => second_docs, 'pages' => { 'current_page' => 2, 'total_pages' => 2 } } }
132
+ end
133
+
134
+ describe '#documents' do
135
+ it 'pages through the response and returns all the documents' do
136
+ expect(Net::HTTP).to receive(:get).with(
137
+ URI('https://example.com?f%5Bdct_provenance_s%5D%5B%5D=INSTITUTION&format=json&per_page=100&page=2')
138
+ ).and_return(stub_second_response.to_json)
139
+ base_url = 'https://example.com?f%5Bdct_provenance_s%5D%5B%5D=INSTITUTION&format=json&per_page=100'
140
+ docs = described_class::LegacyBlacklightResponse.new(response: stub_first_response, base_url: base_url).documents
141
+
142
+ expect(docs.to_a).to eq([first_docs, second_docs])
143
+ end
144
+ end
145
+ end
146
+
147
+ describe 'ModernBlacklightResponse' do
148
+ before do
149
+ allow(RSolr).to receive(:connect).and_return(stub_solr_connection)
150
+ expect(Net::HTTP).to receive(:get).with(
151
+ URI('https://example.com/catalog.json?f%5Bdct_provenance_s%5D%5B%5D=INSTITUTION&per_page=100&page=2&format=json')
152
+ ).and_return(second_results_response.to_json)
153
+ end
154
+
155
+ let(:first_results_response) do
156
+ { 'data' => [
157
+ { 'links' => { 'self' => 'https://example.com/catalog/abc-123' } },
158
+ { 'links' => { 'self' => 'https://example.com/catalog/abc-321' } }
159
+ ],
160
+ 'links' => { 'next' => 'https://example.com/catalog.json?f%5Bdct_provenance_s%5D%5B%5D=INSTITUTION&per_page=100&page=2' }
161
+ }
162
+ end
163
+
164
+ let(:second_results_response) do
165
+ { 'data' => [
166
+ { 'links' => { 'self' => 'https://example.com/catalog/xyz-123' } },
167
+ { 'links' => { 'self' => 'https://example.com/catalog/xyz-321' } }
168
+ ]
169
+ }
170
+ end
171
+
172
+ describe '#documents' do
173
+ it 'pages through the response and fetches documents for each "link" on the response data' do
174
+ %w[abc-123 abc-321 xyz-123 xyz-321].each do |id|
175
+ expect(Net::HTTP).to receive(:get).with(
176
+ URI("https://example.com/catalog/#{id}/raw")
177
+ ).and_return({ 'layer_slug_s' => id }.to_json)
178
+ end
179
+
180
+ base_url = 'https://example.com?f%5Bdct_provenance_s%5D%5B%5D=INSTITUTION&format=json&per_page=100'
181
+ docs = described_class::ModernBlacklightResponse.new(response: first_results_response, base_url: base_url).documents
182
+
183
+ expect(docs.to_a).to eq([
184
+ [{ 'layer_slug_s' => 'abc-123' }, { 'layer_slug_s' => 'abc-321' }],
185
+ [{ 'layer_slug_s' => 'xyz-123' }, { 'layer_slug_s' => 'xyz-321' }],
186
+ ])
187
+ end
188
+ end
189
+ end
190
+ end