Skip to main content

Understanding Virtual Layers


Boundaries are geographic bounding areas within which spatial analysis can occur using LiveBy API endpoints. You can learn more about our Boundaries in the Getting Started With The Boundaries API Endpoint Guide.

This document will explain the concept of a different kind of layer called Virtual Layers

What are Virtual Layers?

LiveBy has certain rules for creating boundaries that helps us organization our data and maximize quality control. For instance, boundaries of the same type can not overlap, a boundary can only be assigned to a single layer type, and a boundary can not be duplicated.

However, there are times when we it might make sense to combine boundaries with multiple layer types into a single category. We call these layers “virtual layers”. This allows us to organize many different layer types into a new category layer that is easier for you to query. Here are some examples of our virtual layers.

Municipality Virtual Layer

In our boundaries API, we have a “city” layer type. Boundaries labeled as “city” are city like boundaries, but are not necessarily municipalities that have governments, city councils, taxes, and a mayor.

To get only cities that have these attributes, we created the “municipality” virtual layer. It contains all the boundaries from the city layer that specifically have a government body that manages it.

Response Values for the “layer” Attribute

When making a request to our boundaries search endpoint, you can filter by layer type. You can also request more than one layer type at a time.

When we return the boundaries requested, one of the attributes we return is the “layer” of the boundary. This lets you know which boundaries have the layer types you requested.

When querying virtual layers, we always return the actual layer type of the boundary for this attribute. We do not return the name of the virtual layer in the type attribute.

Querying Virtual and Non-Virtual Layer Types Together

As stated above, we allow you to query multiple boundary types at once. This includes the ability to combine virtual layer types and non-virtual layer types. While this is possible, we do not recommend this, as there will be no way to determine if the boundary was included because of the virtual layer or the layer specified.