You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2016/07/14 13:54:20 UTC

[jira] [Commented] (LUCENE-7380) Add Polygon.fromGeoJSON

    [ https://issues.apache.org/jira/browse/LUCENE-7380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15376952#comment-15376952 ] 

Robert Muir commented on LUCENE-7380:
-------------------------------------

I think we should advertise the method better at the top of the class? 

It makes the class way more usable: the ctor taking arrays of doubles might be useful for some generic framework like a server but its too hard (especially for more complicated cases like holes).

> Add Polygon.fromGeoJSON
> -----------------------
>
>                 Key: LUCENE-7380
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7380
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: master (7.0), 6.2
>
>         Attachments: LUCENE-7380.patch
>
>
> Working with {{Polygon}} is a bit tricky today because you typically
> must use an external dependency to convert e.g. a GeoJSON string into
> Lucene's Polygon class ... I think this is a weakness in our API, and
> it clearly confuses users: http://markmail.org/thread/mpge4wqo7cfqm4i5
> So I created a simplistic GeoJSON parser to extract a single Polygon
> or MultiPolygon from a GeoJSON string, without any dependencies.  The
> parser only handles the various ways that a single Polygon or
> MultiPolygon can appear in a GeoJSON string, and throws an exception
> otherwise.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org