A version of this article was originally penned for the April 2007 edition of the DeLorme Professional Newsletter. When it was suggested that we include an updated revision for the June 2009 edition, it transpired that most of the original content still applies. So, with apologies to long-time subscribers, the following article is recycled.
The query function, which is included in both the Enterprise and Editor versions of XMap, offers both attribute and spatial querying. Queries are used to quickly identify specific records in your data and to uncover the spatial relationship between objects within different data layers. Note that queries that have been built using Enterprise or Editor are transferred with the corresponding openspace layer or through the synchronization process to users of XMap Professional. However XMap Professional cannot be used to create a query.
Read More…
A query is built by following a few simple steps:
1. After clicking the Query button on the left side of the GIS tab, select the layer to be queried from the Layer drop-down list.
2. Choose an attribute to query by clicking the cell immediately below the Attribute column heading. A drop-down list shows all of the attribute fields for that layer.
Note that the first item on the list is GEOMETRY. Select this option if you are creating a spatial query. This process will be discussed in greater detail below.
3. After selecting an attribute field, select the query Operator from the drop-down list in the adjacent cell. Depending on the data type, query operators may include “CONTAINS”, “IS EMPTY”, <, and =, among others. For instance, a query to find property owners by name within a parcel layer will be set up as follows:
Layer: Tax Parcels, Attribute: Owner, Operator: EQUALS
4. In the next cell, type or select the search criteria, which will reflect the name or value being sought. A drop-down list will offer a sample of the values that are present within the selected attribute field.
Optionally, select the User Input check box and leave the Criteria field blank, which allows unique query criteria to be entered each time the query is run. This function is particularly useful when sharing a layer with a user of XMap Professional either through an openspace file transfer or using the synchronization process as it allows them to customize the search parameters.
5. Use the Logical Operator option to build a more complex query by establishing multiple search criteria either on the same field or on different fields within the layer. For instance, by choosing the AND option, an additional line can be added that further filters the query results. The parcel query might then read like this:
Attribute: Owner, Operator: EQUALS, Criteria: Smith, Logical Operator: AND
Attribute: Value, Operator: > Criteria: 100000
In this case the query would return a list of all of the properties owned by someone named Smith that have a value of grater than $100,000. Additional lines can be added to a query as needed.
The process of building a spatial or geographic query is similar to building an attribute query. Selecting GEOMETRY from the Attribute list, as noted above, offers a unique list of query operators including, “IS CONTAINED BY”, “INTERSECTS”, and “WITHIN A DISTANCE OF”, as well as their inverses. This allows a subset of objects within a layer to be generated based on their spatial relationship to objects in another layer or based on a determined distance from a selected location or from the map center.
A powerful search option is to create a query that is a combination of both spatial and attribute query criteria. Using the parcel example again, the query could be built as follows:
Attribute: Owner, Operator: EQUALS, Criteria: Smith, Logical Operator: AND
Attribute: Value, Operator: > Criteria: 100000, Logical Operator: AND
Attribute: GEOMETRY, Operator: IS CONTAINED BY, Criteria: City School District
In this example the query results would be further limited to those that fall with the City School District polygon as delineated in a second openspace layer.
It is common for the spatial query function to be used in conjunction with XMap’s buffer tool. A buffer is polygon of a user-specified radius created around an object or group of objects within a layer. The Buffer dialog box, which is accessed by clicking the Tools button in the Workspace, offers the option to create buffer areas around all objects in a layer or just those that have been selected or queried.
As an example of the combined use of the buffer and spatial query tools, a pipeline manager can create a map and generate a list of properties that fall within a mile of his pipeline. To accomplish this he would first create his one-mile buffer polygon then build a spatial query as noted above using IS CONTAINED BY as the operator and the newly created buffer layer as the criteria.
The query function is one of the fundamental data management tools within any GIS. In XMap, the combination of buffering, attribute and spatial querying provides an efficient and effective way to filter or highlight critical objects within a layer.
A version of this article was originally penned for the April 2007 edition of the DeLorme Professional Newsletter. When it was suggested that we include an updated revision for the June 2009 edition, it transpired that most of the original content still applies. So, with apologies to long-time subscribers, the following article is recycled.
The query function, which is included in both the Enterprise and Editor versions of XMap, offers both attribute and spatial querying. Queries are used to quickly identify specific records in your data and to uncover the spatial relationship between objects within different data layers. Note that queries that have been built using Enterprise or Editor are transferred with the corresponding openspace layer or through the synchronization process to users of XMap Professional. However XMap Professional cannot be used to create a query.

