// FeatureCollectionNodes returns a *geojson.FeatureCollection type // from the given nodes, in order. func FeatureCollectionNodes(nodes []*Node) *geojson.FeatureCollection { features := make([]*geojson.Feature, len(nodes)) for i, n := range nodes { features[i] = n.Feature() } return geojson.NewFeatureCollection(features) }
func SpacesToFeatureCollection(spaces []Space) *geojson.FeatureCollection { features := make([]*geojson.Feature, len(spaces)) for i, _ := range spaces { features[i] = SpaceToFeature(spaces[i]) } return geojson.NewFeatureCollection(features) }
func EncodeFeatureCollection(features []*geojson.Feature) *geojson.FeatureCollection { return geojson.NewFeatureCollection(features) }