[
https://issues.apache.org/jira/browse/LUCENE-6699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14682439#comment-14682439
]
Karl Wright commented on LUCENE-6699:
-------------------------------------
Ok, for a start -- the way you get X, Y, and Z ranges for a given planet model
is via PlanetModel.getMinimumX(), getMaximumX(), getMinimumY(), getMaximumY(),
getMinimumZ(), getMaximumZ(). The GeoShape interface does not provide a means
of obtaining the PlanetModel, so you will need to pass this in to your
constructor in addition to what you currently have.
Second, the following code:
{code}
+ double x =
BKD3DTreeDocValuesFormat.decodeValue(BKD3DTreeDocValuesFormat.readInt(bytes.bytes,
bytes.offset));
+ double y =
BKD3DTreeDocValuesFormat.decodeValue(BKD3DTreeDocValuesFormat.readInt(bytes.bytes,
bytes.offset+4));
+ double z =
BKD3DTreeDocValuesFormat.decodeValue(BKD3DTreeDocValuesFormat.readInt(bytes.bytes,
bytes.offset+8));
+ //return
GeoUtils.pointInPolygon(polyLons, polyLats, lat, lon);
+ // nocommit fixme!
+ return true;
{code}
... should call GeoShape.isWithin(x,y,z) to determine membership within the
shape.
Finally,
{code}
+ public BKD3DTreeReader.Relation
compare(int xMin, int xMax, int yMin, int yMax, int zMin, int zMax) {
+ // nocommit fixme!
+ return
BKD3DTreeReader.Relation.INSIDE;
+ }
{code}
... should do the following:
{code}
GeoArea xyzSolid = new XYZSolid(planetModel, xMin, xMax, yMin, yMax, zMin,
zMax);
return xyzSolid.getRelationship(geoShape) == GeoArea.<WHATEVER>?xxx:yyy
{code}
> Integrate lat/lon BKD and spatial3d
> -----------------------------------
>
> Key: LUCENE-6699
> URL: https://issues.apache.org/jira/browse/LUCENE-6699
> Project: Lucene - Core
> Issue Type: New Feature
> Reporter: Michael McCandless
> Assignee: Michael McCandless
> Attachments: Geo3DPacking.java, LUCENE-6699.patch, LUCENE-6699.patch,
> LUCENE-6699.patch
>
>
> I'm opening this for discussion, because I'm not yet sure how to do
> this integration, because of my ignorance about spatial in general and
> spatial3d in particular :)
> Our BKD tree impl is very fast at doing lat/lon shape intersection
> (bbox, polygon, soon distance: LUCENE-6698) against previously indexed
> points.
> I think to integrate with spatial3d, we would first need to record
> lat/lon/z into doc values. Somewhere I saw discussion about how we
> could stuff all 3 into a single long value with acceptable precision
> loss? Or, we could use BinaryDocValues? We need all 3 dims available
> to do the fast per-hit query time filtering.
> But, second: what do we index into the BKD tree? Can we "just" index
> earth surface lat/lon, and then at query time is spatial3d able to
> give me an enclosing "surface lat/lon" bbox for a 3d shape? Or
> ... must we index all 3 dimensions into the BKD tree (seems like this
> could be somewhat wasteful)?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]