demarches-normaliennes/app/services/geojson_service.rb
2020-04-15 18:07:09 +02:00

17 lines
292 B
Ruby

class GeojsonService
def self.to_json_polygon_for_cadastre(coordinates)
polygon = {
geom: {
type: "Feature",
geometry: {
type: "Polygon",
coordinates: [
coordinates
]
}
}
}
polygon.to_json
end
end