Both of these polygons have the same shape and are in the same location. The length of the coordinates is also the same. The only difference is the order of the coordinates.
A:
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[1, 3], [3, 3], [3, 1], [3, -3], [-3, -3], [-3, 3], [1, 3]
]
]
}
}
B:
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[-3, -3], [-3, 3], [1, 3], [3, 3], [3, 1], [3, -3], [-3, -3]
]
]
}
}
cleanCoords() drops [3,1] from A, whereas it does [1,3] and [3,1] from B. Therefore, the lengths of the coordinates are different and the result of booleanEqual is false. In polygon A, [1,3] is at the starting point, so it seems to make that difference.
Both of these polygons have the same shape and are in the same location. The length of the coordinates is also the same. The only difference is the order of the coordinates.
A:
{ "type": "Feature", "properties": {}, "geometry": { "type": "Polygon", "coordinates": [ [ [1, 3], [3, 3], [3, 1], [3, -3], [-3, -3], [-3, 3], [1, 3] ] ] } }B:
{ "type": "Feature", "properties": {}, "geometry": { "type": "Polygon", "coordinates": [ [ [-3, -3], [-3, 3], [1, 3], [3, 3], [3, 1], [3, -3], [-3, -3] ] ] } }cleanCoords() drops [3,1] from A, whereas it does [1,3] and [3,1] from B. Therefore, the lengths of the coordinates are different and the result of booleanEqual is false. In polygon A, [1,3] is at the starting point, so it seems to make that difference.