Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Summary for geometry type #451

Closed
sirex opened this issue May 19, 2023 · 2 comments · Fixed by #481
Closed

Summary for geometry type #451

sirex opened this issue May 19, 2023 · 2 comments · Fixed by #481

Comments

@sirex
Copy link
Collaborator

sirex commented May 19, 2023

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:

http GET /datasets/gov/example/City/:summary/geom
{
    "_data": [
        {
            "_type": "datasets/gov/example/City/:summary/geom",
            "centroid": "POINT (1 2)",
            "cluster": 100
        },
        {
            "_type": "datasets/gov/example/City/:summary/geom",
            "_id": "dcffa0c0-421b-4d0b-ac6f-1b4a9df9b47c",
            "centroid": "POINT (3 4)",
            "cluster": 1
        }
    ]
}

Here, we call :summary endpoint is called with geom argument, which is a property of City model. This call should return up to 100 records of geom 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

@sirex sirex added the pycon label May 19, 2023
@sirex sirex removed the pycon label May 20, 2023
@sirex sirex moved this to 📋 Backlog in PyConLT 2023 Sprint May 20, 2023
@sirex sirex moved this from 📋 Backlog to 🔖 Ready in PyConLT 2023 Sprint May 20, 2023
@adp-atea adp-atea moved this to In Progress in Portalo plėtra Jun 20, 2023
@adp-atea adp-atea linked a pull request Jun 20, 2023 that will close this issue
@adp-atea adp-atea moved this from In Progress to Review in Portalo plėtra Jun 20, 2023
@sirex sirex moved this from Review to Deploy in Portalo plėtra Aug 3, 2023
@github-project-automation github-project-automation bot moved this from Deploy to Done in Portalo plėtra Aug 4, 2023
@adp-atea adp-atea moved this from Done to Deploy in Portalo plėtra Aug 4, 2023
@sirex sirex moved this from Deploy to Done in Portalo plėtra Aug 18, 2023
@sirex
Copy link
Collaborator Author

sirex commented Oct 9, 2023

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.
-- atviriduomenys/katalogas#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.

@sirex sirex reopened this Oct 9, 2023
@sirex sirex moved this from Done to Todo in Portalo plėtra Oct 9, 2023
@sirex sirex moved this from Todo to Done in Portalo plėtra Oct 10, 2023
@sirex
Copy link
Collaborator Author

sirex commented Oct 10, 2023

The issue is related to incorrect database schema:

@sirex sirex closed this as completed Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant