Geoshape orientation right-hand-rule for indexation


(Jean-Nick) #1

I am having problem with indexing geoshape polygon data some of my polygon don't want to index.

From what I understant from this article :
http://mapster.me/right-hand-rule-geojson-fixer/

In 2016, the geoJSON specification became more strict and many old geoJSONs will not work in new tools like Mapbox, or throw errors. GeoJSONLint has not updated and many of its polygons are broken. It’s important to “rewind" your geoJSONs so that they fit with this more tight format.

So I check and effectivly my polygon is of the wrong orientation, but if instead of 539 points, I reduce it to 200, now the polygon index with success.

What I would like to know is ES have a policy of indexation that for polygon that get more complex, more then 200 points, it needs to align with the specs for successfull indexation?

Thanks!


(David Turner) #2

No, there is no such rule. However if you're simplifying your polygon by removing points then you may also be correcting it, perhaps by removing a self-intersection. If you share the shape here we should be able to tell you more precisely what's happening.


(Jean-Nick) #3

Ok then is there a limit of points in a geoshape?

The shape has 539 points... it's hard to paste here....


(Jean-Nick) #4

I have uploaded it to a free web upload : https://ufile.io/ukbzn just wait to be able to download

Thanks for the help


(Jean-Nick) #5

I found the point that seems to be the problem it is at the end, if I remove it the polygon indexed with success :

[
-73.778511047363281,
45.635768890380859
],
[
-73.778511047363281,
45.635784149169922
],
[
-73.778511047363281,
45.635780334472656
],
[
-73.778114318847656,
45.634162902832031
],
[
-73.777969360351562,
45.633560180664062
],
[
-73.777618408203125,
45.632122039794922
],
[
-73.777236938476562,
45.630710601806641
],
[
-73.7771987915039,
45.630577087402344
],
[
-73.77716064453125,
45.630416870117188
]


(Jean-Nick) #6

Looking at my points, I figured that I can delete either one of the three and the indexation passed. Since the 3 of them are on the same longitude and very close on latitude is there a rule for that on the creation of a geoshape???

[
-73.778511047363281,
45.635768890380859
] ,
[
-73.778511047363281,
45.635784149169922
],
[
-73.778511047363281,
45.635780334472656
],


(David Turner) #7

No, there's no rule like this. But there is a rule against self-intersecting shapes, and this sequence of three points is self-intersecting: they're all on the same longitude and the third point's latitude is between the other two, so the boundary of your shape goes back on itself.


(system) closed #8

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.