Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Missing points when bounds are scoped to the extent of points

Aperta
#234 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

  • #261 di @spokodev — chiusa senza merge

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript
Ambito
data

Direzione di ricerca

Inizia con la riproduzione collegata di CodeSandbox e traccia il modo in cui Supercluster gestisce il bbox i cui angoli sud-ovest e nord-est sono coordinate di punti. Esamina la query del bbox e il comportamento del clustering intorno ai punti di confine, quindi aggiungi un controllo di regressione che dimostri che i punti riprodotti vengono considerati in modo coerente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

question

I've noticed this (inconsistently) on several occasions: when the bounds that are used to create the bbox sent to Supercluster are created by iterating over them and extending the bounds to each point's geometry, sometimes points get left out. I have a working CodeSandbox to reproduce this: https://codesandbox.io/s/supercluster-points-8kqttt.

In this example, the points are:

const features = [
  {
    type: "Feature",
    properties: {
      isUser: true,
      userId: "5"
    },
    geometry: {
      type: "Point",
      coordinates: [-123.211605, 43.972615]
    }
  },
  {
    type: "Feature",
    properties: {
      isUser: true,
      userId: "3"
    },
    geometry: {
      type: "Point",
      coordinates: [-123.245515, 43.9150233333333]
    }
  },
  {
    type: "Feature",
    properties: {
      isUser: true,
      userId: "16"
    },
    geometry: {
      type: "Point",
      coordinates: [-123.192528333333, 44.0307166666667]
    }
  },
  {
    type: "Feature",
    properties: {
      state: "old",
      userId: "8"
    },
    geometry: {
      type: "Point",
      coordinates: [-123.194573333333, 44.0107]
    }
  }
];

The bbox that gets passed to supercluster ends up being [-123.245515, 43.9150233333333, -123.192528333333, 44.0307166666667]. The point that gets left out (ie not contained within a cluster, but not returned as an individual point either) has the coordinates [-123.245515, 43.9150233333333], which represents the southwest corner of the bbox. It would make more sense to me if both that and the point with userId: "16" were both left out, since point 16 represents the northeast corner of the bbox, but point 16 is consistently returned.

This is definitely an edge case (literally, on the edge of the bounding box, get it...), but I'm curious to understand what's going on.

Lingua principale
JavaScript
Stelle
2.4k
Fork
303
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di mapbox/supercluster

Tutte le issue di mapbox/supercluster

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.