The Spatial Join tool joins attributes from features on one layer to features on another layer based on a spatial relationship. Spatial joins begin by selecting a target layer and comparing it spatially to another layer. Target features can inherit the attributes from the source features if and only if the two share the same spatial reference (MAP View).
Using Spatial Join
To use Spatial Join, click the Spatial Join button on the MAPublisher toolbar or from the menu Object > MAPublisher > Spatial Join. The Spatial Join dialogue box has two tabs: Join and Attributes.
MAP View
On the Join tab, select the MAP View on which Spatial Join should be performed.
Add data to
On the Join tab, specify which MAP layer to add data to. Also known as the target features.
Join data from
On the Join tab, specify which MAP layer to join data from. Also known as the source features.
Relationship
On the Join tab, select the Relationship type to base the join on. Only supported relationships of the two feature types are shown in the Relationship drop-down.
Supported Spatial Relationships
Spatial Relationship |
Description |
Intersects |
A intersects B if any part of A crosses with any part of B. |
Near |
A is near B if a line can be drawn from any part of A to any part of B that is less than the specified minimum distance. |
Contains |
A contains B if all of B is inside the boundary of A. |
Within |
A is within B if all of A is inside the boundary of B. |
Identical To |
A is identical to B if every vertex of A & B are exactly the same, in the same order. |
Has Centre In |
A has its centre in B if the centroid of A is ‘within’ B (see ‘Within’ above). |
Closest |
A is closest to B if a line can be drawn from any part of A to any part of B that is less than any other such line between B & any other feature. |
Relationships Based on Feature Type
Precision
The Precision control specifies how many decimals to consider when comparing coordinates. If results are not as expected, adjust the slider to a lower or higher precision.
Attributes
Click the Attributes tab to manage which attributes and operations are used. Choose which source attributes to append or drop. By default, all attributes of the source features are appended to attributes of the target features. The New Attribute column shows which attribute will be appended based on the Derived From column. In addition, each attribute is appended based on an intended operation and associated options.
Click the Edit Calculated Attribute Operation button to change the attribute operation and options.
Often, these combinations are straightforward. However, depending on attribute and operation, some results may require additional thought. By default, operations are determined based on the attribute type, however, the operation can be adjusted as required.
Only certain operations are available for a specific attribute type. The following details the operation, which attribute types are affected, and its description.
Operation |
Affects Attribute Type |
Description |
Set to default |
All |
The original attribute is retained after the join. |
Set to default if different |
All |
The attribute is cleared if there are more than two unique values present after the join. |
Concatenate |
String |
Joins string values together and separates them with a separator (tab, space, comma, comma then space, dash, underscore). No separator can also be used. |
Sum |
Integer, Double |
The addition of two or more numbers. |
Mean |
Double |
The average of a set of numbers. |
Median |
Integer, Double |
The middle value in a range of numbers. |
Mode |
String, Integer, Double, Boolean |
The value which appears most often in a range of numbers. |
Range |
Integer, Double |
The difference between the lowest and highest values. |
Standard Deviation |
Double |
A measure of how spread out numbers are. |
Largest value |
Integer, Double |
The largest value in a range of numbers. |
Smallest value |
Integer, Double |
The smallest value in a range of numbers. |
Least alphabetical |
String |
Returns least alphabetical sort (Z-A). |
Most alphabetical |
String |
Returns most alphabetical sort (A-Z). |
First value |
All |
First value of an attribute. |
Last value |
All |
Last value of an attribute. |
When adding Calculated Attributes, it is possible for certain outcomes to change the attribute type. For example, a Concatenate operation performed on an Integer attribute type will result in the creation of a String attribute type.
To add a Calculated Attribute, click the Add Operation button. The Add Attribute Operation dialogue box allows you to choose a source and new operation with associated options. Choose an Operation based on availability set by the attribute data type. Provide a Name, result type, and provide settings for associated options.
Results
Examples of Spatial Join uses:
•Find all of the Cities contained by each province
•Make a list of the city names in each province
•Find the sum of their populations
•Find the mean of their populations
Comments
0 comments
Please sign in to leave a comment.