SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Visualize a Voronoi Cell Using a Scalable Vector Graphic

Learn how you can visualize edges and use Voronoi cells to check parameters in an area in your spatial data in SAP HANA Cloud, HANA database.

Overview

🎓 beginner 10 min. SAP HANA CloudBeginnerSAP HANA SpatialSAP HANA CloudSAP HANA DatabaseSAP HANA Multi Model Processing

You will learn

  • โœ”How to use filters to identify relevant areas of interest
  • โœ”How to create a Scalable Vector Graphic (SVG) to visualize the area of interest
  • โœ”How to use Voronoi cells to determine a suitable cycleway based on a criterion
Unknown U Unknown November 1, 2022
Created by July 14, 2021
Contributors

Prerequisites

Prerequisites

Steps

Intro

After you have identified a relevant area based on your starting and target locations, you will learn in this tutorial how you can check for certain parameters in that area. In this scenario, your plan is to go to the bar by bike. So, next you will check the suitability of the network for bike rides. You will learn how to visualize certain edges based on filter queries and how to use Voronoi cells. This includes three steps:

  • Identify cycleways within the area of interest
  • Create a Scalable Vector Graphic (SVG) to visualize Cycleways
  • Use Voronoi cells to determine a suitable cycleway

Step 1 Identify cycleways within the area of interest
โ€”

Your first step is to select edges with the property highway = cycleway in the previously identified area. In addition to the filter highway = cycleway, you need to check if both associated vertices are within the scope of our area of interest. If only one connected vertex is within the scope of your circle, this would mean that you would leave the area of interest by passing this edge (i.e. street). To avoid doing so, execute this statement:

SQL
SELECT le.*
FROM LONDON_EDGES le
JOIN LONDON_VERTICES u ON le.SOURCE = u."osmid"
JOIN LONDON_VERTICES v ON le.TARGET = v."osmid"
WHERE u.IN_SCOPE = 1 AND v.IN_SCOPE = 1 AND le."highway" = 'cycleway'

In the results, you will see all cycleways that fit the parameters in this query.

Step 2 Create a Scalable Vector Graphic to visualize cycleways
+
Step 3 Test yourself
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 3
1. Identify cycleways within the area of interest 2. Create a Scalable Vector Graphic to visualize cycleways 3. Test yourself

Learn more →