When you import a new layer from MS Excel file, geometry column is empty. Earthlight needs it to know where to place the data on the map. Geocode lets you automatically fill the geometry column using either the easting and northing columns in your data or matching address details from your data with existing gazetteer data.
First, you should choose the source layer that requires geocoding. You can do this in two ways:
- From map – if the layer that you want to geocode is already in the open map you can use pick it from this drop-down list,
- From file – use the layer from saved file. To do this, click Select and find your layer.
Second thing is to choose Geocoding columns. If your layer contains Easting/Northing columns, you should check the 2nd radio button and geocode by them. If not, you need to select columns that contain data about an address (because whole address data is a unique thing for each record). It is required for a valid UK postcode to be provided for each address.
If you would like to put some text or values from your gazetteer to the geocoded layer, you can use 'Update expressions' fields.
To add a column expression, please click in a field which expressions should be entered into. Next, click a desired column from the gazetteer column list on the right and it should be added to the field selected earlier.
In my example, I want to put the text 'UPRN is:' followed by 'UPRN' values from gazetteer table.
To select a gazetteer which will be used for geocoding operation, please click on the 'Gazetteers and gazetteer columns:' drop-down list on the right pane and select a desired gazetteer.
List of columns from selected gazetteer will be displayed below the drop-down.
'Comment column' option allows to select a text column which can be used as a column for comments. Entering user comments will be possible on next geocode screens. It is possible to enter a comment for every desired record from layer which is currently geocoded. For instance - 'Record requires checking, incorrect POSTCODE provided' text can inform other users that record requires rechecking and optionally, geocoding it later .
Please note
In order to see a layer in the drop-down list of gazetteers, please make sure that it is located in the default Gazetteer directory (Global/Group/User Settings → Gazetteers tab). Also, the layer should be using gazetteer cache which can be set via Modify tool (Administration tab), in Advanced tab set 'Use gazetteer cache' option to 'Yes'.
Geocode tool will use Key and Order expressions from the gazetteer layer to match its records with the geocoded dataset. For more information on the expressions, please click here.
'Regular expression filter' option is useful when there is need to exclude addresses with some defined pattern, to be not matched automatically in geocoding. You can use regular expressions in this field for more complex searches.
Please note
For building regex expression with several columns, it is required to separate those with the ',' character and space.
In my example, I use the:
[5-9], \bSCHOOL\b
expression to exclude all addresses which have 5 to 9 number in the first part of the address and the word 'SCHOOL' in the second part. Below, there is a visualization of this expression from the regexper.com page:
After entering the regular expression in the 'Regular expression filter' field and clicking the 'Geocode' button:
'Exclusion filter' option is usually used for the geocoding against the gazetteer which user has not control and its expression cannot be changed. If there are some words or characters in a geocoded layer which are not in actual gazetteer data. For instance, geocoded layer has estate names in addresses, but they are not present in a gazetteer which could result that addresses will not be matched properly.
Therefore, names of the estates can be entered in the 'Words /phrases to be filtered out' field and be excluded from matching.
'Advanced javascript address processing' field is used for creating own JavaScript functions which can process your address before matching.
After setting up all the options, click 'Geocode' button.
Sometimes there are some records that could not be matched, because:
- There are a few matches for a record – in that case you should specify one record that should be used in order to geocode selected record.
- No matches found – in that case you should geocode your layer again (go to Administration > Create > Geocode) using other columns (good idea is checking Geocode only currently ungeocoded records) and see if the results are better. Please also consider using additional options for improving results of matching ('Regular expression filter', 'Exclusions filter'). It also appears when there are too many matches for one record.
.