Visualize points and routes with GeoJSON in Amazon Quick Sight layer maps

Amazon QuickSight layer maps now support Point and LineString GeoJSON geometries, letting you plot individual locations and routes alongside traditional polygon layers.

Visualize points and routes with GeoJSON in Amazon Quick Sight layer maps

Visualizing Points and Routes with GeoJSON in Amazon QuickSight Layer Maps

Amazon QuickSight’s layer‑map visual has evolved beyond static polygon shapes. By adding Point and LineString geometry types to the existing GeoJSON workflow, you can now display individual locations—such as stores or facilities—and trace routes—like delivery paths or flight tracks—directly on an interactive map. This guide walks through the required data structures, configuration steps, and best‑practice tips for getting the most out of these new capabilities.

---

1. Preparing Your Data

GeoJSON File

  • Format – Must be a valid `.geojson` file, ≤ 100 MB.
  • Structure – A `FeatureCollection` containing an array of `Feature` objects. Each feature includes:

`geometry.type` – `Point` or `LineString`. `geometry.coordinates` – `[longitude, latitude]` for points; an ordered list of such pairs for lines. `properties` – Holds a join key* that matches a column in your QuickSight dataset.

```json { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "type": "Point", "coordinates": [-73.9490, 40.7447] }, "properties": { "storeid": "S-109" } }, { "type": "Feature", "geometry": { "type": "LineString", "coordinates": [ [-73.7781, 40.6413], [-118.4085, 33.9416] ] }, "properties": { "routeid": "JFK-LAX" } } ] } ```

QuickSight Dataset

Create a dataset that contains the metrics you want to display (e.g., sales, flight count) and a key column that matches the `properties` field in the GeoJSON. The dataset can include additional dimensions for color, size, or tooltip enrichment.

---

2. Configuring the Layer‑Map Visual

  1. Add a Layer Map to your dashboard and select the GeoJSON file as the shape source.
  2. Choose Geometry Type – QuickSight renders only one geometry type per layer. Pick Points to show locations or Lines to draw routes.
  3. Map the Join Key – Align the Shape file key (e.g., `store_id`) with the Dataset key field. Values must match exactly; field names can differ.
  4. Encode Metrics – Use dataset fields to drive visual attributes:

Color – Group lines or points by category (carrier, store type). Size/Width – Emphasize high‑volume routes or high‑traffic stores. Opacity* – Reduce visual clutter when many features overlap.

  1. Tooltips – Add any dataset columns you want to appear when a user hovers over a point or line.

---

3. When to Use Points vs. Lines

| Use‑Case | Geometry | Why Choose It | |----------|----------|---------------| | Retail footprint | Point | Shows exact store locations; easy to overlay sales metrics per store. | | Delivery network | LineString | Highlights the path between origin and destination, revealing route efficiency or bottlenecks. | | Flight or shipping lanes | LineString | Communicates directional flow and distance; can be colored by airline or cargo type. | | Mixed analysis | Separate layers | Create one layer for points (e.g., warehouses) and another for lines (e.g., routes) to keep the map readable. |

---

4. Advanced Techniques

Controlling the Viewport

  • Use the Fit to data option to automatically zoom to the extents of your GeoJSON features.
  • Manually set the initial latitude, longitude, and zoom level for a consistent user experience.

Layer Ordering

  • Stack multiple layer maps—e.g., a polygon layer for sales territories beneath a point layer for stores—to provide context without obscuring details.

Programmatic Updates

  • Store your GeoJSON in Amazon S3 and reference it via a URL. Updating the file in S3 automatically refreshes the map on the next dashboard reload, enabling near‑real‑time route changes.

---

5. Practical Tips

  • Keep files lean – Large GeoJSON files increase load time. Split massive datasets into logical chunks (e.g., by region) and load only the needed layer.
  • Validate geometry – Use tools like `geojsonlint` to catch malformed coordinates before uploading.
  • Consistent CRS – QuickSight expects WGS‑84 (EPSG:4326). Ensure your coordinates are in longitude‑latitude order.
  • Test joins – A quick preview of the layer map with a small sample helps verify that the join key aligns correctly.

---

Closing Thoughts

By embracing Point and LineString geometries, QuickSight layer maps become a versatile canvas for location‑centric storytelling. Whether you’re visualizing a chain of retail stores, mapping delivery routes, or illustrating global flight paths, the same GeoJSON workflow applies—just swap the geometry type and adjust your dataset joins. With thoughtful data preparation and layer configuration, you can turn raw coordinates into actionable insights that surface patterns only a map can reveal.

Source

Read original source

Why we picked this

Core ML platform feature showing AI‑driven visualization tools

← Back to all articles