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

area of flat polygon is not 0 #581

Closed
strk opened this issue Feb 28, 2022 · 1 comment
Closed

area of flat polygon is not 0 #581

strk opened this issue Feb 28, 2022 · 1 comment
Labels
Won't Fix Team will not fix this issue, see comments.

Comments

@strk
Copy link
Member

strk commented Feb 28, 2022

This may or may not be a bug, as a flat polygon is invalid, but at least for PostGIS the code implementing the signed area is documented (as comments in code) as expected to return 0, but it's not.
Code to check:

bin/geosop -area -a stdin --format txt <<EOF
POLYGON((                                   
  29.262792863298348 71.22115103790775,
  29.26598031986849  71.22202978558047,
  29.275379947735576 71.22044935739267,

  29.29461024331857  71.22741507590429,

  29.275379947735576 71.22044935739267,
  29.26598031986849  71.22202978558047,
  29.262792863298348 71.22115103790775
))
EOF

Outputs 1.69407e-21

@dr-jts
Copy link
Contributor

dr-jts commented Feb 28, 2022

That's Floating Point math for ya.

@dr-jts dr-jts added the Won't Fix Team will not fix this issue, see comments. label Feb 28, 2022
@pramsey pramsey closed this as completed May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Won't Fix Team will not fix this issue, see comments.
Projects
None yet
Development

No branches or pull requests

3 participants