1.6 Karten

Indexing of coordinates

Here are a few examples of how to configure the indexing of coordinates.

Example with separately recorded coordinates

<!-- MODS -->
<intranda:location>
<intranda:name language="ger">Schönwalde</intranda:name>
<intranda:name language="pol">Zajezierze</intranda:name>
<intranda:latitude>53.586123100000002</intranda:latitude>
<intranda:longitude>15.733848099999999</intranda:longitude>
</intranda:location>
<!-- Goobi viewer Indexer -->
<MD_COORDINATES>
<list>
<item>
<xpath>mets:xmlData/mods:mods/mods:extension/intranda:location</xpath>
<addToDefault>true</addToDefault>
<onefield>false</onefield>
<geoJSONSource separator=" / " addSearchField="true">mods:coordinates/point</geoJSONSource>
<groupEntity type="LOCATION">
<field name="MD_VALUE">concat(intranda:longitude/text(), " / ", intranda:latitude/text())</field>
</groupEntity>
</item>
</list>
</MD_COORDINATES>

Example with jointly acquired coordinates

<!-- MODS -->
<mods:cartographics>
<mods:scale>1:4000</mods:scale>
<mods:projection>Katasterkarte</mods:projection>
<mods:coordinates>54.04592419999999 / 13.247582599999987</mods:coordinates>
</mods:cartographics>
<!-- Goobi viewer Indexer -->
<MD_COORDINATES>
<list>
<item>
<xpath>mets:xmlData/mods:mods/mods:subject/mods:cartographics/mods:coordinates</xpath>
<addToDefault>true</addToDefault>
<onefield>false</onefield>
<geoJSONSource separator=" / " addSearchField="true">mods:coordinates/point</geoJSONSource>
</item>
</list>
</MD_COORDINATES>

Example with Geonames Identifier

<!-- MODS -->
<mods:originInfo>
<mods:place>
<mods:placeTerm type="text" valueURI="http://www.geonames.org/7871502">Linz</mods:placeTerm>
</mods:place>
</mods:originInfo>
<!-- Goobi viewer Indexer -->
<MD_PLACEPUBLISH>
<list>
<item>
<xpath>mets:xmlData/mods:mods/mods:originInfo/mods:place/mods:placeTerm</xpath>
<getchilds>all</getchilds>
<addToDefault>true</addToDefault>
<groupEntity type="VIAF">
<field name="MD_VALUE">text()</field>
<field name="MD_DISPLAYFORM">text()</field>
<field name="NORM_URI_VIAF">@valueURI</field>
</groupEntity>
</item>
</list>
</MD_PLACEPUBLISH>

Search by coordinates

Since version 4.6, the Goobi viewer has supported searching for coordinates. GML points and polygons (as in DenkXweb) and mods:coordinates can be indexed as geoJSON and displayed on maps. Furthermore, faceting queries for searching for points, points in polygon, polygon intersections can be passed directly in the URL. For this the coordinates are indexed as WKT.

To allow as many faceting options as possible, the entire WKT query must be formulated in the client (i.e. in JavaScript). Examples are:

  • Search for a point:https://viewer.example.org/search/-/-/1/-/WKT_COORDS:"Intersects(POINT(9.86929194928373 51.8163517626803)) distErrPct=0"/

  • Contained in polygon (for example points):https://viewer.example.org/search/-/-/1/-/WKT_COORDS:"IsWithin(POLYGON((0 0, 0 90, 90 90, 90 0, 0 0))) distErrPct=0"/

  • Partially contained in polygon (for example other polygon):https://viewer.example.org/search/-/-/1/-/WKT_COORDS:"Intersects(POLYGON((0 0, 0 90, 90 90, 90 0, 0 0))) distErrPct=0"/

  • Not included in the polygon:https://viewer.example.org/search/-/-/1/-/WKT_COORDS:"IsDisjointTo(POLYGON((0 0, 0 -90, -90 -90, -90 0, 0 0))) distErrPct=0"/

For details on indexing, refer to chapter 3.7.19.

Configuration of maps

In order to display indexed geo-coordinates on a map, a corresponding Solr query must be formulated. This could be, for example, all works with indexed geo-coordinates:

+BOOL_WKT_COORDS:true

Alternatively, all records that have geocoordinates in a specific field and belong to a collection:

+MD_COORDINATES:* +DC:archives*

It is also important that the fields in which the coordinates were indexed are made known to the Goobi viewer. To do this, the field must be defined in the following list within config_viewer.xml:

config_viewer.xml
config_viewer.xml
<maps>
<coordinateFields>
<field>MD_GEOJSON_POINT</field>
<field>NORM_COORDS_GEOJSON</field>
</coordinateFields>
</maps>