Skip to content
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

[BUG] Unable to Tessellate shape when shape is valid #17356

Closed
chris-vroegop-lloyds opened this issue Feb 13, 2025 · 1 comment
Closed

[BUG] Unable to Tessellate shape when shape is valid #17356

chris-vroegop-lloyds opened this issue Feb 13, 2025 · 1 comment
Labels
bug Something isn't working Indexing Indexing, Bulk Indexing and anything related to indexing untriaged

Comments

@chris-vroegop-lloyds
Copy link

Describe the bug

The following shape:

Image

produces an error when attempting to POST this into an index.

Related component

Indexing

To Reproduce

  1. Start fresh instance with Docker:
docker run --rm -p 9200:9200 -e 'DISABLE_SECURITY_PLUGIN=true' -e "discovery.type=single-node" opensearchproject/opensearch:2.19.0
  1. Create an index:
PUT /geoscratch
{
  "mappings": {
    "properties": {
      "id": {
        "type": "keyword"
      },
      "placeShape": {
        "type": "geo_shape"
      }
    }
  }
}
  1. Insert into that index
POST /geoscratch/_doc/1
{ 
  "id": "output_scale2",
  "placeShape": { "type": "MultiPolygon", "coordinates": [ [ [ [ -174, -79 ], [ -179, -79 ], [ -49, -59 ], [ -54, -74 ], [ 14, -67 ], [ 14, -69 ], [ -56, -75 ], [ -52, -60 ], [ -174, -79 ] ] ] ] } 
}
  1. Result is:
{
    "error": {
        "root_cause": [
            {
                "type": "mapper_parsing_exception",
                "reason": "failed to parse field [placeShape] of type [geo_shape]"
            }
        ],
        "type": "mapper_parsing_exception",
        "reason": "failed to parse field [placeShape] of type [geo_shape]",
        "caused_by": {
            "type": "illegal_argument_exception",
            "reason": "Unable to Tessellate shape. Possible malformed shape detected."
        }
    },
    "status": 400
}

Expected behavior

Shape inserted correctly.

Additional Details

Plugins
None, security plugin disabled for development purposes.

Host/Environment (please complete the following information):

  • OS: Docker Desktop 4.37.1 running on Windows 11
  • Version: 2.19.0 (official Docker image)

Additional context
This issue manifested with a much larger, more complex shapefile. This is the most minimal version I could create that displays the same behaviour.

@chris-vroegop-lloyds chris-vroegop-lloyds added bug Something isn't working untriaged labels Feb 13, 2025
@github-actions github-actions bot added the Indexing Indexing, Bulk Indexing and anything related to indexing label Feb 13, 2025
@chris-vroegop-lloyds
Copy link
Author

Apologies, it appears that this error message comes up when GeoJSON doesn't follow the right-hand rule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Indexing Indexing, Bulk Indexing and anything related to indexing untriaged
Projects
None yet
Development

No branches or pull requests

1 participant