index.d.ts 905 B

1234567891011121314151617181920212223242526
  1. import { Geometry, GeoJsonProperties, Feature, FeatureCollection, BBox } from 'geojson';
  2. declare class RBush<G extends Geometry, P extends GeoJsonProperties> {
  3. insert(feature: Feature<G, P>): RBush<G, P>;
  4. load(features: FeatureCollection<G, P> | Feature<G, P>[]): RBush<G, P>;
  5. remove(
  6. feature: Feature<G, P>,
  7. equals?: (a: Feature<G, P>, b: Feature<G, P>) => boolean
  8. ): RBush<G, P>;
  9. clear(): RBush<G, P>;
  10. search(geojson: Feature | FeatureCollection | BBox): FeatureCollection<G, P>;
  11. all(): FeatureCollection<any>;
  12. collides(geosjon: Feature | FeatureCollection | BBox): boolean;
  13. toJSON(): any;
  14. fromJSON(data: any): RBush<G, P>;
  15. }
  16. /**
  17. * https://github.com/mourner/rbush
  18. */
  19. declare function geojsonRbush<
  20. G extends Geometry = Geometry,
  21. P extends GeoJsonProperties = GeoJsonProperties,
  22. >(maxEntries?: number): RBush<G, P>;
  23. export { geojsonRbush as default, geojsonRbush };