2018-12-10 11:31:07 +01:00
|
|
|
class ApiCartoService
|
2018-03-20 17:47:37 +01:00
|
|
|
def self.generate_qp(coordinates)
|
2018-10-15 16:07:15 +02:00
|
|
|
coordinates.flat_map do |coordinate|
|
2018-10-15 17:16:55 +02:00
|
|
|
ApiCarto::QuartiersPrioritairesAdapter.new(
|
2018-01-15 19:29:44 +01:00
|
|
|
coordinate.map { |element| [element['lng'], element['lat']] }
|
2018-10-15 16:25:16 +02:00
|
|
|
).results
|
2018-10-15 16:07:15 +02:00
|
|
|
end
|
2016-01-27 15:48:27 +01:00
|
|
|
end
|
|
|
|
|
2018-03-20 17:47:37 +01:00
|
|
|
def self.generate_cadastre(coordinates)
|
2018-01-15 21:33:29 +01:00
|
|
|
coordinates.flat_map do |coordinate|
|
2018-10-15 17:15:42 +02:00
|
|
|
ApiCarto::CadastreAdapter.new(
|
2018-01-15 19:29:44 +01:00
|
|
|
coordinate.map { |element| [element['lng'], element['lat']] }
|
2018-10-15 16:25:16 +02:00
|
|
|
).results
|
2018-01-15 21:33:29 +01:00
|
|
|
end
|
2016-01-27 15:48:27 +01:00
|
|
|
end
|
2018-10-23 15:37:13 +02:00
|
|
|
|
|
|
|
def self.generate_rpg(coordinates)
|
|
|
|
coordinates.flat_map do |coordinate|
|
|
|
|
ApiGeo::RPGAdapter.new(
|
|
|
|
coordinate.map { |element| [element['lng'], element['lat']] }
|
|
|
|
).results
|
|
|
|
end
|
|
|
|
end
|
2016-01-27 15:48:27 +01:00
|
|
|
end
|