A query is built by following a few simple steps:
- After clicking the Query button on the left side of the GIS tab, select the layer to be queried from the Layer drop-down list.
- Choose an attribute to query by clicking the cell immediately below the Attribute column heading. A drop-down list shows all of the attribute fields for that layer.
Note that the first item on the list is GEOMETRY. Select this option if you are creating a spatial query. This process will be discussed in greater detail below.
- After selecting an attribute field, select the query Operator from the drop-down list in the adjacent cell. Depending on the data type, query operators may include “CONTAINS”, “IS EMPTY”, <, and =, among others. For instance, a query to find property owners by name within a parcel layer will be set up as follows:
Layer: Tax Parcels, Attribute: Owner, Operator: EQUALS
- In the next cell, type or select the search criteria, which will reflect the name or value being sought. A drop-down list will offer a sample of the values that are present within the selected attribute field.
Optionally, select the User Input check box and leave the Criteria field blank, which allows unique query criteria to be entered each time the query is run. This function is particularly useful when sharing a layer with a user of XMap Professional either through an openspace file transfer or using the synchronization process as it allows them to customize the search parameters.
- Use the Logical Operator option to build a more complex query by establishing multiple search criteria either on the same field or on different fields within the layer. For instance, by choosing the AND option, an additional line can be added that further filters the query results. The parcel query might then read like this:
Attribute: Owner, Operator: EQUALS, Criteria: Smith, Logical Operator: AND
Attribute: Value, Operator: > Criteria: 100000
In this case the query would return a list of all of the properties owned by someone named Smith that have a value of greater than $100,000. Additional lines can be added to a query as needed.

The process of building a spatial or geographic query is similar to building an attribute query. Selecting GEOMETRY from the Attribute list, as noted above, offers a unique list of query operators including, “IS CONTAINED BY”, “INTERSECTS”, and “WITHIN A DISTANCE OF”, as well as their inverses. This allows a subset of objects within a layer to be generated based on their spatial relationship to objects in another layer or based on a determined distance from a selected location or from the map center.
A powerful search option is to create a query that is a combination of both spatial and attribute query criteria. Using the parcel example again, the query could be built as follows:
Attribute: Owner, Operator: EQUALS, Criteria: Smith, Logical Operator: AND
Attribute: Value, Operator: > Criteria: 100000, Logical Operator: AND
Attribute: GEOMETRY, Operator: IS CONTAINED BY, Criteria: City School District
In this example the query results would be further limited to those that fall with the City School District polygon as delineated in a second openspace layer.
It is common for the spatial query function to be used in conjunction with XMap’s buffer tool. A buffer is polygon of a user-specified radius created around an object or group of objects within a layer. The Buffer dialog box, which is accessed by clicking the Tools button in the Workspace, offers the option to create buffer areas around all objects in a layer or just those that have been selected or queried.
As an example of the combined use of the buffer and spatial query tools, a pipeline manager can create a map and generate a list of properties that fall within a mile of his pipeline. To accomplish this he would first create his one-mile buffer polygon then build a spatial query as noted above using IS CONTAINED BY as the operator and the newly created buffer layer as the criteria.
The query function is one of the fundamental data management tools within any GIS. In XMap, the combination of buffering, attribute and spatial querying provides an efficient and effective way to filter or highlight critical objects within a layer.