paulmach / orb

Types and utilities for working with 2d geometry in Golang
MIT License
886 stars 103 forks source link

Invalid MULTIPOLYGON no longer gives an error #130

Closed gellyfisher closed 1 year ago

gellyfisher commented 1 year ago

I would expect to get an error in the following MULTIPOLYGON because there is no closing bracket at the end. However since 0.9.1 this doesn't happen anymore. Is this intended ?

package main

import (
    "fmt"

    "github.com/paulmach/orb/encoding/wkt"
)

func main() {
    ret := "MULTIPOLYGON(((0 1,3 0,4 3,0 4,0 1)), ((3 4,6 3,5 5,3 4)), ((0 0,-1 -2,-3 -2,-2 -1,0 0))"
    _, err := wkt.UnmarshalMultiPolygon(ret)
    fmt.Printf("error: %s", err)
}
paulmach commented 1 year ago

fixed in https://github.com/paulmach/orb/pull/131

gellyfisher commented 1 year ago

Thanks for the quick resolution!