Exemplo n.º 1
0
// 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)
}
Exemplo n.º 2
0
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)
}
Exemplo n.º 3
0
func EncodeFeatureCollection(features []*geojson.Feature) *geojson.FeatureCollection {
	return geojson.NewFeatureCollection(features)
}