normalize polygons
parent
a64ed7306c
commit
0e3e917c69
|
@ -157,6 +157,11 @@ func (this *GEOS) Polygon(exterior *Geom, interiors []*Geom) *Geom {
|
|||
if geom == nil {
|
||||
return nil
|
||||
}
|
||||
err := C.GEOSNormalize_r(this.v, geom)
|
||||
if err != 0 {
|
||||
C.GEOSGeom_destroy(geom)
|
||||
return nil
|
||||
}
|
||||
return &Geom{geom}
|
||||
}
|
||||
|
||||
|
@ -168,6 +173,11 @@ func (this *GEOS) Polygon(exterior *Geom, interiors []*Geom) *Geom {
|
|||
if geom == nil {
|
||||
return nil
|
||||
}
|
||||
err := C.GEOSNormalize_r(this.v, geom)
|
||||
if err != 0 {
|
||||
C.GEOSGeom_destroy(geom)
|
||||
return nil
|
||||
}
|
||||
return &Geom{geom}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue