Warning: This page has not been updated in over over a year and may be outdated or deprecated.
configuration:geographic_features
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
configuration:geographic_features [2023/10/24 11:02] – Remove technical notes on releases 3.x and 4.x. demiankatz | configuration:geographic_features [2023/10/24 19:25] (current) – [General Configuration Notes] lmgonzales | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Geographic Features ====== | ====== Geographic Features ====== | ||
- | VuFind | + | VuFind® |
Features: | Features: | ||
Line 11: | Line 11: | ||
To properly configure the Geographic Search & Display modules, you will need to ensure that your data is indexed properly, and then you will need to configure the module options in the associated .ini files. | To properly configure the Geographic Search & Display modules, you will need to ensure that your data is indexed properly, and then you will need to configure the module options in the associated .ini files. | ||
- | This functionality was first introduced in VuFind | + | This functionality was first introduced in VuFind® |
===== Indexing Geographic Data ===== | ===== Indexing Geographic Data ===== | ||
Line 19: | Line 19: | ||
==== Coordinates ==== | ==== Coordinates ==== | ||
The coordinate data will go into field 034 of your MARC record, in subfields $d,$e,$f, and $g. | The coordinate data will go into field 034 of your MARC record, in subfields $d,$e,$f, and $g. | ||
- | You can format your coordinates as decimal degrees (DD) or degrees minutes seconds (DMS), and you can assign hemispheres by using either letters (N,S,E,W) or symbols (+,-). | + | You can format your coordinates as decimal degrees (DD) or degrees minutes seconds (DMS), and you can assign hemispheres by using either letters (N,S,E,W) or symbols (+,-). If you omit the + sign, it is considered the default. |
Note that the order for coordinates in the [[http:// | Note that the order for coordinates in the [[http:// | ||
$d: West; $e: East; $f: North; $g: South | $d: West; $e: East; $f: North; $g: South | ||
- | * Note, [[https:// | + | If malformed coordinates are detected during indexing, an error message containing the record ID, coordinate values, and problems with the coordinate values will be displayed. Malformed coordinates will not be included in the indexed |
- | + | ||
- | If malformed coordinates are detected during indexing, an error message containing the record ID, coordinate values, and problems with the coordinate values will be displayed. Malformed coordinates will not be indexed. | + | |
==== Labels ==== | ==== Labels ==== | ||
Line 51: | Line 49: | ||
==== Solr fields and files ==== | ==== Solr fields and files ==== | ||
- | Starting in VuFind | + | Starting in VuFind® |
* **long_lat**: | * **long_lat**: | ||
* **long_lat_display**: | * **long_lat_display**: | ||
Line 65: | Line 63: | ||
===== Displaying Geographic Data ===== | ===== Displaying Geographic Data ===== | ||
- | Starting with VuFind | + | |
+ | ==== Underlying Technology ==== | ||
+ | Starting with VuFind® | ||
Leaflet provides a light-weight code base for displaying point and rectangle features, as well as their labels and coordinates. | Leaflet provides a light-weight code base for displaying point and rectangle features, as well as their labels and coordinates. | ||
Features can be clicked on to show a popup window that will display the label and/or coordinates of that feature depending on how the [MapTab] section is configured in the **geofeatures.ini** file. | Features can be clicked on to show a popup window that will display the label and/or coordinates of that feature depending on how the [MapTab] section is configured in the **geofeatures.ini** file. | ||
- | //Notes:// | + | ==== General Configuration |
- | * The recordMap parameter in geofeatures.ini [MapTab] section | + | * The recordMap parameter in geofeatures.ini [MapTab] section can be used to toggle the Map Tab display on and off. |
* The basemap is set in the [Basemap] section of geofeatures.ini | * The basemap is set in the [Basemap] section of geofeatures.ini | ||
Line 89: | Line 89: | ||
Labels can be read from the long_lat_label field if they are stored in Solr, or assigned on the fly with a look-up table. If you use a look-up table, put it in your local/ | Labels can be read from the long_lat_label field if they are stored in Solr, or assigned on the fly with a look-up table. If you use a look-up table, put it in your local/ | ||
+ | :!: // Note: Starting in VuFind® 7.0., the contentsecuritypolicy.ini file was implemented. You will need to modify this file to include the basemap tileserver domain. | ||
+ | |||
+ | The following is an example if you are using CARTO basemap server: | ||
+ | // | ||
+ | < | ||
+ | img-src[] = " | ||
+ | </ | ||
+ | ==== Notes on Map Tiles ==== | ||
+ | |||
+ | Map display depends on access to a tile set to allow zooming and scrolling around the world. The geofeatures.ini file includes some example tile URLs, but tile sets from free providers come with significant limitations on usage. If you wish to use this feature in production, you may need to subscribe to a commercial map provider or else run your own [[configuration: | ||
+ | |||
+ | One way to help reduce the amount of map tile server calls is to configure the defaultRecordTab setting in the config.ini file to something other than " | ||
===== Geographic Searching ===== | ===== Geographic Searching ===== | ||
Line 102: | Line 114: | ||
If you need help, just click on the **Need Help?** link next to the **Draw Search Box** button. | If you need help, just click on the **Need Help?** link next to the **Draw Search Box** button. | ||
- | The help text for geographic searching has been integrated into the VuFind | + | The help text for geographic searching has been integrated into the VuFind® |
- | Starting in VuFind | + | Starting in VuFind® |
==== Configurable Options ==== | ==== Configurable Options ==== | ||
To turn on the geographic search functionality, | To turn on the geographic search functionality, | ||
Line 111: | Line 123: | ||
</ | </ | ||
- | === VuFind 5.0 and Later: === | + | You can set the default search box coordinates and the height of the map search interface in the [MapSelection] section of the **geofeatures.ini** file. |
- | Set the default search box coordinates and the height of the map search interface in the [MapSelection] section of the **geofeatures.ini** file. | + | |
When setting your default search coordinates, | When setting your default search coordinates, | ||
Line 125: | Line 136: | ||
; height: | ; height: | ||
default_coordinates = "-95, 30, 72, 15" | default_coordinates = "-95, 30, 72, 15" | ||
- | height = 320 | ||
- | </ | ||
- | |||
- | === VuFind 3.1 and 4.x: ==== | ||
- | Set the default search box coordinates and the height of the map search interface in the Map Selection section of the searches.ini file. | ||
- | |||
- | When setting your default search coordinates, | ||
- | < | ||
- | [MapSelection] | ||
- | ; The default coordinates specified below are in decimal degrees, and are | ||
- | ; ordered as WENS (west, east, north, south). Ranges of valid values are: | ||
- | ; -180 to 180 (longitude) and -85 to 85 (latitude). Note, to search from and to | ||
- | ; the international date line, use west = -179 and east = -180. | ||
- | default_coordinates = "-95, 30, 72, 15" | ||
- | ; height: Height in pixels of the map selection interface. | ||
height = 320 | height = 320 | ||
</ | </ | ||
Line 165: | Line 161: | ||
DismaxHandler: | DismaxHandler: | ||
</ | </ | ||
- | |||
- | ==== Caveats for VuFind 3.1 and 4.x ==== | ||
- | The following functionality was upgraded in VuFind 5.0. In VuFind 5.0, all geographic features that intersect the search box are plotted. Center points for rectangle features are clustered and clusters, when hovered over show the range of center points contained within the cluster. | ||
- | |||
- | **Clustering of Rectangle Features** \\ | ||
- | Search results clustering requires that all clustered features be points. As such, the code calculates the center point for each rectangle feature. | ||
- | The code goes through several routines to check for rectangle features that intersect the search box, and to check if the center point of those rectangles land within the search box. | ||
- | For those rectangles that intersect the search box and have center points that fall outside of the search box, the code sets the rectangles' | ||
- | |||
- | **Records with Multiple Geographic Features** \\ | ||
- | For records that have multiple geographic features, only the first feature that falls within the search box is plotted in the search results. | ||
- | |||
===== Customizing the Geographic Search & Display Code ===== | ===== Customizing the Geographic Search & Display Code ===== | ||
Line 231: | Line 215: | ||
===== Additional Resources ===== | ===== Additional Resources ===== | ||
- | For an overview of these features as they were originally developed for VuFind | + | For an overview of these features as they were originally developed for VuFind® |
---- struct data ---- | ---- struct data ---- |
configuration/geographic_features.1698145360.txt.gz · Last modified: 2023/10/24 11:02 by demiankatz