[
https://issues.apache.org/jira/browse/LUCENE-7153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15220697#comment-15220697
]
David Smiley commented on LUCENE-7153:
--------------------------------------
There has been some great leaps and bounds in spatial recently and that's
*awesome* (thanks to Karl, Nick, and Mike) but I don't understand the desire
for lucene core to have spatial stuff. _Sigh_ So what if {{spatial3d}} might
depend on {{spatial}}; it'd kind of obvious to me it would (or the other way
around) given that there is now a general Polygon abstraction that the Geo3D
impl wants to use. Heck, maybe {{spatial}} should be renamed {{spatial-core}}
though I think {{spatial}} is just fine. Just because there is some
Euclidean/Cartesian (2D) math in {{spatial}} shouldn't imply that anything that
depends on this module uses it. The {{highlighter}} module has 3 highlighters
(and they work quite differently); the {{suggester}} module has a bunch of
those, etc. The {{join}} module... you get the idea. I think that's the
main take-away from my perspective. Likewise, this could be said for the
{{spatial3d}} module to an outsider. Should someone want to use the cool/novel
surface-of-sphere (or ellipsoid) math that is _so_ hard to come by out there,
they need not use the 2% of the code that uses both the 3D math & Lucene.
I think it's kinda crazy to fork Polygon and whatever else out of the
{{spatial}} module into some other spatial module; surely that is the least
favorable option above any sort of dependency. {{spatial}} is our core/main
spatial module. Just add a dependency on it. Would it be easier for you to
consider the idea that {{spatial}} might depend on {{spatial3d}} instead? Then
the very small part of {{spatial3d}} could go to {{spatial}}, and {{spatial3d}}
would be pure math and dependency-less -- I would like that quite a bit. What
do you think? The only thing I wouldn't like so much is what it says about the
move of {{spatial-extras}} to where it is... it says {{spatial}} can have a
dependency now too, but maybe {{spatial3d}} is an exception/okay. I'm good
with it.
> give GeoPoint and LatLonPoint full polygon support
> --------------------------------------------------
>
> Key: LUCENE-7153
> URL: https://issues.apache.org/jira/browse/LUCENE-7153
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Robert Muir
> Attachments: LUCENE-7153.patch, LUCENE-7153.patch, LUCENE-7153.patch
>
>
> These two geo impls have a very limited polygon support that does not support
> inner rings (holes) or multiple outer rings efficiently.
> Basically if you want to do this, you are left building crazy logic with
> booleanquery which will send memory into the gigabytes for a single query,
> needlessly.
> For example Russia polygon from geonames is 250KB of geojson and over a
> thousand outer rings.
> We should instead support this stuff with the queries themselves, especially
> it will allow us to implement things more efficiently in the future.
> I think instead of {{newPolygonQuery(double[], double[])}} it should look
> like {{newPolygonQuery(Polygon...)}}. A polygon can be a single outer ring
> (shape) with 0 or more inner rings (holes). No nesting, you just use multiply
> polygons if you e.g. have an island.
> See http://esri.github.io/geometry-api-java/doc/Polygon.html for visuals and
> examples. I indented their GeoJSON example:
> {noformat}
> {
> "type":"MultiPolygon",
> "coordinates": [
> // first polygon (order does not matter could have been last instead)
> [
> // clockwise => outer ring
>
> [[0.0,0.0],[-0.5,0.5],[0.0,1.0],[0.5,1.0],[1.0,0.5],[0.5,0.0],[0.0,0.0]],
> // hole
>
> [[0.5,0.2],[0.6,0.5],[0.2,0.9],[-0.2,0.5],[0.1,0.2],[0.2,0.3],[0.5,0.2]]
> ],
> // second polygon (order does not matter, could have been first instead)
> [
> // island
> [[0.1,0.7],[0.3,0.7],[0.3,0.4],[0.1,0.4],[0.1,0.7]]
> ]
> ],
> }
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]