Draw a radius

How to draw a radius?


In some cases it can be useful to draw a radius around a point. A valuable function that can be used to visualize for example the catchment area for your business, but it can also visualize contamination areas. When you have uploaded your point data (with latitude and longitude values), the Spotzi Mapbuilder makes it possible to draw a radius around these points.

You can do this by setting Marker Fill in the Spotzi Mapbuilder. However, in that case the circle won’t scale when you zoom out. That means that you can’t see the exact radius distance on the map. In order to scale your radius, you need to write a SQL update command in the SQL query box. This is quite easy, also if you don’t have any experience with SQL. We will explain this step by step.

Drawing a radius without SQL?
Did you know that you can also draw a radius on a map with the buffer functionality of the Spotzi GIS App? This makes it possible to draw a radius on the map without using any difficult SQL queriess.

Draw a Radius on a Map

With SQL it is possible to change your point into a radius circle and to set an exact radius distance that will be scaled based to a specific zoom level. You are able to create a perfect circle in meters by drawing a point first.

1. Go to the dataset with the data that draws your point on the map. Open the SQL menu and type in the following command*:

UPDATE table_name SET the_geom = ST_Buffer(the_geom::geography, radius_distance_in_meters)::geometry

*When you apply this query to your data table, your point will change into a polygon.

In this example, we will change the point to a circle with a radius of 10 km (10000 m). To generate this radius, the query will look like this:

UPDATE my_map SET the_geom = ST_Buffer(the_geom::geography, 10000)::geometry

Draw a Radius on a Map

2. Now open your map. You will see that your point became a polygon with a radius of 10 km.

Draw a Radius on a Map