Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Linux, Solr 4.0.0, Solr 4.3.0
Description
When trying to index a field of the type solr.SpatialRecursivePrefixTreeFieldType the indexing will fail if two vertexes are more than 180 longitudal degress apart.
For instance this polygon will fail:
POLYGON((-161 49, 0 49, 20 49, 20 89.1, 0 89.1, -161 89.2, -161 49))
but this will not.
POLYGON((-160 49, 0 49, 20 49, 20 89.1, 0 89.1, -160 89.2, -160 49))
This contradicts the documentation found here: http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4
The documentation states that each vertex must be less than 180 longitudal degrees apart from the previous vertex.
Relevant parts from the schema.xml file:
<!-- Field type for storing WTK based polygons -->
<fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"
spatialContextFactory="com.spatial4j.core.context.jts.JtsSpatialContextFactory"
distErrPct="0.025"
maxDistErr="0.000009"
units="degrees"
/>
<field name="geographic_extent" type="location_rpt" index="true" stored="true" />
Attachments
Issue Links
- is blocked by
-
LUCENE-5395 Upgrade Spatial4j to 0.4
- Resolved