Closed sirex closed 1 year ago
Kadangi duomenų kiekiai gali būti dideli, tai agregavimas bus daromas Saugyklos pusėje, kuo labiau pritraukiamas žemėlapis, daromas nauja užklausa į Saugyklą ir gaunami tikslesni duomenys, su mažesnėmis grupėmis. -- https://github.com/atviriduomenys/katalogas/issues/339
It looks, that this part was forgotten. We need to add bbox(xmin, ymin, xmax, ymax)
, to show summary only within specified bounding box.
The issue is related to incorrect database schema:
The idea is to provide summarized data for geometry types, that can be easily displayed on the map.
Basically we need to calculate centroids of each geometry object and create clusters. This is needed, because the can be large number of objects, and we don't want to load all the data into map.
This function should accept bounding box to select data from and return up do 100 objects of clusters. If an object is not in any cluster, then it should be returned as individual object.
We can return data like this:
Here, we call
:summary
endpoint is called withgeom
argument, which is a property ofCity
model. This call should return up to 100 records ofgeom
centroids, clustered into clusters if needed.When cluster consists only of one object, we should also include
_id
in order to provide link to the object directly.Resources