Home / Companies / Carto / Blog / Post Details
Content Deep Dive

Bulk Nearest Neighbor using Lateral Joins

Blog post from Carto

Post Details
Company
Date Published
Author
CARTO Contributors
Word Count
571
Company Posts That Month
9
Language
English
Hacker News Points
-
Post removed?
No
Summary

The post discusses how to perform bulk nearest neighbor queries using CartoDB, a geographic information system (GIS) platform. To achieve this, the author uses a lateral join, which allows for iterating a PostGIS ordering operation once for each input row. The query calculates the distance between each parcel and its nearest fire hydrant by performing a geography type calculation on the spheroid. The resulting map is colored according to the distance, providing an attractive visualization of parcels by their proximity to fire hydrants. However, the author notes that this approach may not be suitable for large datasets due to performance limitations.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Real-time 1 100 47 23 -41%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.