paulsmith / gogeos

Go library for spatial data operations and geometric algorithms (Go bindings for GEOS)
http://paulsmith.github.io/gogeos/
MIT License
280 stars 79 forks source link

WKT precision encode error #28

Open gPenzotti opened 4 years ago

gPenzotti commented 4 years ago

While creating new polygon using wkt, the results (error free) change the precision and the value of the points.

polygon, err := geos.FromWKT("POLYGON ((11.1 44.1, 12 45, 13 46, 11.1 44.1))")
fmt.Println(polygon)

the result is:

POLYGON ((11.0999999999999996 44.1000000000000014, 12.0000000000000000 45.0000000000000000, 13.0000000000000000 46.0000000000000000, 11.0999999999999996 44.1000000000000014))

The points are different