iTranslated by AI
re:Invent 2025: Reducing Driving Data Analysis Costs by 85% with Amazon Redshift Spatial and H3 Indexing
Introduction
By transcribing various overseas presentations into Japanese articles, we aim to make hidden, high-quality information more accessible. The presentation featured in this project, based on that concept, is as follows!
For transcription articles from re:Invent 2025, please check the information gathered in this Spreadsheet.
📖 re:Invent 2025: AWS re:Invent 2025 - High-performance NLP & geospatial analysis with Amazon Redshift (ANT334)
In this session, Ryan McMahon of Cambridge Mobile Telematics introduces efforts to improve road safety by leveraging driving behavior data. The company processes over 1 trillion data points daily and has expanded its business from individual driver risk analysis to road risk prediction. By aggregating hard-braking events, they are now able to proactively identify road problems that lead to crashes, such as obscured stop signs. Ravi from AWS explains the spatial capabilities of Amazon Redshift, demonstrating that the introduction of H3 hexagonal indexing in particular reduces compute processing by 98% and Redshift costs by up to 85% compared to conventional spatial queries. Furthermore, it is highlighted that the integration of Amazon Query Editor v2 and Amazon Q for SQL enables querying in plain language using natural language processing, allowing even non-SQL experts to perform advanced spatial analysis.
Note: This article is automatically generated while maintaining the content of the original presentation as much as possible. Please be aware that there may be typos or incorrect information.
Main Content
Cambridge Mobile Telematics' Challenge in Road Risk Analysis: Shifting from Individual to Geospatial Data
Thank you. I am Ryan McMahon from Cambridge Mobile Telematics. We are a technology company that measures driving behavior, and our mission is to make the world's roads and drivers safer. We achieve this by identifying and understanding the risks that lead to crashes, and by understanding what risks contribute to those crashes. Our core mission is to help identify how to prevent them. We achieve this by understanding and identifying a massive number of sensors and processing that information on AWS.
For most of the company's history, our work has been used on a one-on-one, individual basis. In other words, individual drivers are measured, and that information is processed and returned to them. We also detect crashes and respond to them. Over time, the data has become increasingly complex because we have been collecting data from sensors that have come online throughout the company's history. We started with feature phones and moved to smartphones. We use our own proprietary tags that we manufacture ourselves, and we are expanding to other sensor platforms. Today, all information is processed on AWS, but it has been processed and used for individual drivers.
The reason we do this is to identify and understand those fundamental risks so that we don't reach the top of the pyramid. The top of the pyramid represents road fatalities. Unfortunately, more than 40,000 people die on the roads in the U.S. every year. Beyond that, more than 1 million people die globally, and we are a global company. For 15 years, our focus has been on individual drivers.
This session is about geospatial, and you might wonder how these two things are related. What happened was that we started researching this topic and began to identify things beyond the risk of individual drivers. We started to identify many features beyond individual drivers because, when it comes to crash risk, it is not just individual drivers that lead to negative outcomes, injuries, and deaths. In fact, vehicles play a major role, and so do roads. We expanded significantly into understanding road risk.
The goal is to predict and identify where crashes will occur. If we can simply identify where serious injury crashes will happen and address the problems there, we can eliminate those fatal crashes. But the reality is that individual crashes, while each sadly leading to injury or death, are not in themselves predictive of where the next fatal or injury crash will occur. So, we need to identify the underlying features. What leads to the risks that point us to where a crash will occur?
This is where AWS played a huge role for us. We process a massive amount of data every day. We have over 1 trillion data points coming in. A problem arose when we wanted to move to road risk. For individual drivers, processing is important, but from a geospatial perspective, it's not at the same scale. Therefore, we needed to take it two steps further to get to the point of identifying these problems. This is what we built.
This is an example from roads in Arkansas. I recently presented at the Arkansas Safety Summit, and the DOT director, Jared Wiley, invited me to present. This is one of the data points I showed at that time. It is an aggregation of hard-braking events that occurred over a three-month period. When you look at the aggregation of these events and start digging deeply, it becomes clear. We didn't identify this problem from images; we identified it from human behavior. However, when you look at the image, it becomes very clear that the stop sign is obscured. There are many branches and trees blocking stop signs all over the world. However, how many places can we identify the risk by pinpointing the specific spots where human behavior is concentrated and aggregated?
The challenge is how to display it on a map that is useful for DOTs, highway safety offices, and EMS when we have all the information to identify the behaviors that lead to crash risk and aggregate them. It is so that we can mitigate risks as they occur. In truth, the question was whether we should use road segments. We could take all the information and load it into existing mapping coordinates. We decided to use H3 hexes. But the problem was that at that time, AWS did not support taking that data and moving it to H3 hexes.
This is truly what AWS was able to achieve. It is providing us with the information we need to take all the information and identify it at a massive scale. Now, we are loading over 5 billion records into the system every day. The system is open, and we can do things like this.
This is a stop sign in Washington D.C. I actually went there and took this photo. It's the same problem. Exactly the same problem. You can see that there is a stop sign isolated by a tree. What is happening is that people are having near-miss collisions. The way these problems are solved today, if you are a DOT or a highway safety office, is to wait until something bad happens. Because, unfortunately, the currency of risk today is the collision itself. We are moving two steps beyond that.
If AWS did not have these capabilities, we wouldn't have been able to distill the massive research we have already done on risk identification into an easy-to-use solution. In short, this is like Zillow for road safety. From a mapping perspective, it is about how to identify risk, understand it, and make it applicable around the world. This is a very large-scale effort to identify these behavioral patterns and, ultimately, be able to move further down the pyramid. From a technical perspective, if it weren't for the partnership with AWS 18 months ago, we couldn't have done this. This partnership is what led to this development. I am truly impressed with what we have achieved.
Innovation in Processing with Amazon Redshift Spatial's Spatial Capabilities and H3 Indexing
To talk more about moving further down the pyramid and how we achieved that technically, I would like to pass the baton to Ravi at AWS. Redshift has been on a path to incorporate spatial capabilities into a cloud data warehouse. We have been on this path for 7 or 8 years and are currently quite far along. The key point that Cambridge Mobile Telematics built into the StreetVision platform is using spatial data and Redshift's spatial query capabilities together. You don't need to learn anything new. Everything is done in SQL. It has all the spatial functions, and the new features I plan to talk about include H3 functions, which are hierarchical hexagonal indexes. This is an open-source initiative that started at Uber. From a spatial performance perspective, this is a giant leap.
So, let's answer the question on your minds: Why Redshift Spatial? You have likely heard of Amazon Redshift. It is one of the first cloud-native data warehouses, released almost 14 years ago. The reason is very simple. Redshift has an architecture suitable for massively parallel processing (MPP) from the start. It is the first cloud data warehouse built on an MPP architecture and can process petabyte-scale data while working with columnar data. You get all the benefits of columnar data. You get vectorized scans for highly efficient query processing for read queries. This is very suitable for petabyte-scale spatial data.
The amount of data that Cambridge Mobile Telematics has to handle is enormous. It's on a petabyte scale. Combine this with the high precision and numerical accuracy robustness of our spatial implementation. Whether it is WGS84 or SRS standards for implementing spatial projections on ellipsoidal earth models, and leveraging all the features we continuously add to our spatial portfolio. The latest one is H3 functions. Those familiar with the PostGIS library are likely already familiar with some of the spatial features of databases like Postgres. We follow the same syntax and similar functional equivalence. When we first started this, we launched GEOMETRY as a first-class data type in Redshift. A few years later, we also added GEOGRAPHY.
Geometry is designed for two-dimensional, non-geoid-based coordinates, i.e., short-distance, non-latitude/longitude-based systems, and is used when numerical precision of projections and geography data types is not needed. By using GEOGRAPHY and GEOMETRY together as native first-class data types in Redshift, you get a foundation for processing all spatial data within Redshift. There are now over 100 spatial functions implemented natively in Redshift. The latest one is H3, which I will explain shortly.
This is what it feels like when you run a sample query in Redshift. Just like any other cloud data warehouse, you create a table, load spatial data, and execute queries using SQL. You can use all 100+ built-in spatial functions mentioned earlier. Now you have spatial analysis capabilities. You can combine spatial and non-spatial data types just like anything else. This is now standard in many cloud data warehouses, but Redshift truly excels at processing spatial data due to its architecture for extremely high performance.
What is special about these spatial functions is that you can create visualizations like this. What you see here is a map of Berlin. Let's say we have a table called "Accommodations" that contains the coordinates of all hotels within that polygon. The small cloud you see is the parameters of the polygon. The query here shows "find all hotels within that polygon." You send a shapefile, extract the latitude and longitude, and use a standard SQL query. That's it. You get a list of all hotels. This is a simple query, but think of it as a building block for scale processing. You might process millions of records in a minute or a second.
We support various spatial formats, including shapefiles, WKT (well-known text), WKB (well-known binary), extended versions of these formats, and GeoJSON. There is quite a bit of flexibility regarding reading and writing spatial data formats. This is a sample of over 100 functions, and it is continuously increasing. What is highlighted in yellow or orange are the ones recently added. Starting with the five functions most needed for the Street Vision application, there are several more H3 functions scheduled to be introduced.
So, what is H3? H3 is a hexagonal hierarchical indexing system. The problem with traditional query methods is that you have a polygon, define parameters, and want to find points within that polygon, or there are other variations. For an SQL engine, this can be complex, costly, and can result in an exponentially huge Cartesian product, potentially slowing down processing. With H3 indexing, you have pre-calculated indexes of location information. The index of each cell is the location information itself, and you can choose the resolution of interest. There are 16 levels from 0 to 15, and you can choose the resolution you need. Lookups are extremely fast.
To see how fast it is, here is a comparison. Compared to traditional methods, you can reduce compute processing by 98 percent with the new lookup method. This shows other resources regarding memory, CPU time, and query response time. H3 is a game changer for spatial lookups when scaling.
By simply using H3, you can reduce Amazon Redshift costs by up to 85%.
Integration of Query Editor and Generative SQL for Natural Language Processing
Some of you may be wondering how this fits into the Street Vision platform and CMT's NLP capabilities that Ryan was talking about. It is integrated through Query Editor. Amazon Redshift has our SQL interface called Query Editor, which continues to grow in functionality. It currently supports Jupyter-style notebooks for SQL. It is fully integrated with Amazon Q for SQL, and Amazon Q for SQL is integrated with all the models that Amazon can access, both models developed by Amazon and third-party models. This allows even those who are not SQL experts to utilize SQL data warehouses like Amazon Redshift using plain text and natural language processing.
The biggest advantage is that Amazon Query Editor v2 is fully integrated with the Amazon Redshift cloud data warehouse. It has full context of query history, metadata, and schema. It performs schema crawling, understands what you are trying to query, figures out the necessary tables and columns, and understands exactly what you are looking for from query history. This is a big difference. Other query tools in the AWS portfolio, such as QuickSight, are also building this integration with Redshift.
Finally, there is Generative SQL. When translating plain natural language to SQL, the intent of the query becomes the generative part. It doesn't just look at history, it also guesses the intent. The reason this is a real game changer is that you can perform predictive queries. There is a feature to edit in the notebook. A query is generated, and you can either execute it as is or edit and submit it. This is one of the biggest advantages of the Generative SQL integration.
The biggest advantage is that it understands the schema context, table and layout, and history. Combining these two is the real big difference. When you use third-party BI tools, you lose some of that context because you don't have the level of integration that we have with our own metadata and Redshift metadata. This is the real differentiator.
Thank you for your time today. We still have a little time, so I would like to take your questions. I will answer questions from Adrian or Ryan of Cambridge Mobile Telematics, or myself from the Amazon Analytics team. Please feel free to ask if you have any questions. Thank you for joining us today.
Note: This article is automatically created using Amazon Bedrock while maintaining the information from the original video as much as possible.




























Discussion