demarches-normaliennes/app/services/geojson_service.rb

18 lines
292 B
Ruby
Raw Normal View History

2015-11-23 18:41:48 +01:00
class GeojsonService
def self.to_json_polygon_for_cadastre(coordinates)
polygon = {
2018-01-15 18:54:57 +01:00
geom: {
type: "Feature",
geometry: {
type: "Polygon",
coordinates: [
coordinates
]
}
2018-01-15 18:54:57 +01:00
}
}
polygon.to_json
end
2017-04-04 15:27:04 +02:00
end