2018-10-22 19:27:52 +02:00
|
|
|
FactoryBot.define do
|
|
|
|
factory :geo_area do
|
2020-04-30 15:49:43 +02:00
|
|
|
trait :cadastre do
|
|
|
|
source { GeoArea.sources.fetch(:cadastre) }
|
|
|
|
numero { '42' }
|
|
|
|
feuille { 'A11' }
|
|
|
|
end
|
2018-10-23 15:40:39 +02:00
|
|
|
|
|
|
|
trait :quartier_prioritaire do
|
|
|
|
source { GeoArea.sources.fetch(:quartier_prioritaire) }
|
|
|
|
nom { 'XYZ' }
|
|
|
|
commune { 'Paris' }
|
|
|
|
end
|
2018-12-19 11:09:13 +01:00
|
|
|
|
|
|
|
trait :selection_utilisateur do
|
|
|
|
source { GeoArea.sources.fetch(:selection_utilisateur) }
|
|
|
|
end
|
2020-04-30 15:49:43 +02:00
|
|
|
|
|
|
|
trait :polygon do
|
|
|
|
geometry do
|
|
|
|
{
|
|
|
|
"type": "Polygon",
|
|
|
|
"coordinates": [
|
|
|
|
[
|
|
|
|
[2.428439855575562, 46.538476837725796],
|
|
|
|
[2.4284291267395024, 46.53842148758162],
|
|
|
|
[2.4282521009445195, 46.53841410755813],
|
|
|
|
[2.42824137210846, 46.53847314771794],
|
|
|
|
[2.428284287452698, 46.53847314771794],
|
|
|
|
[2.428364753723145, 46.538487907747864],
|
|
|
|
[2.4284291267395024, 46.538491597754714],
|
|
|
|
[2.428439855575562, 46.538476837725796]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
2020-05-05 10:26:13 +02:00
|
|
|
|
|
|
|
trait :line_string do
|
|
|
|
geometry do
|
|
|
|
{
|
|
|
|
"type": "LineString",
|
|
|
|
"coordinates": [
|
|
|
|
[2.4282521009445195, 46.53841410755813],
|
|
|
|
[2.42824137210846, 46.53847314771794],
|
|
|
|
[2.428284287452698, 46.53847314771794],
|
|
|
|
[2.4284291267395024, 46.538491597754714]
|
|
|
|
]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :point do
|
|
|
|
geometry do
|
|
|
|
{
|
|
|
|
"type": "Point",
|
|
|
|
"coordinates": [2.428439855575562, 46.538476837725796]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
2020-04-30 16:59:38 +02:00
|
|
|
|
|
|
|
trait :multi_polygon do
|
|
|
|
geometry do
|
|
|
|
{
|
|
|
|
"type": "MultiPolygon",
|
|
|
|
"coordinates": [
|
|
|
|
[
|
|
|
|
[
|
|
|
|
[2.428439855575562, 46.538476837725796],
|
|
|
|
[2.4284291267395024, 46.53842148758162],
|
|
|
|
[2.4282521009445195, 46.53841410755813],
|
|
|
|
[2.42824137210846, 46.53847314771794],
|
|
|
|
[2.428284287452698, 46.53847314771794],
|
|
|
|
[2.428364753723145, 46.538487907747864],
|
|
|
|
[2.4284291267395024, 46.538491597754714],
|
|
|
|
[2.428439855575562, 46.538476837725796]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
2018-10-22 19:27:52 +02:00
|
|
|
end
|
|
|
|
end
|