func (idx *Index) WOFPolygonToPolyclip(p *geo.Polygon) (*polyclip.Polygon, error) { poly := new(polyclip.Polygon) contour := new(polyclip.Contour) for _, _pt := range p.Points() { pt := polyclip.Point{ X: _pt.Lng(), Y: _pt.Lat(), } contour.Add(pt) } poly.Add(*contour) return poly, nil }