MapReveal™ Software

 View Only

Querying on MapReveal™ Software

  • 1.  Querying on MapReveal™ Software

    Employee
    Posted 07-22-2023 00:51

    In this article, I want to show you how you can run spatial queries and data queries on MapRevealTM Software. A query is a statement or logical expression which can be used to select or extract features that satisfy a given condition. Spatial queries allow selection or extraction of geographic features based on their location or the spatial relationship shared with other geographic features. 

    One feature I commonly use on MapRevealTM Software is Select By Location which allows me to examine spatial relationships between different layers and identify features that satisfy a 'spatial' condition. A common use case would be to identify target customers or competitor locations within a drive time isochrone around a point of interest.

    In this example, I have a hypothetical use case where an Event Management Company is scouting for ideal locations to host a promotional event in the Melbourne CBD area. Since there will be live performances, the event requires a venue that has outdoor seating along with a minimum capacity of 200 attendees. Also, since the company plans to promote the event outside the core CBD area, accessibility from the MRT system is a key factor.

    Now that the context is set, let's take a look at the data. I have a Point layer for all Cafes & Restaurants in the Melbourne CBD Area.

    The key attributes that I am looking for are 'seating_type' and 'number_of_seats'. In order to extract the potential locations that meet the 1st Criteria, I will use the Data Filter tool from the floating menu towards the bottom-right corner of the Map Sessions screen.

    This will open the Query Builder Modal and I can run a SQL-based query on my layer of interest.

    Once I select the layer of interest, the Field Selector gets populated with all the fields (attributes) from that layer. I can then use the search bar or the scroll bar to find - 'seating_type' and 'number_of_seats'. The 'Get Unique Values' button can be used to populate all the unique values. I can then validate and submit the following query:

    [seating_type = "Seats - Outdoor" AND number_of_seats >= 200]

    There's an option to save the query for future use as well. After hitting the Submit Query button, I can then save the output.

    MapRevealTM Software has now created a new layer containing the features that satisfy the 1st Criteria.

    Now to fulfill the 2nd Criteria, I can bring in the MRTS Melbourne data to evaluate how accessible these locations are from the Metro stations.

    In the next step, I want to create 500 m Buffer around these stations. I can use the Buffer Tool available under Vector Processing Tools in the Tools menu.

    Once the desired parameters are specified, I can save the Tool Output in the next step.

    The following snapshot shows the Buffer Tool output, once processed, has been added as a layer in the Layer Panel.

    In the next step, I want to extract those features from the 'Locations_Outdoor_200' layer that fall within the Buffer layer I just created. For this, I can use the Select By Location tool available under Spatial Query from the floating menu towards the bottom-right corner of the Map Sessions screen.

    From the Select By Location modal, I can specify the Input layer, the Spatial Relationship type and the Reference layer. Various Spatial Relationships (geometric predicates) are available to choose from depending on the use case requirements. These boolean functions determine the spatial relation a feature has with another by comparing whether and how their geometries share a portion of the space.

    So the spatial query that I'm trying to execute here is : Select Features from the 'Locations_Outdoor_200' layer that 'Are Within' the reference 'Buffer_MRTS_500m' layer.

    I can then save the Tool Output as 'Locations_Outdoor_200_Within500m'

    The output is then added as a layer in the layer panel. I can apply Styling and Add Labels accordingly from the Styling Panel. I can then share this analysis, either as a layer export or as a published web map, with the relevant teams to take it forward.

    I hope you found this useful. Do share your feedback/questions in the comments section.



    ------------------------------
    Anurag Hazarika
    Product Manager
    Precisely | Trust in Data

    ------------------------------