Adding geospatial conditions to a Visual Query

When records contain geospatial properties, you can define a Visual Query that locates records based on a search area in i2 Maps.

About this task

When you use i2 Maps as your map provider in Analyst's Notebook, you can define a search area by drawing a rectangle or polygon on your base map. You can also define a specific area, district, or region by using GeoJSON data from other applications.

For example, an Address record is likely to have properties such as Street Name, City, and ZIP Code. But it might also have a geospatial property that contains the latitude and longitude of the address. When you create a Visual Query, you can add a geospatial condition to a query item to search for addresses that are located within a specific area.

To get started, define the structure of your Visual Query in the usual way. You can add geospatial conditions to any query entity whose item type has a geospatial property type.

Procedure

  • To create a search area using Maps:
    1. In the Query conditions pane of your Visual Query, click the plus icon Add condition button next to the entity you want to add the condition to.
      The Add conditions window opens.
    2. Select a property type that stores geospatial data and click OK.
    3. To edit the geospatial area, click the geo button icon.
      The Edit search area window opens and displays the Map view. You can zoom in and out, and pan to different parts of the map.
    4. Optional: Click Options to see the base maps and overlay elements that are configured for your deployment.
    5. To draw a shape on the map, click either the polygon icon or the rectangle icon.
      Polygon Click to insert the first point, then click to add more points. Click on the first point again or the Finish option to complete the polygon.
      Rectangle Drag over the area and release the mouse button to complete the rectangle.
    6. Use the Edit shapes or Delete shapes options to make changes if required.
      Note:
      When you draw a shape on the map, Analyst's Notebook calculates the GeoJSON coordinates and the feature collection object in the GeoJSON window.
    7. Click OK when you have finished drawing and editing your search area.
      The Edit search area window closes and a thumbnail graphic is displayed next to the property.
    8. Optional: Click the Actions icon geo button to add or remove geographic locations.
  • To create a search area using GeoJSON data:
    1. To edit the geospatial area, click the geo button icon and click GeoJSON to change the search area from Map.
    2. Paste or enter a GeoJSON feature collection object into the text area.
    3. Click Map to view your GeoJSON data on the map, or OK to return to Query conditions.
      A thumbnail graphic of the map view with an outline of your GeoJSON area is displayed next to the property.
    4. Optional: Click the Actions icon geo button to add or remove geographic locations.