mirror of https://github.com/tidwall/tile38.git
14 lines
323 B
Go
14 lines
323 B
Go
package clip
|
|
|
|
import "github.com/tidwall/geojson"
|
|
|
|
func clipFeature(
|
|
feature *geojson.Feature, clipper geojson.Object,
|
|
) geojson.Object {
|
|
newFeature := Clip(feature.Base(), clipper)
|
|
if _, ok := newFeature.(*geojson.Feature); !ok {
|
|
newFeature = geojson.NewFeature(newFeature, feature.Members())
|
|
}
|
|
return newFeature
|
|
}
|