Presentation is loading. Please wait.

Presentation is loading. Please wait.

Geographic Search & Display

Similar presentations


Presentation on theme: "Geographic Search & Display"— Presentation transcript:

1 Geographic Search & Display
Leila M. Gonzales American Geosciences Institute VuFind Summit 2016 Villanova University October 10, 2016

2 AGI’s Online Database Products
10K - 300K records depending on database DB/Text platform Metadata only – no full-text or map search Records contain geo-coordinates – points and rectangles Ocean Drilling Citation Database

3 Initial Implementation
Geographic Search Custom code based on Moravian Library’s implementation using VuFind 2.4 and OpenLayers 2.13

4 Initial Implementation - Limitations
Custom implementation Different APIs for search & display Geographic Search Only displays search box Uses OpenLayers 2.13 API Geographic Display Popups for rectangles needs improvement Uses Google Maps API Google now requires API key

5 VuFind 3.1 Geo Search & Display
Preserve GoogleMap functionality Add new geographic functionality Update Solr indexing routines Add OpenLayers geo search & display code Support multiple points and rectangles per record Add configurable options

6 VuFind 3.1 Geo Search & Display
InputData.mrc Record 20001 =034 $d $e $f $g $z Solr location_geo long_lat long_lat_display long_lat_label Geographic Display Geographic Search

7 Indexing Geographic Data
Coordinates: 034 $d $e $f $g Decimal degrees or Degrees-min-sec Hemisphere: EW NS or +/- Coordinate order: WENS Points and/or Rectangles Coordinate labels: 034 $z Or use lookup table to assign labels by coordinate lookup Put lookup table in local/config/vufind/ InputData.mrc Record 20001 =034 $d $e $f $g $z =034 0\$aa$d+46.4$e+40.4$f+31.5$g+28.50$zSite 447 =034 0\$aa$dW10.1$eW10.1$fS5.7$gS5.7$zSite 440 =034 0\$aa$dW $eW $fN661503$gN661503$zSite 393

8 Indexing Geographic Data
InputData.mrc Record 20001 =034 $d $e $f $g $z Solr location_geo: coordinates as BboxField type long_lat: for GoogleMaps display only long_lat_display: coordinate as in .mrc file long_lat_label: stored coordinate labels schema.xml: updated to include above fields and “geo” field type (see Solr Spatial Search Guide on BboxField type) marc_local.properties: configure indexing of geographic fields location.bsh: geographic indexing routines Solr Spatial Search Guide:

9 Geographic Display – GoogleMap
Key Points Only point features Labels: Use stored labels or lookup table Must have GoogleMap API key config.ini ;Geographic Display recordMap = google mapLabels = driver OR mapLabels = file:lookup.txt googleMapApiKey = API Key

10 Geographic Display – OpenLayers
Key Points Points and Rectangles Labels: Use stored labels or lookup table Display coordinates Translation of pop-up title (map_results_label) config.ini ;Geographic Display recordMap = openlayers mapLabels = driver OR mapLabels = file:lookup.txt displayCoords = true (or false)

11 Geographic Display – Customize
RecordTab/map.phtml Also contains GoogleMap javascript code js/map_tab_ol.js OpenLayers javascript code RecordTab/Factory.php RecordTab/Map.php RecordDriver/SolrDefault.php

12 Geographic Search localhost/vufind/Search/Results?filter[]=
bbox_geo:Intersects(ENVELOPE(-95, 30, 72, 15))

13 Geographic Search

14 Geographic Search Solr Bbox query against location_geo
Zoom in / out (uncluster / cluster) Clusters <5 records: Pop-up with titles linked to records Displays center point of the first geographic feature of each record that intersects search box. Solr location_geo title id

15 Geographic Search Click on “Geographic Search” in search box
Click on Draw Search Box, then click-drag-click search box

16 Geographic Search – Help
Need Help? Uses VuFind help system Easier to maintain for language translation

17 Geographic Search - Configure
Configurable options Default search box coordinates Don’t make it too large or too small Focus on area of most results Height Height of map interface in pixels searches.ini ;default_top_recommend[ ] = MapSelection [MapSelection] default_coordinates = “-95, 30, 72, 15” height = 320

18 Geographic Search - Configure
Configurable options Search parameter to allow searching by coordinate string. Queries against long_lat_display searches.ini [Basic_Searches] ;Coordinate = Coordinates [Advanced_Searches] [Autocomplete_Types] Coordinate = “None” searchspecs.yaml Coordinate: DismaxFields: - long_lat_display DismaxHandler: edismax

19 Geographic Search – Customize
Recommend/MapSelection.phtml search/searchbox.phtml If enabled in searches.ini, Geographic Search option appears in search box. root/templates/HelpTranslations/en/geosearch.phtml js/map_selection.js Recommend/MapSelection.php View/Helper/Root/GeoCoords.php Returns geo search URL

20 Geographic Support Code
OpenLayers code js/vendor/ol/ol.js , ol-debug.js css/vendor/ol/ol.css RecordDriver/SolrDefault.php getLongLat getGeoLocation getDisplayCoordinates getCoordinateLabels CSS styling – add geoItem class for pop-ups css/compiled.css less/components/search.less

21 Future Improvements Polygon storage and search
Fall-back logic for map tab label field Support OpenLayers cluster pop-up information Mouse-over to highlight all points associated with cluster Better handling of multiple features / center point calculations Specification of base map layer Option for graticule (lat/long grid) display on map “More like this” or Similar Items Map Recommendation module

22 Thank you for your attention
Leila M. Gonzales American Geosciences Institute


Download ppt "Geographic Search & Display"

Similar presentations


Ads by Google