Introducing Felt SQL Queries for Spatial Analysis at Scale
Rachel Zack
,
Chief of Staff
•
Tuesday, January 14, 2025
In the race to derive insights from spatial data, teams need tools that work at scale. That's why we launched Felt SQL queries.
In the race to derive insights from spatial data, teams need tools that work at scale. That's why we launched Felt SQL queries.
Today we’re announcing a significant expansion of Felt's enterprise capabilities with the launch of SQL queries. Felt has always been the fastest way to build maps, apps and dashboards for organizations reliant on spatial insights, and now you can write custom queries to your database directly from Felt. Whether you are on the Engineering, GIS or Data Team – you can now efficiently deliver data across your organization with just a few lines of code.
Reduced time-to-insight: execute complex spatial analyses with SQL queries
Felt SQL queries eliminate the need for mutli-step GUI interactions, enabling you to efficiently query just the data you need directly from your cloud database. Run a simple operation, or execute complex spatial analysis across multiple data tables. Felt will complete your custom query, run it through our Upload Anything pipeline and return a performant data layer for the team to reference.
Felt handles all your operations, analysis, geocoding, and Tippecanoe tiling directly, avoiding expensive queries and the need to store geometries. Explore some of the operations you can now run with Felt SQL queries in the table below.
Example SQL Operations now Available
Spatial Operation
Definition
Code Example
ST_Intersects
Tests whether two geometries share any space in common. Returns true if geometries intersect, false otherwise. Used for identifying overlapping areas.
SELECT a.*, b.*
FROM service_areas a
JOIN market_zones b
ON ST_Intersects(a.geometry, b.geometry);
ST_Within
Tests whether one geometry is completely inside another. Returns true if the first geometry is completely within the second geometry.
SELECT a.name, b.name
FROM points a
JOIN polygons b
ON ST_Within(a.geometry, b.geometry);
ST_Buffer
Creates a new geometry that represents all points within a given distance from the input geometry. Useful for creating service areas or zones of influence.
SELECT
location_id,
ST_Buffer(geometry, 5000) as service_area
FROM distribution_centers;
ST_Centroid
Computes the geometric center (centroid) of a geometry. Returns a point that represents the average position of all points in the geometry.
SELECT
region_name,
ST_Centroid(geometry) as center_point
FROM service_regions;
ST_Distance
Calculates the shortest distance between two geometries. Returns the minimum distance between any two points in the two geometries.
SELECT
a.id, b.id,
ST_Distance(a.geometry, b.geometry) as distance
FROM points a
CROSS JOIN points b
WHERE a.id != b.id;
ST_Area
Calculates the area of a polygon geometry. Returns the area in the units of the spatial reference system.
SELECT
territory_id,
ST_Area(geometry::geography) as area_sqm
FROM market_territories;
ST_Length
Calculates the length of a linear geometry (linestring). Returns the length in the units of the spatial reference system.
SELECT
route_id,
ST_Length(geometry::geography) as length_meters
FROM delivery_routes;
ST_Union
Combines multiple geometries into a single geometry. Dissolves overlapping boundaries and creates a single continuous geometry.
SELECT
region_id,
ST_Union(geometry) as combined_geometry
FROM parcels
GROUP BY region_id;
ST_Intersection
Returns the geometry representing the shared portions of two geometries. Creates a new geometry containing only the overlapping areas.
SELECT
ST_Intersection(a.geometry, b.geometry) as overlap
FROM zone_a a
CROSS JOIN zone_b b;
ST_Transform
Transforms a geometry from one coordinate system to another. Used to convert between different spatial reference systems (SRS).
SELECT
id,
ST_Transform(geometry, 4326) as wgs84_geom
FROM locations;
ST_Envelope
Computes the minimum bounding rectangle that contains a geometry. Returns a rectangular polygon that completely encloses the input geometry.
SELECT
region_id,
ST_Envelope(ST_Collect(geometry)) as bbox
FROM market_regions
GROUP BY region_id;
ST_ConvexHull
Computes the smallest convex polygon that contains all points in a geometry. Creates a shape that represents the outer boundary of a set of points.
SELECT
cluster_id,
ST_ConvexHull(ST_Collect(geometry)) as boundary
FROM points
GROUP BY cluster_id;
ST_Contains
Tests whether one geometry completely contains another. Returns true if the second geometry is completely contained within the first geometry.
SELECT
points.*
FROM customer_points points
JOIN service_areas areas
ON ST_Contains(areas.geometry, points.geometry);
Workflow enhancements for enterprise-wide data utilization
Felt SQL queries deliver immediate value through seamless integration with your existing data infrastructure and the power of cloud-based collaboration. Plus, we've added a few enhancements to speed up data workflows across your organization:
Robust Cloud Database Compatibility: Native support for major cloud databases including BigQuery, Redshift, Databricks, Microsoft SQL Server, Snowflake, and PostGIS.
Real-time Data Synchronization: Optional live updates eliminate manual refresh cycles, ensuring teams always work with current data.
Recent Query Reference Windows: We've made it easy to create new layers that build off existing queries.
Direct-to-End-User Delivery: Because Felt is entirely on the web, your results can be shared instantly with your end users via a link.
These workflow enhancements ensure that anyone on the team can jump into a project and deliver results quickly.
Take the Next Step
Are you ready to transform your organization's spatial data capabilities? Start your enterprise trial today or connect with our solutions team to discuss your specific needs. Connect with our solutions team to discuss your specific needs. Book a demo here.
Book time with the team to learn how Felt can transform your organization's data workflows.