biodiversitydata-se / biocollect

Biocollect front end application for Bioatlas
https://biocollect.biodiversitydata.se/
Other
0 stars 0 forks source link

Coordinates errors for mittpunkt in punktrutter sites #225

Closed mathieuLU closed 1 year ago

mathieuLU commented 2 years ago

Some punktrutter have been created with wrong centroids.

All the sites created by the script https://github.com/Lund-University-Biodiversity-data/convert-sites-to-MongoDB/blob/master/punktrutter/punktrutter_convert_sites.py should be checked the file generated was punktrutter_upload.json, saved in ubuntu@ecodata-biodiv:~/data_import_sites/punktrutter_upload.json

If you open one site in BioCollect and resave it, the centroid is recalulated That's what I did to https://biocollect.biodiversitydata.se/sft/site/index/2f590994-805d-4865-abc9-e97f552db177 510524-1-06 - SONNEKULLA TDG

From punktrutter_upload.json, the centroid was : "extent": {"geometry": {"type": "Point", "coordinates": [5.596007818731513, 52.02139888351952], "decimalLongitude": 5.596007818731513, "decimalLatitude": 52.02139888351952, "areaKmSq": 0, "aream2": 0, "centre": [5.596007818731513, 52.02139888351952]},

now it's

"extent" : { "geometry" : { "type" : "Point", "coordinates" : [ 15.14881, 56.20373 ], "decimalLongitude" : 15.14881, "decimalLatitude" : 56.20373, "centre" : [ "15.14881", "56.20373" ] }, "source" : "Point" }

only after saving from BioCollect

mathieuLU commented 1 year ago

Problem solved. A couple of sites were totally off, because of the way the script calculated the centroid (different thann how BioCollect calculates it).