peterstace / simplefeatures

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

Coordinate type not retained for simplified empty geometries #587

Closed peterstace closed 1 month ago

peterstace commented 5 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.