Thank you very much for your work on this library.
I am trying to get the center of many different geometry types. I wanted to check if there is a function for this already implemented. And if not, if it would be reasonable enhancement. Depending on timeline I could probably look at contributing this upstream. I would probably start with prioritizing geom.Polygon since that is most important to my use case
This is the sort of thing I am looking to accomplish
geometry, err := wktEncoder.DecodeString(wkt)
if err != nil {
return "", err
}
switch geometry.(type) {
case geom.Point:
point := geometry.(*geom.Point)
return foo(point.X(), point.Y())
case geom.Polygon:
polygon := geometry.(*geom.Polygon)
// ??
center :=
return foo(center.X(), center.Y())
// so on and so forth for others
}
Thank you very much for your work on this library.
I am trying to get the center of many different geometry types. I wanted to check if there is a function for this already implemented. And if not, if it would be reasonable enhancement. Depending on timeline I could probably look at contributing this upstream. I would probably start with prioritizing
geom.Polygonsince that is most important to my use caseThis is the sort of thing I am looking to accomplish