[
https://issues.apache.org/jira/browse/SOLR-4879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13673885#comment-13673885
]
David Smiley commented on SOLR-4879:
------------------------------------
>From the wiki:
bq. WKT shapes must have each vertex less than 180 degrees in longitude
difference than the vertex before it, or else it will be confused as going the
wrong way around the globe. The only exception to this is a Polygon
representing a rectangle.
So... the wiki does in fact claim the vertices need to be < 180 degrees apart.
But I can see that you may have been confused from later statements about
rectangles in WKT. FYI in Spatial4j's next release, even rectangles will be
bound by the <180 rule and you then needn't bother ensuring that the vertex
order is counter-clockwise -- it won't matter.
> 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]