diff --git a/app/Helpers/TerrafundDashboardQueryHelper.php b/app/Helpers/TerrafundDashboardQueryHelper.php new file mode 100644 index 000000000..f6a4b8745 --- /dev/null +++ b/app/Helpers/TerrafundDashboardQueryHelper.php @@ -0,0 +1,60 @@ +whereHas('organisation', function ($query) { + $query->whereIn('type', ['for-profit-organization', 'non-profit-organization']); + }); + if ($request->has('country')) { + $country = $request->input('country'); + $query = $query->where('country', $country); + } elseif ($request->has('uuid')) { + $projectId = $request->input('uuid'); + $query = $query->where('v2_projects.uuid', $projectId); + } + + return $query; + } + + public static function getPolygonIdsOfProject($request) + { + $projectIds = TerrafundDashboardQueryHelper::buildQueryFromRequest($request) + ->pluck('uuid'); + $polygonsIds = SitePolygon::whereHas('site.project', function ($query) use ($projectIds) { + $query->whereIn('uuid', $projectIds); + })->pluck('poly_id'); + + return $polygonsIds; + } + + public static function getPolygonsByStatusOfProject($request) + { + $projectIds = TerrafundDashboardQueryHelper::buildQueryFromRequest($request) + ->pluck('uuid'); + + $statuses = ['Needs More Info', 'Submitted', 'Approved']; + + $polygons = []; + + foreach ($statuses as $status) { + // Get polygons of the project filtered by status + $polygonsOfProject = SitePolygon::whereHas('site.project', function ($query) use ($projectIds) { + $query->whereIn('uuid', $projectIds); + }) + ->where('status', $status) + ->pluck('poly_id'); + + $polygons[$status] = $polygonsOfProject; + } + + return $polygons; + } +} diff --git a/app/Http/Controllers/V2/Dashboard/GetJobsCreatedController.php b/app/Http/Controllers/V2/Dashboard/GetJobsCreatedController.php new file mode 100644 index 000000000..0eba73489 --- /dev/null +++ b/app/Http/Controllers/V2/Dashboard/GetJobsCreatedController.php @@ -0,0 +1,115 @@ +join('organisations', 'v2_projects.organisation_id', '=', 'organisations.id') + ->select('v2_projects.id', 'organisations.type') + ->get(); + + $forProfitProjectIds = $this->filterProjectIdsByType($rawProjectIds, 'for-profit-organization'); + $nonProfitProjectIds = $this->filterProjectIdsByType($rawProjectIds, 'non-profit-organization'); + $allProjectIds = $this->getAllProjectIds($rawProjectIds); + + $forProfitJobsCreated = $this->getTotalJobsCreated($forProfitProjectIds); + $nonProfitJobsCreated = $this->getTotalJobsCreated($nonProfitProjectIds); + $totalJobsCreated = $this->getTotalJobsCreated($allProjectIds); + $jobsCreatedDetailed = $this->getJobsCreatedDetailed($allProjectIds); + + $finalResult = (object) [ + 'totalJobsCreated' => $totalJobsCreated, + 'forProfitJobsCreated' => $forProfitJobsCreated, + 'nonProfitJobsCreated' => $nonProfitJobsCreated, + 'total_ft' => $jobsCreatedDetailed->total_ft, + 'total_pt' => $jobsCreatedDetailed->total_pt, + 'total_men' => $this->calculateTotalMen($jobsCreatedDetailed), + 'total_pt_men' => $jobsCreatedDetailed->total_pt_men, + 'total_ft_men' => $jobsCreatedDetailed->total_ft_men, + 'total_women' => $this->calculateTotalWomen($jobsCreatedDetailed), + 'total_pt_women' => $jobsCreatedDetailed->total_pt_women, + 'total_ft_women' => $jobsCreatedDetailed->total_ft_women, + 'total_youth' => $this->calculateTotalYouth($jobsCreatedDetailed), + 'total_pt_youth' => $jobsCreatedDetailed->total_pt_youth, + 'total_ft_youth' => $jobsCreatedDetailed->total_ft_youth, + 'total_non_youth' => $this->calculateTotalNonYouth($jobsCreatedDetailed), + 'total_pt_non_youth' => $jobsCreatedDetailed->total_pt_non_youth, + 'total_ft_non_youth' => $jobsCreatedDetailed->total_ft_non_youth, + ]; + + return new JobsCreatedResource($finalResult); + } + + private function filterProjectIdsByType($projectIds, $type) + { + return $projectIds->filter(function ($row) use ($type) { + return $row->type === $type; + })->pluck('id')->toArray(); + } + + private function getAllProjectIds($projectIds) + { + return $projectIds->pluck('id')->toArray(); + } + + private function calculateTotalMen($jobsCreatedDetailed) + { + return $jobsCreatedDetailed->total_pt_men + $jobsCreatedDetailed->total_ft_men; + } + + private function calculateTotalWomen($jobsCreatedDetailed) + { + return $jobsCreatedDetailed->total_pt_women + $jobsCreatedDetailed->total_ft_women; + } + + private function calculateTotalYouth($jobsCreatedDetailed) + { + return $jobsCreatedDetailed->total_pt_youth + $jobsCreatedDetailed->total_ft_youth; + } + + private function calculateTotalNonYouth($jobsCreatedDetailed) + { + return $jobsCreatedDetailed->total_pt_non_youth + $jobsCreatedDetailed->total_ft_non_youth; + } + + private function getTotalJobsCreated($projectIds) + { + $sumData = ProjectReport::whereIn('project_id', $projectIds) + ->where('framework_key', 'terrafund') + ->selectRaw('SUM(ft_total) as total_ft, SUM(pt_total) as total_pt') + ->first(); + + return $sumData->total_ft + $sumData->total_pt; + } + + private function getJobsCreatedDetailed($projectIds) + { + return ProjectReport::whereIn('project_id', $projectIds) + ->where('framework_key', 'terrafund') + ->selectRaw( + 'SUM(ft_total) as total_ft, + SUM(pt_total) as total_pt, + SUM(pt_men) as total_pt_men, + SUM(ft_men) as total_ft_men, + SUM(pt_women) as total_pt_women, + SUM(ft_women) as total_ft_women, + SUM(pt_youth) as total_pt_youth, + SUM(ft_youth) as total_ft_youth, + SUM(pt_non_youth) as total_pt_non_youth, + SUM(ft_jobs_non_youth) as total_ft_non_youth' + ) + ->first(); + } +} diff --git a/app/Http/Controllers/V2/Terrafund/TerrafundEditGeometryController.php b/app/Http/Controllers/V2/Terrafund/TerrafundEditGeometryController.php index 1c601a421..ff7fc8849 100644 --- a/app/Http/Controllers/V2/Terrafund/TerrafundEditGeometryController.php +++ b/app/Http/Controllers/V2/Terrafund/TerrafundEditGeometryController.php @@ -66,7 +66,7 @@ public function updateSitePolygon(string $uuid, Request $request) 'practice' => 'nullable|string', 'distr' => 'nullable|string', 'num_trees' => 'nullable|integer', - 'est_area' => 'nullable|numeric', + 'calc_area' => 'nullable|numeric', 'target_sys' => 'nullable|string', ]); @@ -79,18 +79,30 @@ public function updateSitePolygon(string $uuid, Request $request) } } - public function createSitePolygon(string $uuid, Request $request) + public function createSitePolygon(string $uuid, string $siteUuid, Request $request) { try { - $validatedData = $request->validate([ - 'poly_name' => 'nullable|string', - 'plantstart' => 'nullable|date', - 'plantend' => 'nullable|date', - 'practice' => 'nullable|string', - 'distr' => 'nullable|string', - 'num_trees' => 'nullable|integer', - 'target_sys' => 'nullable|string', - ]); + if ($request->getContent() === '{}') { + $validatedData = [ + 'poly_name' => null, + 'plantstart' => null, + 'plantend' => null, + 'practice' => null, + 'distr' => null, + 'num_trees' => null, + 'target_sys' => null, + ]; + } else { + $validatedData = $request->validate([ + 'poly_name' => 'nullable|string', + 'plantstart' => 'nullable|date', + 'plantend' => 'nullable|date', + 'practice' => 'nullable|string', + 'distr' => 'nullable|string', + 'num_trees' => 'nullable|integer', + 'target_sys' => 'nullable|string', + ]); + } $polygonGeometry = PolygonGeometry::where('uuid', $uuid)->first(); if (! $polygonGeometry) { @@ -107,10 +119,12 @@ public function createSitePolygon(string $uuid, Request $request) 'practice' => $validatedData['practice'], 'distr' => $validatedData['distr'], 'num_trees' => $validatedData['num_trees'], - 'est_area' => $areaHectares, // Assign the calculated area + 'calc_area' => $areaHectares, 'target_sys' => $validatedData['target_sys'], 'poly_id' => $uuid, 'created_by' => Auth::user()?->id, + 'status' => 'submitted', + 'site_id' => $siteUuid, ]); $sitePolygon->save(); diff --git a/app/Http/Resources/V2/Dashboard/JobsCreatedResource.php b/app/Http/Resources/V2/Dashboard/JobsCreatedResource.php new file mode 100644 index 000000000..763d251b2 --- /dev/null +++ b/app/Http/Resources/V2/Dashboard/JobsCreatedResource.php @@ -0,0 +1,37 @@ + (int) $this->totalJobsCreated, + 'forProfitJobsCreated' => (int) $this->forProfitJobsCreated, + 'nonProfitJobsCreated' => (int) $this->nonProfitJobsCreated, + 'total_ft' => (int) $this->total_ft, + 'total_pt' => (int) $this->total_pt, + 'total_men' => (int) $this->total_men, + 'total_pt_men' => (int) $this->total_pt_men, + 'total_ft_men' => (int) $this->total_ft_men, + 'total_women' => (int) $this->total_women, + 'total_pt_women' => (int) $this->total_pt_women, + 'total_ft_women' => (int) $this->total_ft_women, + 'total_youth' => (int) $this->total_youth, + 'total_pt_youth' => (int) $this->total_pt_youth, + 'total_ft_youth' => (int) $this->total_ft_youth, + 'total_non_youth' => (int) $this->total_non_youth, + 'total_pt_non_youth' => (int) $this->total_pt_non_youth, + 'total_ft_non_youth' => (int) $this->total_ft_non_youth, + ]; + } +} diff --git a/app/Models/V2/Sites/SitePolygon.php b/app/Models/V2/Sites/SitePolygon.php index dd420a334..2c60977e3 100644 --- a/app/Models/V2/Sites/SitePolygon.php +++ b/app/Models/V2/Sites/SitePolygon.php @@ -28,22 +28,18 @@ class SitePolygon extends Model protected $table = 'site_polygon'; protected $fillable = [ - 'proj_name', - 'org_name', 'poly_id', 'poly_name', 'site_id', - 'site_name', - 'project_id', - 'poly_label', + 'point_id', 'plantstart', 'plantend', 'practice', 'target_sys', 'distr', 'num_trees', - 'est_area', - 'country', + 'calc_area', + 'status', 'created_by', ]; diff --git a/app/Services/PolygonService.php b/app/Services/PolygonService.php index cddbdd5bd..9e8c5ab8a 100644 --- a/app/Services/PolygonService.php +++ b/app/Services/PolygonService.php @@ -83,6 +83,7 @@ public function createCriteriaSite($polygonId, $criteriaId, $valid): bool|string $criteriaSite->polygon_id = $polygonId; $criteriaSite->criteria_id = $criteriaId; $criteriaSite->valid = $valid; + $criteriaSite->created_by = Auth::user()?->id; try { $criteriaSite->save(); @@ -201,21 +202,16 @@ protected function validateSitePolygonProperties(string $polygonUuid, array $pro $this->createCriteriaSite($polygonUuid, self::DATA_CRITERIA_ID, $validData); return [ - 'project_id' => $properties['project_id'] ?? null, - 'proj_name' => $properties['proj_name'] ?? null, - 'org_name' => $properties['org_name'] ?? null, - 'country' => $properties['country'] ?? null, 'poly_name' => $properties['poly_name'] ?? null, 'site_id' => $properties['site_id'] ?? null, - 'site_name' => $properties['site_name'] ?? null, - 'poly_label' => $properties['poly_label'] ?? null, 'plantstart' => $properties['plantstart'], 'plantend' => $properties['plantend'], 'practice' => $properties['practice'] ?? null, 'target_sys' => $properties['target_sys'] ?? null, 'distr' => $properties['distr'] ?? null, 'num_trees' => $properties['num_trees'], - 'est_area' => $properties['area'] ?? null, + 'calc_area' => $properties['area'] ?? null, + 'status' => 'submitted', ]; } diff --git a/app/Validators/Extensions/Polygons/EstimatedArea.php b/app/Validators/Extensions/Polygons/EstimatedArea.php index bff44f84c..6fe49021b 100644 --- a/app/Validators/Extensions/Polygons/EstimatedArea.php +++ b/app/Validators/Extensions/Polygons/EstimatedArea.php @@ -43,7 +43,7 @@ public static function getAreaData(string $polygonUuid): array return ['valid' => false, 'error' => 'Total hectares restored goal not set for the project', 'status' => 500]; } - $sumEstArea = $project->sitePolygons()->sum('est_area'); + $sumEstArea = $project->sitePolygons()->sum('calc_area'); $lowerBound = self::LOWER_BOUND_MULTIPLIER * $project->total_hectares_restored_goal; $upperBound = self::UPPER_BOUND_MULTIPLIER * $project->total_hectares_restored_goal; $valid = $sumEstArea >= $lowerBound && $sumEstArea <= $upperBound; diff --git a/database/factories/V2/Sites/SitePolygonFactory.php b/database/factories/V2/Sites/SitePolygonFactory.php index b12f83099..1e8415ca5 100644 --- a/database/factories/V2/Sites/SitePolygonFactory.php +++ b/database/factories/V2/Sites/SitePolygonFactory.php @@ -13,7 +13,7 @@ public function definition() return [ 'poly_id' => PolygonGeometry::factory()->create()->uuid, 'site_id' => Site::factory()->create()->uuid, - 'est_area' => $this->faker->numberBetween(2.0, 50.0), + 'calc_area' => $this->faker->numberBetween(2.0, 50.0), ]; } diff --git a/database/migrations/2024_05_13_204255_modify_sites_polygons.php b/database/migrations/2024_05_13_204255_modify_sites_polygons.php new file mode 100644 index 000000000..b898105f8 --- /dev/null +++ b/database/migrations/2024_05_13_204255_modify_sites_polygons.php @@ -0,0 +1,63 @@ +dropColumn($column); + } + } + + if (Schema::hasColumn('site_polygon', 'est_area')) { + $table->decimal('est_area', 15, 2)->nullable()->change(); + $table->renameColumn('est_area', 'calc_area'); + } + + if (! Schema::hasColumn('site_polygon', 'point_id')) { + $table->string('point_id', 255)->nullable()->after('site_id'); + } + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + if (! Schema::hasTable('site_polygon')) { + return; + } + + Schema::table('site_polygon', function (Blueprint $table) { + $table->string('project_id')->nullable(); + $table->string('proj_name')->nullable(); + $table->string('site_name')->nullable(); + $table->string('org_name')->nullable(); + $table->string('poly_label')->nullable(); + $table->date('date_modified')->nullable(); + $table->string('country')->nullable(); + + if (Schema::hasColumn('site_polygon', 'calc_area')) { + $table->renameColumn('calc_area', 'est_area'); + $table->float('est_area')->nullable()->change(); + } + + $table->dropColumn('point_id'); + }); + } +}; diff --git a/database/seeders/Data/polygon_validation_projects.json b/database/seeders/Data/polygon_validation_projects.json index a4dd66d10..94ed71250 100644 --- a/database/seeders/Data/polygon_validation_projects.json +++ b/database/seeders/Data/polygon_validation_projects.json @@ -43,15 +43,15 @@ "geometry": [ { "geojson": "{\"type\": \"Polygon\", \"coordinates\": [[[40.42039202036633, -12.986826569522448], [40.420395177605975, -12.986824096985375], [40.42038654475881, -12.98670798951762], [40.42037374475881, -12.98657808951762], [40.42036344475881, -12.98647018951762], [40.420353944758816, -12.98636398951762], [40.42034624475881, -12.986278589517621], [40.42037564475881, -12.986192889517621], [40.420425644758815, -12.98612818951762], [40.42047954475881, -12.986106689517621], [40.42062474475881, -12.98606338951762], [40.42073464475881, -12.98604168951762], [40.42084664475881, -12.98604248951762], [40.42095864475881, -12.98604348951762], [40.42101464475881, -12.98604398951762], [40.42108934475881, -12.98604458951762], [40.42116404475881, -12.98604518951762], [40.42125904475881, -12.98606828951762], [40.421372844758814, -12.98609218951762], [40.42148894475881, -12.98615798951762], [40.42156724475881, -12.98622208951762], [40.42160844475881, -12.98628648951762], [40.421631244758814, -12.98635168951762], [40.421675744758815, -12.98646138951762], [40.421720044758814, -12.986570589517621], [40.42174424475881, -12.98665748951762], [40.42178664475881, -12.98674408951762], [40.421810644758814, -12.98683018951762], [40.421852744758816, -12.98691618951762], [40.421911644758815, -12.98698058951762], [40.42198854475881, -12.98704498951762], [40.42210404475881, -12.98715168951762], [40.422141544758816, -12.987172989517621], [40.422254044758816, -12.98723718951762], [40.42229374475881, -12.98730048951762], [40.42233774475881, -12.987447089517621], [40.422342244758816, -12.98753018951762], [40.42234774475881, -12.987633589517621], [40.42235324475881, -12.987736489517621], [40.422360944758815, -12.98787978951762], [40.422433344758815, -12.98790068951762], [40.42252254475881, -12.98790128951762], [40.42261364475881, -12.98794268951762], [40.42267084475881, -12.98802418951762], [40.422692244758814, -12.98810508951762], [40.42269684475881, -12.98820568951762], [40.422717244758815, -12.98826588951762], [40.42272184475881, -12.98836568951762], [40.42274294475881, -12.988445289517621], [40.42281594475881, -12.98850508951762], [40.42288604475881, -12.988504889517621], [40.422938544758814, -12.98850448951762], [40.422990344758816, -12.98848438951762], [40.423113044758814, -12.988483289517621], [40.423183144758816, -12.988482689517621], [40.42325514475881, -12.98854088951762], [40.423292444758815, -12.988618289517621], [40.423329644758816, -12.98869528951762], [40.423331944758814, -12.98877298951762], [40.42338714475881, -12.98887068951762], [40.42342364475881, -12.98892908951762], [40.42346044475881, -12.98900658951762], [40.42347834475881, -12.98902598951762], [40.423534344758814, -12.98918018951762], [40.423554044758816, -12.98927518951762], [40.42355534475881, -12.989331789517621], [40.42352334475881, -12.989425589517621], [40.423525244758814, -12.98950048951762], [40.423492444758814, -12.98955628951762], [40.42346074475881, -12.98964908951762], [40.423394044758815, -12.98970428951762], [40.42334454475881, -12.98975948951762], [40.42327934475881, -12.989851189517621], [40.42323074475881, -12.98992428951762], [40.423181244758815, -12.98996098951762], [40.42311704475881, -12.99005358951762], [40.423069344758815, -12.99012728951762], [40.42303864475881, -12.99020088951762], [40.42300804475881, -12.990274089517621], [40.42297834475881, -12.990365289517621], [40.42296554475881, -12.990456189517621], [40.422917844758814, -12.990510289517621], [40.42290434475881, -12.99058208951762], [40.422874144758815, -12.99065328951762], [40.42286054475881, -12.99072368951762], [40.42283124475881, -12.99081138951762], [40.42283434475881, -12.990881189517621], [40.42283814475881, -12.99096818951762], [40.42282474475881, -12.99103748951762], [40.42281134475881, -12.99110648951762], [40.422814444758814, -12.99117528951762], [40.42280104475881, -12.991243889517621], [40.42280574475881, -12.99134628951762], [40.42280874475881, -12.99141418951762], [40.422813344758815, -12.99151578951762], [40.42281714475881, -12.99159998951762], [40.42282094475881, -12.991683789517621], [40.42282474475881, -12.99176718951762], [40.42282774475881, -12.99183378951762], [40.422846844758816, -12.991900089517621], [40.422882044758815, -12.99196628951762], [40.42290254475881, -12.99206558951762], [40.422921644758816, -12.99213168951762], [40.42294064475881, -12.99219758951762], [40.42294434475881, -12.992279489517621], [40.42294724475881, -12.99234478951762], [40.42295094475881, -12.99242608951762], [40.42290484475881, -12.99245828951762], [40.422843644758814, -12.992506589517621], [40.42279774475881, -12.99253868951762], [40.422736044758814, -12.99257068951762], [40.42267264475881, -12.99257048951762], [40.42259354475881, -12.99257018951762], [40.422529344758814, -12.99255388951762], [40.42244814475881, -12.99252138951762], [40.422368944758816, -12.992521189517621], [40.42228964475881, -12.992520889517621], [40.42219464475881, -12.99252098951762], [40.42215034475881, -12.99256918951762], [40.422120844758815, -12.99260118951762], [40.422110444758815, -12.992681089517621], [40.42206564475881, -12.99271338951762], [40.422002744758814, -12.99271368951762], [40.42198244475881, -12.992649789517621], [40.42191144475881, -12.99253818951762], [40.421890944758815, -12.99247398951762], [40.42186804475881, -12.99237718951762], [40.42184984475881, -12.99234488951762], [40.421810744758815, -12.99224718951762], [40.42179104475881, -12.99219798951762], [40.42175004475881, -12.99208268951762], [40.42173014475881, -12.992033089517621], [40.42167554475881, -12.99195028951762], [40.421638144758816, -12.99188388951762], [40.42160064475881, -12.99181728951762], [40.421577844758815, -12.99173368951762], [40.421522544758815, -12.99164968951762], [40.42145354475881, -12.99159918951762], [40.421402144758815, -12.99156558951762], [40.42135214475881, -12.99154898951762], [40.42125054475881, -12.99149868951762], [40.42118544475881, -12.991498789517621], [40.421104144758814, -12.99149888951762], [40.42107164475881, -12.99149888951762], [40.420957744758816, -12.99149898951762], [40.420907244758816, -12.99148198951762], [40.42080964475881, -12.991482089517621], [40.42067944475881, -12.99148218951762], [40.420565544758816, -12.99148228951762], [40.420500444758815, -12.991482389517621], [40.420417144758815, -12.99146538951762], [40.420335744758816, -12.99146538951762], [40.42023814475881, -12.991465489517621], [40.420170944758816, -12.991448489517621], [40.420105844758815, -12.99144858951762], [40.42002204475881, -12.991431289517621], [40.41992174475881, -12.991413689517621], [40.419854044758814, -12.99139628951762], [40.419788544758816, -12.99139598951762], [40.41972064475881, -12.99137848951762], [40.419638744758814, -12.99137818951762], [40.419556744758815, -12.991377789517621], [40.419474744758816, -12.991377489517621], [40.41938124475881, -12.991411389517621], [40.41936314475881, -12.991513989517621], [40.41937524475881, -12.99159908951762], [40.419350044758815, -12.99164998951762], [40.41934594475881, -12.991734389517621], [40.41935564475881, -12.99180168951762], [40.41935154475881, -12.991885489517621], [40.41934504475881, -12.99195218951762], [40.419341044758816, -12.99203518951762], [40.419318544758816, -12.99210138951762], [40.41929864475881, -12.99218378951762], [40.41930824475881, -12.992249389517621], [40.419301944758814, -12.99231478951762], [40.41929804475881, -12.99239618951762], [40.419307544758816, -12.99246108951762], [40.41930364475881, -12.99254178951762], [40.41924764475881, -12.99259008951762], [40.419173644758814, -12.992622289517621], [40.41909724475881, -12.992638389517621], [40.41900264475881, -12.992638389517621], [40.41893194475881, -12.99259038951762], [40.41889014475881, -12.99252598951762], [40.418850744758814, -12.99247758951762], [40.418827044758814, -12.992429089517621], [40.41877954475881, -12.99233158951762], [40.418721244758814, -12.992266289517621], [40.418694644758816, -12.99220078951762], [40.418633144758815, -12.99211848951762], [40.41857694475881, -12.992068989517621], [40.418501744758814, -12.99200278951762], [40.41843474475881, -12.991986289517621], [40.418332744758814, -12.99195308951762], [40.418246544758816, -12.99191978951762], [40.417351544758816, -12.992188289517621], [40.417190344758815, -12.99210668951762], [40.41714134475881, -12.992057889517621], [40.417091844758815, -12.99199238951762], [40.41707464475881, -12.99194258951762], [40.41705704475881, -12.99187588951762], [40.417055444758816, -12.99180898951762], [40.417053444758814, -12.99172488951762], [40.41705184475881, -12.99165728951762], [40.41705024475881, -12.99158958951762], [40.41704824475881, -12.99150448951762], [40.417062544758814, -12.99141888951762], [40.41706054475881, -12.99133298951762], [40.417042544758814, -12.991264089517621], [40.416959344758816, -12.99121268951762], [40.416908344758816, -12.99114348951762], [40.416856544758815, -12.99105638951762], [40.416804944758816, -12.99098528951762], [40.41680204475881, -12.99089628951762], [40.41679924475881, -12.99080688951762], [40.41681304475881, -12.99071708951762], [40.41684464475881, -12.99066308951762], [40.41689224475881, -12.990573989517621], [40.41694064475881, -12.99050308951762], [40.41698954475881, -12.99044988951762], [40.417039044758816, -12.990414389517621], [40.417105344758816, -12.99037898951762], [40.41718824475881, -12.99032558951762], [40.417254844758816, -12.99028998951762], [40.41728794475881, -12.990254189517621], [40.41735464475881, -12.99021818951762], [40.417421344758814, -12.990163889517621], [40.417488344758816, -12.99012758951762], [40.41757244475881, -12.99009118951762], [40.41765644475881, -12.99003658951762], [40.41772394475881, -12.99000008951762], [40.417757644758815, -12.98996348951762], [40.417842244758816, -12.98992678951762], [40.41791004475881, -12.98989008951762], [40.41794404475881, -12.98985328951762], [40.41802904475881, -12.98983468951762], [40.41809714475881, -12.989797389517621], [40.41818234475881, -12.98977828951762], [40.418267844758816, -12.989740689517621], [40.41833614475881, -12.989721689517621], [40.418404644758816, -12.98970258951762], [40.418473344758816, -12.989664989517621], [40.418524944758815, -12.989645989517621], [40.41862874475881, -12.98957078951762], [40.41868084475881, -12.98953308951762], [40.418750544758815, -12.98947598951762], [40.41885494475881, -12.98941808951762], [40.41890844475881, -12.989341989517621], [40.41896114475881, -12.98930348951762], [40.419049644758815, -12.98922608951762], [40.41910394475881, -12.98914808951762], [40.419158444758814, -12.98906978951762], [40.419212544758814, -12.98901058951762], [40.419233244758814, -12.98891278951762], [40.41923654475881, -12.988814689517621], [40.41923984475881, -12.98871608951762], [40.41924324475881, -12.98861698951762], [40.41924584475881, -12.98853778951762], [40.41924894475881, -12.988439389517621], [40.419250844758814, -12.988380089517621], [40.419253344758815, -12.98830078951762], [40.41925784475881, -12.98816128951762], [40.419242544758816, -12.98808148951762], [40.41919154475881, -12.98800148951762], [40.419121444758815, -12.98796148951762], [40.41910594475881, -12.98788008951762], [40.41907244475881, -12.987799289517621], [40.419075144758814, -12.98769738951762], [40.41907794475881, -12.987594989517621], [40.41909874475881, -12.98749188951762], [40.419137244758815, -12.98740888951762], [40.41919574475881, -12.98726288951762], [40.419252744758815, -12.987178789517621], [40.419327444758814, -12.98711518951762], [40.419401744758815, -12.987072389517621], [40.41954744475881, -12.98707138951762], [40.41954734475881, -12.987021289517621], [40.419545944758816, -12.98699158951762], [40.41954494475881, -12.98697178951762], [40.41954354475881, -12.98694198951762], [40.41954234475881, -12.98691698951762], [40.419550644758814, -12.98689688951762], [40.419554344758815, -12.98687678951762], [40.41955824475881, -12.98686158951762], [40.41957104475881, -12.98683618951762], [40.419579344758816, -12.98681588951762], [40.41959244475881, -12.98679548951762], [40.41961064475881, -12.986785089517621], [40.41962864475881, -12.98676968951762], [40.419646644758814, -12.98675418951762], [40.419660244758816, -12.98674378951762], [40.41968304475881, -12.98672818951762], [40.419705644758814, -12.98670738951762], [40.419719044758814, -12.98668668951762], [40.419732544758816, -12.98667098951762], [40.41975534475881, -12.986650089517621], [40.419769044758816, -12.98663438951762], [40.41978264475881, -12.98661858951762], [40.41979614475881, -12.98659758951762], [40.41981474475881, -12.986586889517621], [40.41982834475881, -12.98656578951762], [40.41984704475881, -12.986555089517621], [40.419865744758816, -12.98654438951762], [40.41988434475881, -12.98652838951762], [40.41990304475881, -12.98651768951762], [40.419936244758816, -12.986512089517621], [40.41996004475881, -12.986511789517621], [40.419993244758814, -12.986511489517621], [40.42001264475881, -12.98653248951762], [40.420031644758815, -12.98653758951762], [40.42005084475881, -12.98655348951762], [40.420070044758816, -12.986569389517621], [40.42008434475881, -12.98657998951762], [40.420108144758814, -12.98659578951762], [40.42012724475881, -12.98661158951762], [40.42014144475881, -12.98662208951762], [40.42015094475881, -12.986637789517621], [40.420160544758815, -12.98666398951762], [40.42017474475881, -12.98667438951762], [40.42018884475881, -12.98668488951762], [40.42022174475881, -12.98670038951762], [40.420231144758816, -12.986705589517621], [40.42025464475881, -12.98672118951762], [40.420277944758816, -12.98673668951762], [40.42028734475881, -12.98674178951762], [40.420310644758814, -12.98676248951762], [40.42032924475881, -12.98677268951762], [40.42034314475881, -12.98678808951762], [40.42036164475881, -12.986803489517621], [40.420370844758814, -12.98681368951762], [40.42038474475881, -12.98682388951762], [40.42039042272699, -12.986826303249225], [40.42039202036633, -12.986826569522448]]]}", - "est_area": 29 + "calc_area": 29 }, { "geojson": "{\"type\": \"Polygon\", \"coordinates\": [[[40.4208782, -12.9966219], [40.420668718590605, -12.996690702886378], [40.4205746, -12.9967071], [40.42057158698505, -12.996712167019878], [40.4205646, -12.9967249], [40.4206808, -12.9970237], [40.4205785, -12.9970738], [40.4204578, -12.9970399], [40.4201384, -12.9970048], [40.4199487, -12.9969966], [40.4198451, -12.9969883], [40.4195651, -12.9969206], [40.4193779, -12.9968437], [40.41915, -12.9967142], [40.419007, -12.9966792], [40.4187997, -12.9966181], [40.4186464, -12.9964872], [40.4182502, -12.9963375], [40.4178242, -12.996267], [40.4177966, -12.9962583], [40.4176934, -12.996151], [40.4176655, -12.9961421], [40.4174409, -12.9960624], [40.4174293, -12.9960442], [40.4171427, -12.9958793], [40.4167641, -12.9958254], [40.416554, -12.9955798], [40.4165486, -12.9952107], [40.416852, -12.9952486], [40.4170542, -12.9952964], [40.4173546, -12.9951463], [40.4176285, -12.9948334], [40.4177287, -12.9948741], [40.4178497, -12.9950051], [40.4182262, -12.9950137], [40.4184424, -12.9950135], [40.4185773, -12.9948521], [40.4187258, -12.9946058], [40.4187848, -12.9942907], [40.4187998, -12.9940106], [40.4186606, -12.9936752], [40.4184847, -12.9935047], [40.418567, -12.9934237], [40.4191292, -12.993422], [40.4194912, -12.9934221], [40.4198032, -12.9934243], [40.4197678, -12.9937522], [40.4197963, -12.9939596], [40.4200389, -12.9941628], [40.4203545, -12.9943043], [40.4205594, -12.9943907], [40.4205707, -12.9945175], [40.4205837, -12.9947875], [40.4205933, -12.9947979], [40.420737, -12.9950106], [40.4209999, -12.9951113], [40.4210092, -12.9951213], [40.4213239, -12.9952997], [40.4214468, -12.9955806], [40.4214587, -12.9958268], [40.4213012, -12.9960029], [40.4212651, -12.996012], [40.4209943, -12.996185], [40.4208782, -12.9966219]]]}", - "est_area": 11 + "calc_area": 11 }, { "geojson": "{\"type\": \"Polygon\", \"coordinates\": [[[40.422583542502316, -12.996359645998147], [40.422837542502315, -12.996105945998147], [40.422867442502316, -12.995839445998147], [40.42275404250232, -12.995605945998147], [40.422777942502314, -12.995321145998147], [40.42286394250232, -12.995240745998148], [40.42294434250232, -12.995202445998148], [40.42301354250232, -12.995182845998148], [40.42312124250232, -12.995165945998147], [40.423235242502315, -12.995097345998147], [40.42333114250231, -12.995037345998147], [40.42345394250231, -12.994979345998148], [40.42349344250232, -12.994923945998147], [40.423533042502314, -12.994886345998147], [40.423530042502314, -12.994822145998148], [40.423541042502315, -12.994772445998148], [40.423573942502316, -12.994691745998148], [40.42359924250232, -12.994634745998148], [40.42364354250232, -12.994580345998148], [40.42369814250232, -12.994557945998148], [40.42375044250232, -12.994438045998148], [40.423774642502316, -12.994418245998148], [40.423775742502315, -12.994391445998147], [40.42377714250232, -12.994357845998147], [40.42378474250231, -12.994317245998147], [40.423785542502316, -12.994296845998148], [40.42379264250231, -12.994269545998147], [40.423805642502316, -12.994242245998148], [40.42380714250232, -12.994207745998148], [40.42380834250232, -12.994179945998148], [40.42382714250232, -12.994159245998148], [40.42385704250232, -12.994159545998148], [40.423880842502314, -12.994159745998148], [40.42390444250232, -12.994166945998147], [40.423927142502315, -12.994188045998147], [40.42394384250232, -12.994208945998148], [40.42394754250232, -12.994305145998148], [40.423973342502315, -12.994332545998148], [40.42399254250232, -12.994352945998148], [40.424006842502315, -12.994386745998147], [40.424014642502314, -12.994413645998147], [40.42404004250232, -12.994440445998148], [40.424058442502314, -12.994453945998147], [40.424087642502315, -12.994454145998148], [40.424111442502316, -12.994461045998147], [40.42413604250232, -12.994481045998148], [40.424160642502315, -12.994501045998147], [40.424178842502315, -12.994514345998148], [40.42420244250231, -12.994520945998147], [40.424226342502315, -12.994534045998147], [40.42424474250232, -12.994553645998147], [40.42426304250232, -12.994573245998147], [40.42427594250232, -12.994599145998148], [40.42428364250232, -12.994637845998147], [40.424295742502316, -12.994650645998147], [40.42431424250232, -12.994676445998147], [40.424332042502314, -12.994689445998148], [40.424333242502314, -12.994715045998147], [40.424335042502314, -12.994753245998147], [40.42434704250232, -12.994766045998148], [40.42437024250231, -12.994778945998148], [40.42439864250232, -12.994779145998148], [40.424420842502315, -12.994766545998148], [40.424437342502316, -12.994754045998148], [40.424459142502315, -12.994728745998147], [40.42447534250232, -12.994703345998147], [40.42450324250232, -12.994684345998147], [40.42451984250231, -12.994665145998148], [40.424548042502316, -12.994652545998148], [40.42456454250232, -12.994626745998147], [40.424581442502316, -12.994613845998147], [40.42461024250232, -12.994614145998147], [40.42463894250232, -12.994614345998148], [40.42466194250232, -12.994614545998148], [40.42469064250232, -12.994614745998147], [40.424719442502315, -12.994614945998148], [40.42473674250232, -12.994621645998148], [40.42476544250231, -12.994628345998148], [40.424782742502316, -12.994641445998148], [40.42478294250232, -12.994673645998148], [40.424783242502315, -12.994705745998148], [40.424783342502316, -12.994731245998148], [40.42477794250232, -12.994762945998147], [40.424766842502315, -12.994794545998147], [40.42476704250232, -12.994819845998148], [40.42475604250232, -12.994844945998148], [40.42473354250232, -12.994844745998147], [40.42471104250232, -12.994844545998147], [40.42468854250232, -12.994844445998147], [40.424660442502315, -12.994844245998147], [40.42463224250232, -12.994844045998148], [40.424598542502316, -12.994843745998148], [40.424575942502315, -12.994843645998147], [40.42454224250232, -12.994843345998147], [40.42451404250232, -12.994843145998148], [40.42448614250232, -12.994849245998148], [40.42446424250232, -12.994867845998147], [40.42444794250232, -12.994880245998148], [40.42442594250232, -12.994892545998148], [40.424404342502314, -12.994911045998148], [40.42438274250232, -12.994929445998148], [40.424372742502314, -12.994954045998147], [40.42436274250232, -12.994978545998148], [40.424347242502314, -12.995002845998147], [40.42432564250232, -12.995014945998147], [40.424303442502314, -12.995014745998148], [40.42428194250232, -12.995026745998148], [40.424254242502315, -12.995026545998147], [40.42423684250232, -12.995014345998147], [40.424240942502315, -12.994989945998148], [40.42425624250232, -12.994965545998147], [40.424266342502314, -12.994947145998148], [40.42427054250231, -12.994922445998148], [40.42425834250232, -12.994903845998147], [40.42423584250232, -12.994903645998148], [40.42421984250232, -12.994915945998148], [40.424197742502315, -12.994921945998147], [40.424188542502314, -12.994952745998148], [40.42418454250232, -12.994977345998148], [40.424186142502315, -12.995001745998147], [40.424182542502315, -12.995032145998147], [40.42416714250232, -12.995050245998147], [40.424145442502315, -12.995056145998147], [40.42412324250232, -12.995055945998148], [40.42404734250232, -12.995202345998148], [40.42404604250232, -12.995213245998148], [40.42402214250232, -12.995293245998148], [40.424011642502315, -12.995363545998147], [40.42406714250232, -12.995417245998148], [40.424062842502316, -12.995469745998147], [40.423970942502315, -12.995494045998148], [40.42391594250232, -12.995506145998148], [40.42399504250232, -12.995623645998148], [40.42402784250232, -12.995740945998147], [40.424191642502315, -12.995772345998148], [40.42430614250232, -12.995772245998147], [40.42438404250232, -12.995702245998148], [40.42434714250231, -12.995631845998147], [40.424305242502314, -12.995537145998147], [40.42438774250232, -12.995497245998148], [40.42444734250232, -12.995457245998148], [40.42452044250231, -12.995433245998148], [40.42468254250232, -12.995441045998147], [40.42475674250232, -12.995464845998148], [40.42488624250232, -12.995480645998148], [40.42498594250232, -12.995481445998148], [40.425070242502315, -12.995482145998148], [40.42518614250232, -12.995522645998147], [40.42533004250232, -12.995703845998147], [40.425350642502316, -12.995758145998147], [40.42534114250232, -12.995811845998148], [40.42531814250231, -12.995941145998147], [40.425299442502315, -12.996046245998148], [40.425245442502316, -12.996142645998148], [40.425185242502316, -12.996230945998148], [40.42511004250232, -12.996281945998147], [40.42500364250232, -12.996303345998147], [40.42477794250232, -12.996331945998147], [40.42466664250232, -12.996332145998148], [40.424599742502316, -12.996332445998148], [40.424500542502315, -12.996296445998148], [40.424501242502316, -12.996238045998147], [40.424360142502316, -12.996231345998147], [40.42425834250232, -12.996268345998148], [40.42410754250232, -12.996283545998148], [40.424085842502315, -12.996341745998148], [40.424024542502316, -12.996511745998147], [40.42422704250232, -12.996710845998148], [40.42438334250232, -12.996770345998147], [40.42446174250232, -12.996746745998147], [40.42448634250232, -12.996746745998147], [40.424615342502314, -12.996746645998147], [40.42474954250232, -12.996752545998147], [40.42487664250232, -12.996764645998148], [40.42490214250232, -12.996795345998148], [40.42496894250232, -12.996904445998148], [40.42497214250232, -12.997023645998148], [40.42499224250231, -12.997111345998148], [40.42498654250232, -12.997209145998148], [40.42495304250232, -12.997328545998148], [40.42486254250232, -12.997521945998148], [40.42462544250232, -12.998119045998148], [40.42453624250231, -12.998417745998148], [40.42424784250232, -12.998550545998148], [40.424090842502316, -12.998580445998147], [40.423812742502314, -12.998598545998147], [40.42300324250232, -12.997743445998148], [40.42264044250231, -12.997648945998147], [40.42218104250232, -12.997461745998148], [40.421974142502314, -12.997376545998147], [40.42153534250232, -12.997305045998148], [40.42121454250232, -12.997115945998148], [40.420682142502315, -12.997014245998148], [40.420577064606924, -12.996716427392446], [40.422583542502316, -12.996359645998147]]]}", - "est_area": 10 + "calc_area": 10 } ] }, @@ -60,11 +60,11 @@ "geometry": [ { "geojson": "{\"type\": \"Polygon\", \"coordinates\": [[[40.4030892, -12.9677323], [40.4031161, -12.9677189], [40.4031687, -12.9677027], [40.4032214, -12.9676864], [40.4032909, -12.9676864], [40.4033603, -12.9676865], [40.4034297, -12.9676865], [40.4034826, -12.9676702], [40.4035494, -12.9676539], [40.4036189, -12.9676539], [40.4036719, -12.9676376], [40.4037251, -12.9676213], [40.4037807, -12.9676213], [40.4038642, -12.9676213], [40.4039222, -12.9676377], [40.4039918, -12.9676377], [40.4040497, -12.9676541], [40.4041215, -12.9676704], [40.4041792, -12.9676867], [40.4042275, -12.9677355], [40.4042777, -12.9678003], [40.4043121, -12.9678492], [40.4043485, -12.967914], [40.4043826, -12.9679626], [40.4043951, -12.9680582], [40.4044173, -12.9681218], [40.4044235, -12.9681692], [40.4044612, -12.9682481], [40.4044967, -12.9683111], [40.4045437, -12.9683584], [40.4045884, -12.9683899], [40.4046446, -12.9684057], [40.4047142, -12.9684216], [40.404799, -12.9684529], [40.4048667, -12.9684534], [40.4049124, -12.9684995], [40.4049697, -12.9685303], [40.4050284, -12.9685758], [40.4050868, -12.9686211], [40.4051585, -12.9686663], [40.4052165, -12.9687113], [40.4052729, -12.9687412], [40.4053277, -12.9687562], [40.4053853, -12.9688009], [40.4054532, -12.9688158], [40.4055104, -12.9688603], [40.4055542, -12.9689046], [40.4055727, -12.9689636], [40.4055911, -12.9690222], [40.4055699, -12.9690806], [40.4055474, -12.9691242], [40.4054857, -12.9691677], [40.4054359, -12.9691966], [40.4053834, -12.9691966], [40.4053309, -12.9691966], [40.4052522, -12.9691966], [40.4051881, -12.969211], [40.4051372, -12.9692254], [40.4050748, -12.9692541], [40.4050288, -12.9693115], [40.4050058, -12.9693401], [40.4049714, -12.9693827], [40.4049147, -12.9694543], [40.4048809, -12.9694972], [40.40482, -12.9695264], [40.4047814, -12.9695267], [40.4047314, -12.969541], [40.4046833, -12.9695694], [40.4046206, -12.9695836], [40.4045689, -12.9695836], [40.4045211, -12.969612], [40.4044734, -12.9696403], [40.4044258, -12.9696685], [40.4043723, -12.9696544], [40.4043295, -12.9696261], [40.4042955, -12.9695693], [40.4042613, -12.9695124], [40.404255, -12.9694695], [40.4042296, -12.9693836], [40.4042105, -12.9693407], [40.4041742, -12.9692691], [40.4041269, -12.9692118], [40.4040815, -12.9691688], [40.404049, -12.9691254], [40.4040034, -12.9690821], [40.4039576, -12.9690387], [40.4039091, -12.9689799], [40.4038625, -12.9689355], [40.4038134, -12.9688759], [40.4037797, -12.9688311], [40.4037302, -12.968771], [40.4036804, -12.9687107], [40.4036306, -12.9686503], [40.4035318, -12.9686198], [40.4034729, -12.9685891], [40.4034273, -12.9685584], [40.4033654, -12.9685121], [40.4033303, -12.9684657], [40.4032787, -12.9684036], [40.4032433, -12.9683568], [40.4032049, -12.9682941], [40.4031635, -12.9682154], [40.4031247, -12.968152], [40.4030828, -12.9680724], [40.4030573, -12.9680084], [40.403032, -12.9679444], [40.4030175, -12.9678643], [40.4030307, -12.9677837], [40.4030664, -12.9677513], [40.4030892, -12.9677323]]]}", - "est_area": 3 + "calc_area": 3 }, { "geojson": "{\"type\": \"Polygon\", \"coordinates\": [[[40.405925, -12.968045], [40.4058902, -12.9680778], [40.4059127, -12.9680233], [40.4059379, -12.9679904], [40.4059631, -12.9679571], [40.4059994, -12.9679346], [40.4060385, -12.9679343], [40.4060899, -12.9679561], [40.406129, -12.9679558], [40.4061803, -12.9679776], [40.4062302, -12.9679882], [40.4062812, -12.9680097], [40.4063202, -12.9680094], [40.4063691, -12.9680095], [40.4064081, -12.9680096], [40.4064472, -12.9680096], [40.4064808, -12.9680537], [40.4065208, -12.9680647], [40.4065618, -12.9680866], [40.4066114, -12.9680976], [40.4066529, -12.9681298], [40.4066936, -12.9681515], [40.4067332, -12.9681624], [40.4067737, -12.968184], [40.4068141, -12.9682056], [40.4068554, -12.9682384], [40.4068683, -12.9682816], [40.4068724, -12.9683353], [40.4068661, -12.9683779], [40.4068303, -12.9684095], [40.4068032, -12.9684305], [40.4067458, -12.9684301], [40.4067075, -12.9684298], [40.4066606, -12.96844], [40.4066128, -12.9684397], [40.4065861, -12.9684606], [40.4065403, -12.9684814], [40.4065127, -12.9684917], [40.4064767, -12.9685126], [40.4064312, -12.9685334], [40.4063764, -12.9685541], [40.4063407, -12.9685748], [40.4062933, -12.9685748], [40.406246, -12.9685748], [40.4061892, -12.9685747], [40.4061513, -12.9685747], [40.4061134, -12.9685747], [40.4060755, -12.9685747], [40.4060281, -12.9685747], [40.4059903, -12.9685747], [40.4059429, -12.9685747], [40.4058956, -12.9685747], [40.4058549, -12.968554], [40.4058128, -12.9685228], [40.4057979, -12.9684814], [40.4058114, -12.9684397], [40.4058345, -12.9683978], [40.4058591, -12.9683662], [40.4058619, -12.9683135], [40.4058662, -12.9682711], [40.4058704, -12.9682285], [40.4058843, -12.9681856], [40.4058982, -12.9681426], [40.4059206, -12.9680884], [40.405925, -12.968045]]]}", - "est_area": 1 + "calc_area": 1 } ] }, @@ -73,11 +73,11 @@ "geometry": [ { "geojson": "{\"type\": \"Polygon\", \"coordinates\": [[[40.4067983, -12.9261098], [40.4068497, -12.9260495], [40.4069473, -12.9260279], [40.4069582, -12.9260272], [40.4069745, -12.9260261], [40.4069881, -12.9260253], [40.406996, -12.9260218], [40.4070096, -12.9260209], [40.4070204, -12.9260202], [40.4070311, -12.9260165], [40.4070389, -12.926013], [40.4070523, -12.9260091], [40.4070605, -12.9260086], [40.4070736, -12.9260017], [40.4070838, -12.925992], [40.4070947, -12.9259913], [40.4071054, -12.9259876], [40.4071161, -12.9259839], [40.4071268, -12.9259802], [40.4071375, -12.9259765], [40.4071476, -12.9259636], [40.4071613, -12.9259628], [40.407172, -12.925959], [40.4071885, -12.925958], [40.4072049, -12.9259569], [40.4072186, -12.9259561], [40.4072295, -12.9259554], [40.4072432, -12.9259545], [40.4072542, -12.9259538], [40.4072706, -12.9259528], [40.4072784, -12.9259431], [40.4072777, -12.9259278], [40.4072853, -12.9259149], [40.4072848, -12.9259026], [40.407287, -12.92589], [40.4072892, -12.9258773], [40.4072885, -12.9258617], [40.4072879, -12.9258491], [40.4072873, -12.9258365], [40.4072813, -12.9258274], [40.4072724, -12.9258152], [40.4072609, -12.9258095], [40.4072495, -12.925807], [40.407238, -12.9258014], [40.4072292, -12.9257955], [40.4072202, -12.9257864], [40.4072113, -12.9257773], [40.4072049, -12.9257647], [40.4071957, -12.9257523], [40.4071864, -12.9257398], [40.4071747, -12.925734], [40.4071629, -12.9257281], [40.4071511, -12.9257223], [40.4071395, -12.9257197], [40.4071277, -12.9257139], [40.4071182, -12.9257012], [40.4071061, -12.925692], [40.4070992, -12.9256758], [40.4070953, -12.9256626], [40.4070637, -12.9256274], [40.4070511, -12.9256146], [40.4070419, -12.9256084], [40.4070297, -12.9256023], [40.4070176, -12.9255962], [40.4070054, -12.9255901], [40.4069934, -12.9255874], [40.4069815, -12.9255847], [40.4069695, -12.925582], [40.4069572, -12.9255758], [40.4069472, -12.9255626], [40.40694, -12.9255491], [40.4069384, -12.9255318], [40.4069371, -12.9255178], [40.4069298, -12.925504], [40.4069199, -12.9254938], [40.4069077, -12.9254909], [40.4068959, -12.9254915], [40.4068833, -12.925485], [40.4068703, -12.9254748], [40.406858, -12.9254719], [40.4068446, -12.9254581], [40.4068344, -12.9254477], [40.4068268, -12.9254335], [40.4068196, -12.9254229], [40.406809, -12.9254088], [40.4067983, -12.9253947], [40.4067906, -12.9253804], [40.4067829, -12.925366], [40.4067751, -12.9253516], [40.4067734, -12.9253368], [40.4067778, -12.9253217], [40.4067891, -12.9253136], [40.4067978, -12.9253094], [40.4068126, -12.9253049], [40.4068279, -12.9253041], [40.4068401, -12.9253035], [40.406853, -12.9253104], [40.4068637, -12.9253248], [40.406877, -12.9253353], [40.4068872, -12.9253459], [40.4069, -12.9253527], [40.4069098, -12.9253596], [40.4069226, -12.9253663], [40.406933, -12.9253805], [40.4069457, -12.9253872], [40.4069584, -12.9253938], [40.4069713, -12.9254041], [40.4069812, -12.9254145], [40.4069912, -12.9254249], [40.407004, -12.9254352], [40.4070165, -12.9254417], [40.4070236, -12.9254556], [40.4070363, -12.9254655], [40.4070487, -12.9254719], [40.4070613, -12.9254817], [40.4070707, -12.9254882], [40.4070833, -12.9254981], [40.4070929, -12.925508], [40.4071022, -12.9255145], [40.407112, -12.9255279], [40.407121, -12.9255308], [40.407152, -12.9256014], [40.407186, -12.9256367], [40.4071981, -12.9256461], [40.4072048, -12.9256624], [40.4072166, -12.9256684], [40.4072284, -12.9256743], [40.4072402, -12.9256803], [40.4072493, -12.9256897], [40.4072555, -12.9256992], [40.4072673, -12.9257084], [40.4072763, -12.9257177], [40.4072853, -12.925727], [40.4072943, -12.9257395], [40.4073062, -12.9257518], [40.4073179, -12.9257608], [40.4073267, -12.92577], [40.4073382, -12.9257757], [40.4073471, -12.925788], [40.4073533, -12.9258037], [40.4073592, -12.9258129], [40.4073598, -12.9258319], [40.4073685, -12.9258409], [40.4073799, -12.9258496], [40.4073913, -12.9258583], [40.4074, -12.9258703], [40.4074085, -12.9258792], [40.4074171, -12.9258911], [40.4074284, -12.9259028], [40.4074287, -12.9259151], [40.4074291, -12.9259304], [40.4074347, -12.9259393], [40.4074432, -12.925951], [40.4074516, -12.9259626], [40.4074573, -12.9259743], [40.4074629, -12.925983], [40.4074685, -12.9259917], [40.4074741, -12.9260034], [40.4074797, -12.9260149], [40.4074853, -12.9260265], [40.4074855, -12.9260384], [40.407491, -12.9260498], [40.4074965, -12.9260612], [40.407502, -12.9260726], [40.4075022, -12.9260872], [40.4075077, -12.9260985], [40.4075131, -12.9261097], [40.4075158, -12.9261212], [40.4075185, -12.9261297], [40.4075213, -12.9261439], [40.407524, -12.9261552], [40.4075346, -12.9261631], [40.4075373, -12.9261772], [40.4075452, -12.9261852], [40.4075452, -12.9261993], [40.4075531, -12.9262072], [40.4075557, -12.9262183], [40.4075635, -12.926229], [40.4075661, -12.9262344], [40.4075713, -12.9262507], [40.4075713, -12.9262617], [40.4075764, -12.9262724], [40.407579, -12.9262832], [40.4075841, -12.9262938], [40.4075892, -12.9263043], [40.4075942, -12.9263149], [40.4075993, -12.9263253], [40.4076043, -12.9263384], [40.4076093, -12.9263488], [40.4076169, -12.9263563], [40.4076193, -12.9263695], [40.4076268, -12.9263796], [40.4076317, -12.9263898], [40.4076366, -12.9264], [40.4076415, -12.9264101], [40.4076464, -12.9264202], [40.4076512, -12.9264303], [40.4076561, -12.9264378], [40.4076634, -12.9264502], [40.4076657, -12.9264603], [40.407673, -12.9264675], [40.4076753, -12.9264776], [40.4076801, -12.9264874], [40.4076823, -12.9264974], [40.4076821, -12.9265075], [40.4076843, -12.9265174], [40.4076866, -12.9265273], [40.4076888, -12.9265371], [40.4076886, -12.9265471], [40.4077062, -12.9266194], [40.4077071, -12.9266744], [40.4077068, -12.9266838], [40.4077065, -12.9266956], [40.4077015, -12.9267053], [40.4076918, -12.9267106], [40.4076822, -12.9267159], [40.407675, -12.926721], [40.4076653, -12.9267286], [40.407658, -12.9267361], [40.4076485, -12.9267413], [40.4076389, -12.9267466], [40.4076271, -12.9267473], [40.4076176, -12.926748], [40.4076057, -12.926751], [40.4075986, -12.9267515], [40.4075844, -12.9267524], [40.4075726, -12.9267532], [40.4075607, -12.926754], [40.4075513, -12.9267523], [40.4075418, -12.9267506], [40.4075299, -12.9267514], [40.4075204, -12.9267474], [40.4074879, -12.9267836], [40.4074773, -12.9267872], [40.4074667, -12.9267879], [40.4074508, -12.9267889], [40.4074401, -12.9267896], [40.4074297, -12.926796], [40.4074245, -12.9268021], [40.407425, -12.9268164], [40.4074201, -12.9268282], [40.4074206, -12.9268423], [40.407421, -12.9268565], [40.4074214, -12.9268677], [40.4074297, -12.9268784], [40.4074402, -12.9268806], [40.4074482, -12.9268828], [40.4074613, -12.9268848], [40.4074692, -12.9268843], [40.4074824, -12.926889], [40.4074928, -12.9268884], [40.4075059, -12.9268875], [40.4075164, -12.9268869], [40.4075294, -12.926886], [40.4075425, -12.9268852], [40.4075529, -12.9268845], [40.4075634, -12.9268838], [40.4075791, -12.9268828], [40.4075921, -12.926882], [40.4076026, -12.9268813], [40.4076157, -12.9268805], [40.4076261, -12.9268798], [40.4076392, -12.9268789], [40.4076471, -12.9268756], [40.4076602, -12.9268747], [40.4076707, -12.9268684], [40.4076838, -12.9268647], [40.4076943, -12.9268612], [40.4077049, -12.9268577], [40.4077154, -12.9268541], [40.4077259, -12.9268507], [40.4077364, -12.92685], [40.4077469, -12.9268493], [40.4077574, -12.9268487], [40.4077677, -12.9268536], [40.4077701, -12.9268646], [40.4077697, -12.9268812], [40.40778, -12.9268889], [40.4077876, -12.9268966], [40.4077978, -12.9269015], [40.4078081, -12.9269063], [40.4078183, -12.9269111], [40.4078285, -12.9269159], [40.4078361, -12.9269209], [40.4078436, -12.9269286], [40.4078536, -12.9269361], [40.4078584, -12.9269466], [40.4078632, -12.9269544], [40.4078655, -12.9269623], [40.4078727, -12.9269752], [40.4078801, -12.9269801], [40.4078902, -12.9269848], [40.4078976, -12.9269896], [40.4079101, -12.9269941], [40.4079173, -12.9270043], [40.407922, -12.9270119], [40.4079266, -12.9270221], [40.4079286, -12.9270325], [40.4079307, -12.9270428], [40.4079299, -12.9270585], [40.4079343, -12.9270712], [40.4079388, -12.9270812], [40.407946, -12.9270885], [40.4079504, -12.9270984], [40.4079548, -12.9271109], [40.4079542, -12.9271212], [40.4079562, -12.9271312], [40.4079555, -12.9271439], [40.4079476, -12.9271519], [40.4079351, -12.9271552], [40.4079297, -12.9271631], [40.4079194, -12.9271713], [40.4079095, -12.9271719], [40.4078971, -12.9271727], [40.4078874, -12.9271684], [40.4078803, -12.9271613], [40.4078757, -12.9271515], [40.4078686, -12.9271444], [40.4078588, -12.92714], [40.4078491, -12.927133], [40.4078419, -12.9271258], [40.407832, -12.9271214], [40.4078197, -12.9271171], [40.4078099, -12.92711], [40.4078, -12.9271056], [40.4077927, -12.9270983], [40.4077878, -12.9270909], [40.4077805, -12.9270836], [40.4077731, -12.9270738], [40.4077632, -12.9270692], [40.4077557, -12.9270619], [40.4077482, -12.9270571], [40.4077408, -12.9270498], [40.4077332, -12.927045], [40.4077258, -12.927035], [40.4077182, -12.9270302], [40.4077106, -12.9270255], [40.4077031, -12.9270128], [40.4076955, -12.9270053], [40.4076905, -12.9269977], [40.4076854, -12.9269874], [40.4076829, -12.9269768], [40.4076779, -12.9269664], [40.4076675, -12.9269644], [40.4076572, -12.9269651], [40.4076469, -12.9269659], [40.4076366, -12.9269746], [40.4076314, -12.926983], [40.4076237, -12.9269943], [40.407616, -12.9270002], [40.4076032, -12.9270064], [40.4075904, -12.9270072], [40.4075801, -12.927008], [40.4075673, -12.9270088], [40.4075545, -12.9270097], [40.4075416, -12.9270053], [40.4075313, -12.9270007], [40.4075209, -12.926996], [40.4075131, -12.9269912], [40.4075027, -12.9269865], [40.4074923, -12.9269818], [40.4074794, -12.9269826], [40.4074691, -12.9269806], [40.4074586, -12.9269758], [40.4074482, -12.9269738], [40.4074377, -12.926969], [40.4074272, -12.9269642], [40.4074193, -12.9269593], [40.4074088, -12.9269545], [40.4074032, -12.9269439], [40.4073925, -12.9269364], [40.4073844, -12.9269286], [40.4073763, -12.9269236], [40.4073631, -12.9269189], [40.4073525, -12.9269168], [40.4073417, -12.9269092], [40.4073386, -12.9268982], [40.4073381, -12.9268871], [40.4073373, -12.9268703], [40.4073366, -12.9268562], [40.4073359, -12.9268421], [40.4073352, -12.9268279], [40.4073347, -12.9268165], [40.4073263, -12.9268084], [40.4073178, -12.9267974], [40.4073067, -12.9267894], [40.4072983, -12.9267812], [40.4072948, -12.9267668], [40.407289, -12.9267583], [40.4072857, -12.9267467], [40.407277, -12.9267354], [40.4072684, -12.9267271], [40.407265, -12.9267154], [40.4072641, -12.9267004], [40.4072607, -12.9266886], [40.4072546, -12.9266769], [40.4072512, -12.926665], [40.4072424, -12.9266564], [40.4072312, -12.926651], [40.4072224, -12.9266424], [40.4072136, -12.9266337], [40.407205, -12.9266281], [40.4071989, -12.9266192], [40.407187, -12.9266076], [40.4071754, -12.926599], [40.4071692, -12.9265901], [40.4071662, -12.9265871], [40.4071512, -12.9265724], [40.4071392, -12.9265606], [40.4071271, -12.9265487], [40.4071152, -12.9265399], [40.4071064, -12.9265341], [40.4070997, -12.9265218], [40.4070931, -12.9265094], [40.4070839, -12.9265003], [40.4070772, -12.9264878], [40.4070651, -12.9264789], [40.4070561, -12.926473], [40.4070442, -12.9264672], [40.4070355, -12.9264645], [40.407023, -12.9264523], [40.4070133, -12.9264398], [40.4070041, -12.9264339], [40.4069944, -12.9264214], [40.4069877, -12.9264119], [40.4069782, -12.9264026], [40.4069712, -12.9263898], [40.4069616, -12.9263804], [40.406952, -12.9263711], [40.4069398, -12.9263652], [40.4069302, -12.9263558], [40.4069205, -12.9263463], [40.4069082, -12.9263404], [40.406896, -12.9263345], [40.4068862, -12.926325], [40.4068814, -12.9263082], [40.4068893, -12.9263007], [40.4069037, -12.9262997], [40.4069146, -12.926292], [40.4069254, -12.9262843], [40.4069367, -12.92628], [40.4069472, -12.9262688], [40.4069458, -12.926255], [40.4069356, -12.9262417], [40.4069257, -12.9262319], [40.4069184, -12.9262183], [40.4069114, -12.9262081], [40.4068988, -12.9262018], [40.4068917, -12.9261914], [40.4068787, -12.9261814], [40.4068636, -12.9261788], [40.406853, -12.926165], [40.4068454, -12.9261509], [40.4068347, -12.9261369], [40.4068245, -12.9261266], [40.4068117, -12.92612], [40.4068013, -12.9261096], [40.4067983, -12.9261098]]]}", - "est_area": 2 + "calc_area": 2 }, { "geojson": "{\"type\": \"Polygon\", \"coordinates\": [[[40.4054372, -12.9235332], [40.405487, -12.9235331], [40.4055256, -12.9235219], [40.4055534, -12.9235], [40.4055902, -12.9234671], [40.4056281, -12.923445], [40.4056651, -12.9234121], [40.405735, -12.923412], [40.405775, -12.9234119], [40.405835, -12.9234119], [40.4058849, -12.9234118], [40.4059258, -12.9234227], [40.4059491, -12.9234662], [40.4059542, -12.9235314], [40.4059658, -12.923553], [40.4059882, -12.9235854], [40.4060336, -12.9236608], [40.4060378, -12.9237149], [40.4060404, -12.9237472], [40.4060248, -12.9238008], [40.4060002, -12.9238649], [40.4059946, -12.9239182], [40.4059981, -12.9239608], [40.4059908, -12.9239926], [40.4059844, -12.9240348], [40.40597, -12.9241073], [40.4059624, -12.9241382], [40.4059669, -12.9242], [40.4059698, -12.9242411], [40.405963, -12.924282], [40.405966, -12.9243228], [40.4059697, -12.9243738], [40.4059741, -12.9244347], [40.405977, -12.9244752], [40.4059807, -12.9245257], [40.405985, -12.9245861], [40.4059879, -12.9246262], [40.4059923, -12.9246862], [40.4059959, -12.9247361], [40.4060091, -12.9247859], [40.4060305, -12.9248157], [40.4060539, -12.9248751], [40.4060663, -12.9249146], [40.4060691, -12.924954], [40.4060814, -12.9249933], [40.4060935, -12.9250323], [40.4061056, -12.9250712], [40.4061272, -12.92511], [40.4061291, -12.9251391], [40.4061519, -12.925197], [40.4061923, -12.9252355], [40.4062325, -12.925274], [40.4062538, -12.9253123], [40.4062751, -12.9253506], [40.4063057, -12.9253888], [40.406327, -12.925427], [40.4063578, -12.9254655], [40.4063799, -12.9255134], [40.4063918, -12.9255516], [40.4064132, -12.9255898], [40.4064238, -12.9256089], [40.4064463, -12.9256659], [40.4064586, -12.9257131], [40.4064704, -12.9257509], [40.4064816, -12.9257791], [40.4064933, -12.9258167], [40.4065149, -12.9258636], [40.4065172, -12.9259009], [40.40652, -12.9259473], [40.4065222, -12.9259843], [40.406496, -12.9260119], [40.4064699, -12.9260395], [40.4064444, -12.9260762], [40.4064086, -12.9260945], [40.4063728, -12.9261128], [40.4063464, -12.9261312], [40.4063201, -12.9261496], [40.4062741, -12.9261497], [40.406238, -12.9261589], [40.4062012, -12.9261589], [40.4061652, -12.9261681], [40.40611, -12.9261682], [40.4060733, -12.9261682], [40.4060472, -12.9261866], [40.4060012, -12.9261866], [40.4059553, -12.9261867], [40.4059362, -12.9261775], [40.4058963, -12.9261408], [40.4058563, -12.926104], [40.4058171, -12.9260764], [40.4057955, -12.9260395], [40.4057654, -12.9260118], [40.4056975, -12.9259748], [40.4056673, -12.925947], [40.4056261, -12.9259005], [40.4055957, -12.9258726], [40.4055729, -12.9258259], [40.4055619, -12.9258071], [40.4055288, -12.9257508], [40.4055235, -12.9256943], [40.4055192, -12.925647], [40.405525, -12.9256091], [40.4055402, -12.9255711], [40.4055453, -12.9255234], [40.4055513, -12.9254854], [40.4055472, -12.9254377], [40.4055447, -12.925409], [40.4055414, -12.9253707], [40.4055364, -12.9253131], [40.405533, -12.9252745], [40.4055194, -12.9252263], [40.4054989, -12.9252071], [40.4054569, -12.9251588], [40.4054259, -12.9251298], [40.4053855, -12.9251008], [40.4053734, -12.9250716], [40.4053509, -12.9250327], [40.405318, -12.9249839], [40.4053144, -12.9249446], [40.4053012, -12.9249053], [40.4052939, -12.9248263], [40.4052789, -12.9247668], [40.4052561, -12.9247272], [40.4052523, -12.9246873], [40.405239, -12.9246474], [40.4052152, -12.9245975], [40.4052018, -12.9245574], [40.4051893, -12.9245272], [40.4051749, -12.9244769], [40.4051903, -12.9244363], [40.4052164, -12.9244057], [40.4052434, -12.9243852], [40.4052792, -12.9243545], [40.405317, -12.924344], [40.405352, -12.924303], [40.4053677, -12.924262], [40.4053834, -12.9242209], [40.4053895, -12.9241798], [40.4053956, -12.9241386], [40.4054017, -12.9240972], [40.4053981, -12.9240559], [40.405404, -12.924014], [40.4054097, -12.9239719], [40.4054057, -12.9239297], [40.4054017, -12.9238874], [40.4053977, -12.923845], [40.4053936, -12.9238024], [40.4053896, -12.9237598], [40.4053845, -12.9237063], [40.4053835, -12.9236956], [40.4054059, -12.9236202], [40.4054216, -12.9235768], [40.4054372, -12.9235332]]]}", - "est_area": 1 + "calc_area": 1 } ] } diff --git a/database/seeders/PolygonValidationSeeder.php b/database/seeders/PolygonValidationSeeder.php index fbed7f03a..801330e33 100644 --- a/database/seeders/PolygonValidationSeeder.php +++ b/database/seeders/PolygonValidationSeeder.php @@ -32,7 +32,7 @@ public function run(): void $geometry = PolygonGeometry::factory()->geojson($geojsonString)->create(); SitePolygon::factory()->site($site)->geometry($geometry)->create([ - 'est_area' => $geometryDef['est_area'] ?? 0, + 'calc_area' => $geometryDef['calc_area'] ?? 0, ]); } } diff --git a/routes/api_v2.php b/routes/api_v2.php index 596e3016b..bea101aad 100644 --- a/routes/api_v2.php +++ b/routes/api_v2.php @@ -17,6 +17,7 @@ use App\Http\Controllers\V2\CoreTeamLeader\DeleteCoreTeamLeaderController; use App\Http\Controllers\V2\CoreTeamLeader\StoreCoreTeamLeaderController; use App\Http\Controllers\V2\CoreTeamLeader\UpdateCoreTeamLeaderController; +use App\Http\Controllers\V2\Dashboard\GetJobsCreatedController; use App\Http\Controllers\V2\Disturbances\DeleteDisturbanceController; use App\Http\Controllers\V2\Disturbances\GetDisturbancesForEntityController; use App\Http\Controllers\V2\Disturbances\StoreDisturbanceController; @@ -635,7 +636,7 @@ Route::put('/polygon/{uuid}', [TerrafundEditGeometryController::class, 'updateGeometry']); Route::put('/site-polygon/{uuid}', [TerrafundEditGeometryController::class, 'updateSitePolygon']); - Route::post('/site-polygon/{uuid}', [TerrafundEditGeometryController::class, 'createSitePolygon']); + Route::post('/site-polygon/{uuid}/{siteUuid}', [TerrafundEditGeometryController::class, 'createSitePolygon']); }); Route::get('/funding-programme', [FundingProgrammeController::class, 'index'])->middleware('i18n'); @@ -663,3 +664,7 @@ function () { Route::prefix('site-polygon')->group(function () { Route::get('/project/{uuid}', GetPolygonByProjectController::class); }); + +Route::prefix('dashboard')->group(function () { + Route::get('/jobs-created', GetJobsCreatedController::class); +});