Skip to content

Add support for geo_shape represented as Well-Known Text (WKT) (#3377) #3401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 14, 2018

Conversation

russcam
Copy link
Contributor

@russcam russcam commented Sep 12, 2018

Forward port of #3377 to master

(cherry picked from commit f31b087)

Includes line ending sensitive unit test from 0d0afdb

Closes #3395

* Add support for well known text (wkt) to geo bounding box queries
* Move geo_shape queries into Tests project

This commit moves the geo_shape queries into the Test project.
Missed in the Tests refactoring

* Add support for Z values to GeoCoordinate
* Add support for WKT geo shapes

This commit adds support for Well-Known Text (WKT) representations
of geo_shape. The extent of the implementation is only as far as is
required by the WKT support in Elasticsearch.

Deserialize from WKT to IGeoShape types. The format from which
the shape is deserialized is assigned to an internal format property
on the concrete implementations of GeoShape as the intention is
not to expose this as a property on the IGeoShape interface. The format
is assigned to the instance so that the IGeoShape instance is
serialized to the same format if indexed again.

GeoWKTReader is a simple tokenizer implementation
for the purposes of parsing only WKT concepts that are supported
by Elasticsearch.

GeoShapeConverter now implements WriteJson because the
original format of IGeoShape now needs to be taken into account
when serializing.

Add tests for roundtrip serialization of WKT.

Closes #3256

(cherry picked from commit f31b087)

Includes line ending sensitive unit test from 0d0afdb
@russcam russcam requested a review from Mpdreamz September 12, 2018 09:03
@Mpdreamz
Copy link
Member

Thank you @russcam 👍

@Mpdreamz Mpdreamz merged commit 9201256 into master Sep 14, 2018
@Mpdreamz Mpdreamz deleted the feature/master-wkt-port branch September 14, 2018 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants