AtlasOfLivingAustralia / biocache-service

Occurrence & mapping webservices
https://biocache-ws.ala.org.au/ws/
Other
9 stars 26 forks source link

Backport Heatmap fix in 2.7.x #750

Closed sylvain-morin closed 2 years ago

sylvain-morin commented 2 years ago

This PR is the backport in branch 2.7.x of the heatmap fix done by ALA in 3.x

This backport has been tested (and is in production in France: https://openobs.mnhn.fr) on a 2.5.x branch.

This 2.7.x backport is similar to the 2.5.x but it was NOT tested because 2.7.x is not compatible with my current ALA deployment.

REMINDER: it has some requirements in term of SolR version and the schema should contains the "quad" field Maybe we should create a separated 2.7.x branch?

<fieldType name="geohash"
               class="solr.SpatialRecursivePrefixTreeFieldType"
               datelineRule="ccwRect"
               spatialContextFactory="org.locationtech.spatial4j.context.jts.JtsSpatialContextFactory"
               validationRule="none"
               distanceUnits="degrees"
               autoIndex="true"
    />
    <fieldType name="quad"
               class="solr.SpatialRecursivePrefixTreeFieldType"
               datelineRule="ccwRect"
               spatialContextFactory="org.locationtech.spatial4j.context.jts.JtsSpatialContextFactory"
               validationRule="none"
               distanceUnits="degrees"
               prefixTree="quad"
               autoIndex="true"
    />
    <fieldType name="packedQuad"
               class="solr.SpatialRecursivePrefixTreeFieldType"
               datelineRule="ccwRect"
               spatialContextFactory="org.locationtech.spatial4j.context.jts.JtsSpatialContextFactory"
               validationRule="none"
               distanceUnits="degrees"
               prefixTree="packedQuad"
               autoIndex="true"
    />

    <field name="geohash"       type="geohash"     indexed="true"/>
    <field name="quad"          type="quad"        indexed="true"/>
    <field name="packedQuad"    type="packedQuad"  indexed="true"/>