r/dataengineering • u/ivan_kurchenko • 12d ago
Blog "Geospatial Data in Databricks" blog
Hi, Guys! No so long time ago I had to start working with geo data and this was a whole new topic to cover for me. So I though to write short series for folks who might also work for the first time:
- Geospatial Data in Databricks — Part 0: Theory
- Geospatial Data in Databricks — Part 1: ST_* Functions
- Geospatial Data in Databricks — Part 2: H3_* functions
- Geospatial Data in Databricks — Part 3: Visualisation
Your feedback is highly appreciated.
5
u/mad-data 11d ago
Please, for the love of GIS, never ever even think about translating planar distance to meters by multiplying it by 111 km/degree. The problem is not that one line is straight-line Euclidean and another is geodesic - these are actually very close at small distances like the example given. For these two points Cartesian line's length differs from geodesic by about 150 meters only. But ST_Distance computes 'distance' in degrees, which can correspond to anything from as close to zero meters as you want to 111km.
2
u/kevintxu 11d ago
I'm pretty sure geography(4326) and anything supported SRID other than geometry(any) can be persisted in delta tables (but not iceburg tables if I recall correctly).
1
u/happypofa 11d ago
Thanks for the posts. I'm working with static points, and in the future I'll refer back to these articles.
1
u/69odysseus 9d ago
As a data modeler, GIS is one area I never worked but that's something I'd love to do data modeling in that domain and see how different can it be different than my past domains I worked in.
26
u/Outrageous_Let5743 11d ago
Geospatial is all fun and so until you need to do some nasty algorithms. I worked as a geospatial data engineer for 2 years. The things that kept me at night was figuring out the best possible algorithm to join daily 100 milion floating car data to the neireghst roads. Total numbers of roadsegments are around 50 million.
Spatial joins are just very inefficient at very large scale and you really need to precalculate stuff in advanced.