// NewSFPolygonXYZ constructs and returns a new SFPolygon object with longitude,
// latitude, and altitude components initialized with the given external and
// (optionally) internal shapes.
NewSFPolygonXYZ constructs and returns a new SFPolygon object with longitude,
latitude, and altitude components initialized with the given external and
(optionally) internal shapes.
// NewSFPolygonXYZ constructs and returns a new SFPolygon object with longitude // latitude and altitude components initialized with the given external and // ( optionally ) internal shapes .
func NewSFPolygonXYZ(external [][3]float64, internals ...[][3]float64) SFPolygon {
	l := len(internals) + 1
	polys := make([][]geom.Coord, l)
	polys[0] = make([]geom.Coord, len(external))
	for i := range external {
		polys[0][i] = append(geom.Coord(nil), external[i][:]...)
	}
	for j, internal := range internals {
		polys[j+1] = make([]geom.Coord, len(internal))
		for i := range internal {
			polys[j+1][i] = append(geom.Coord(nil), internal[i][:]...)
		}
	}
	p, err := geom.NewPolygon(geom.XYZ).SetCoords(polys)
	if err != nil {
		panic(err)
	}
	return SFPolygon{*p}
}
func NewSFPolygonXYZ ( external [ ] [ 3 ] float64 , internals ... [ ] [ 3 ] float64 ) SFPolygon { l := len ( internals ) + 1 polys := make ( [ ] [ ] geom . Coord , l ) polys [ 0 ] = make ( [ ] geom . Coord , len ( external ) ) for i := range external { polys [ 0 ] [ i ] = append ( geom . Coord ( nil ) , external [ i ] [ : ] ... ) } for j , internal := range internals { polys [ j + 1 ] = make ( [ ] geom . Coord , len ( internal ) ) for i := range internal { polys [ j + 1 ] [ i ] = append ( geom . Coord ( nil ) , internal [ i ] [ : ] ... ) } } p , err := geom . NewPolygon ( geom . XYZ ) . SetCoords ( polys ) if err != nil { panic ( err ) } return SFPolygon { * p } }
NewSFPolygonXYZ constructs and returns a new SFPolygon object with longitude,
latitude, and altitude components initialized with the given external and
(optionally) internal shapes.
NewSFPolygonXYZ constructs and returns a new SFPolygon object with longitude latitude and altitude components initialized with the given external and ( optionally ) internal shapes .