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

Двойное повторение последней точки #85

Closed
botanegg opened this issue Jul 20, 2024 · 2 comments · Fixed by #86
Closed

Двойное повторение последней точки #85

botanegg opened this issue Jul 20, 2024 · 2 comments · Fixed by #86

Comments

@botanegg
Copy link
Contributor

botanegg commented Jul 20, 2024

Пример 50:33:0010409:1118

[[37.814402900972084, 55.055095840428116], [37.81415970905837, 55.055229333666595], [37.81374763387124, 55.05507842823376], [37.813754389202174, 55.05486077516536], [37.814402900972084, 55.055095840428116], [37.814402900972084, 55.055095840428116]]
[37.814402900972084, 55.055095840428116], [37.814402900972084, 55.055095840428116]

видно что последняя (замыкающая geojson) и предпоследняя точка одинаковы
изза этого софт может говорить о самопересечении
может быть стоит вырезать дублирующиеся подряд точки?

@botanegg
Copy link
Contributor Author

может быть

xy.append(xy[0])

тут строчка стала лишней?
предлагаю добавить if xy[-1] != xy[0]:

@botanegg
Copy link
Contributor Author

Проверил предложение выше - работает в моем случае
Готовлю PR :)

botanegg added a commit to botanegg/rosreestr2coord that referenced this issue Jul 20, 2024
botanegg added a commit to botanegg/rosreestr2coord that referenced this issue Jul 20, 2024
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 a pull request may close this issue.

1 participant