[
https://issues.apache.org/jira/browse/LUCENE-5395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13870449#comment-13870449
]
David Smiley commented on LUCENE-5395:
--------------------------------------
Spatial4j deprecated shape string formats other than WKT, leaving such things
(like "lat,lon" and a couple other formats) for clients to do in any way they
want. The non-WKT parser is now in LegacyShapeReadWriterFormat. I'd like to
roll this change on through Lucene-spatial. So a Lucene-spatial user that
wants to parse a "lat,lon" format or whatever has to handle this themselves.
It's easy; I've updated the example demo test accordingly. They can still call
ctx.readString(str) to get the legacy behavior, but I'm going to modify
SpatialArgsParser to not use it; just WKT. SpatialArgsParser is what parses
strings like "Intersects(SHAPE_FORMAT) distErrPct=0.025". I'll make it easy to
subclass the parser for a client to parse other formats.
On the Solr subclass of SpatialArgsParser, I'll use LegacyShapeReadWriterFormat
in the 4x branch for back-compat, but on trunk I want to only support "lat,
lon" and "x y" (and WKT of course) -- *no more "Circle(x y d=mydist)" and no
more "xMin, xMax, yMin, yMax"*. People using these should use \{!geofilt\}
when possible. The WKT (as implemented in Spatial4j) equivalents to the 2
deprecated formats are "BUFFER(POINT(X Y), MYDIST)" and "ENVELOPE(xMin, xMax,
yMax, yMin)" respectively. Note the quirky arg order for ENVELOPE (blame OGC's
spec for that one).
If anyone has input on preferences as to which layer (Lucene/Solr) at which
version (trunk/4x) should support what syntax then please share -- otherwise
I'll go with the plan above. I'm almost done with the patch.
> Upgrade Spatial4j to 0.4
> ------------------------
>
> Key: LUCENE-5395
> URL: https://issues.apache.org/jira/browse/LUCENE-5395
> Project: Lucene - Core
> Issue Type: Improvement
> Components: modules/spatial
> Reporter: David Smiley
> Assignee: David Smiley
> Fix For: 4.7
>
>
> Spatial4j 0.4 should be released the week of January 13th; a snapshot is
> published. A longer version of the delta from 0.4 is in
> [CHANGES.md|https://github.com/spatial4j/spatial4j/blob/master/CHANGES.md]
> A couple notable new features are:
> * Built-in WKT parser without relying on JTS. The older shape string format
> is deprecated.
> * A binary shape codec for reading & writing the shapes to a byte-stream in a
> reasonably compact manner.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]