Øystein Torget created SOLR-4879:
------------------------------------

             Summary: Indexing a field of type 
solr.SpatialRecursivePrefixTreeFieldType fails when at least two vertexes are 
more than 180 degrees apart
                 Key: SOLR-4879
                 URL: https://issues.apache.org/jira/browse/SOLR-4879
             Project: Solr
          Issue Type: Bug
         Environment: Linux, Solr 4.0.0, Solr 4.3.0
            Reporter: Øystein Torget


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" 
/>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to