peterstace / simplefeatures

Simple Features is a pure Go Implementation of the OpenGIS Simple Feature Access Specification
MIT License
134 stars 19 forks source link

Coordinate type not retained for simplified empty geometries #587

Closed peterstace closed 6 months ago

peterstace commented 10 months ago

E.g. https://go.dev/play/p/ESSvqvTFVlV

package main

import (
    "fmt"

    "github.com/peterstace/simplefeatures/geom"
)

func main() {
    p := geom.Polygon{}.ForceCoordinatesType(geom.DimXYM)
    p, err := p.Simplify(0.1)
    if err != nil {
        panic(err)
    }
    fmt.Println(p.CoordinatesType())
}
XY

Program exited.