...
Spatial Merge tool contains 5 fieldssections:
...
- Here you can select a master layer. The master layer is a main layer. All columns from this layer table will be copied to newly created output table.
- Here you can set a detail layer. The detail layer will take part in comparison process and selected data from this layer table will be used and placed in the newly created output table.
- In this field you can select one of the spatial comparison methods.
- In the Columns to append from detail layer field you can select which data from the detail layer should be placed in the Output table.
- Here you can enter the Output table name and Repository in which the new table should be created. If the entered table name already exist the spatial merge operation will be disrupted.
...
To explain how this tool works and how to use it we will use 2 layers: Windmills and District BoroughTourist symbol and National Parks. Both these tables are part of Ordnance Survey Strategi dataset and are available for free from OS website under OS OpenData licence.
- Windmills – Tourist symbol – this layer stores information about windmillstourist attractions. This is how it looks in database:
The WindmillsTourist symbol layer table contains 5 8 columns:
- CODE
- LEGEND
- AMENDED
- NAME
- USAGE
- OWNER
- ORIENT
- MI_PRINX
- District Borough – National Parks – this layer stores names and details of United Kingdom districtsnational parks.
In this example we will use Spatial Merge tool to create a table with all information from the Windmills layer Tourist symbol layer extended by additional column which will store a name of District Borough National Park in which the windmill is located.
We click on the Spatial Merge tool icon.
In the Spatial Merge tool window we’ve set everything to create a new table. You can find a detailed description below.
...
- Tourist symbol – because we want to copy all data from the Windmills layer Tourist symbol layer table to newly created output table we set it as master layer.
- District Borough National Parks – this layer stores the district borough namesNational Park names. We set is as detail layer.
- Because we know that all windmills are some tourist symbols are located inside District boroughsNational Parks records we’ve selected which intersect with master record comparison method.
- We want to add a column which will store a name of District BoroughNational Park. We know that the names are stored in NAME column so we check it.
- SM_windmillsTourist_Symbol – this is a name of the Output table.
Everything is set we can click OK button to confirm all settings and move to the next step. Save Spatial Merge Layer window will appear. Please set a name and select the location for the new layer. To start the operation please click the OK button.
In this case Spatial Merge operation took around 10 seconds. The operation time depends on the layers size and amount of stored data.
When the operation is finished – newly created layer is automatically added to the currently opened map.
This is how the newly created SMwindmillsNew SM Tourist symbol layer looks in table lookstab:
As you see the table stores the data and the location of all records from Windmills tableTourist symbol table. Please also notice that the NAME column name from the District BoroughNational Parks is changed to NAME2. That happened because the Windmills table Tourist symbol table already contained a NAME column and Earthlight is automatically updating new columns names if it detects an already existing one.
...