Skip to content

[mapper_parsing_exception] Provided shape has duplicate consecutive coordinates at #45506

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

Closed
bartvastgoed opened this issue Aug 13, 2019 · 3 comments
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes >bug

Comments

@bartvastgoed
Copy link

bartvastgoed commented Aug 13, 2019

Elasticsearch version (bin/elasticsearch --version):
5.6.11
Plugins installed: []

JVM version (java -version):
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1ubuntu1~16.04.1-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)

OS version (uname -a if on a Unix-like system):
Linux myserver 4.4.0-131-generic #157-Ubuntu SMP Thu Jul 12 15:51:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Description of the problem including expected versus actual behavior:
During my bulk inserts I noticed i couldn't insert some of my document with certain coordinates.
Expected; being able to insert said document with said coordinates.

Steps to reproduce:

  1. the mapping:
'contour' => [
        'type' => 'geo_shape',
        'tree' => 'quadtree',
        'precision' => '50cm',
    ]

  1. try to add a document with the following coordinates:
[[[6.1741779921149,52.900830177646],[6.174375274915,52.900583123989],[6.1745312119037,52.900628656014],[6.174361093674,52.900841695524],[6.1744087549395,52.900855607275],[6.1744473131991,52.900807318579],[6.17464348691,52.900864600397],[6.1746135473049,52.900902093087],[6.174662463802,52.900916373901],[6.1748558926934,52.90067413483],[6.1750103363593,52.900719226747],[6.1747977526217,52.900985452388],[6.1746863379868,52.900952918431],[6.1746759024879,52.90096597319],[6.1745823573715,52.900938659391],[6.1745109963801,52.901028036419],[6.1744516062146,52.901010697223],[6.1744016532655,52.901073260193],[6.1742895066468,52.901040515012],[6.1743392998204,52.900978150851],[6.1743161712153,52.900971392538],[6.1743592207397,52.900917484473],[6.1743692909645,52.900920428633],[6.174389827298,52.900894707808],[6.1743799963032,52.900891842952],[6.1743907949551,52.900878318512],[6.1743446875809,52.900864863819],[6.1743327988597,52.90087975245],[6.1741751578564,52.900833719154],[6.1741779921149,52.900830177646],[6.1741779921149,52.900830177646]]]
  1. error.

Provide logs (if relevant):
Output of my terminal during the bulk insert:

 [_index] => my_index_1
            [_type] => my_index_1
            [_id] => 12312313
            [status] => 400
            [error] => Array
                (
                    [type] => mapper_parsing_exception
                    [reason] => failed to parse [contour]
                    [caused_by] => Array
                        (
                            [type] => invalid_shape_exception
                            [reason] => Provided shape has duplicate consecutive coordinates at: (6.1741779921149,52.900830177646, NaN)
                        )

                )

Thanks in advance

@henningandersen henningandersen added the :Analytics/Geo Indexing, search aggregations of geo points and shapes label Aug 13, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo

@iverase
Copy link
Contributor

iverase commented Sep 4, 2019

I am going to reopen this issue as I think we want to support such a case.

@iverase
Copy link
Contributor

iverase commented Sep 25, 2019

We discuss it with the team and we decided that polygons containing zero length edges are actually invalid. We aim to provide a ingest processor to clean up / make valid incoming shapes.

@iverase iverase closed this as completed Sep 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes >bug
Projects
None yet
Development

No branches or pull requests

4 participants