Locator Uploader Command Line Utility

Introduction

The Locate Search Service (LSS) search service allows you to search for specific or similar addresses. The LSS relies on address data that has been primarily uploaded via admin console. In this release, we are further extending the process to allow upload via a command line/console utility that will directly communicate with the LSS and upload address data by reading it from a database or a CSV file.

This tool is a JAR file that allows you to upload the address information (Address, X, Y) from command line. You can create a scheduled job for example, using Windows scheduler to automate address uploading to LSS.

This tool has been tested against the following databases:
  • Oracle
  • MySQL
  • Microsoft SQL Server
Note: The JDBC drivers for the tool are packaged within.

Pre-requisites

The following items are required on the system on which this utility is to be invoked.
  1. JRE 1.7 should be installed.
  2. The JAVA_HOME should be set.
The basic syntax of calling the service is via command line
java -Dconfiguration.folder=<FOLDER LOCATION OF THE CONFIG> -jar <JAR-FILE>

The configuration.folder argument is the mandatory requirement for invoking this utility as it specifies configuration.properties file which defines the elements required to configure the system. Make sure the argumemnt information specified is absolute path to the containing folder; e.g. If the file is present at D:\\Analyst\\configuration.properties, the argument should be -Dconfiguration.folder=D:\\Analyst.

A sample configuration.properties is available in the commandline-uploader.zip file. When the tool is executed all the activity logs (IndexUtility.log) are created in the user home directory.
indexsearch.singleLineSearch.url=http://<MACHINE>:<PORT>/index-search/SingleLineAddressService
indexsearch.singleLineSearch.wsdl=http://<MACHINE>:<PORT>/index-search/SingleLineAddressService?wsdl 

Gazetteer Parameters

The following parameters will be used to populate the address information in LSS:
populate.tenant.name=analyst
populate.gazetteer.name=<GAZETTEER NAME e.g. Address1> 
populate.projection=<PROJECTION e.g. EPSG:27700>
populate.column.address=0
populate.column.x=1 
populate.column.y=2
populate.delimiter=, 

Database Properties

The Database properties that should be valid are:
database.admin.user=<VALID USER NAME e.g. root>
database.admin.password=<VALID PASSWORD e.g. root>
database.driver.class.name=<VALID CLASS e.g. oracle.jdbc.driver.OracleDriver>
database.driver=<VALID JDBC URL e.g. jdbc:oracle:thin:@noioraent2k3-64:1521:Analyst> 
sql.complete.select.statement=<VALID SQL STATEMENT e.g. select address, x, y from camden>

Maximum Tolerance

skip.bad.record.limit=<MAX TOLERANCE e.g. 400, should be >= 1>

Path to a temporary location where the data will be fetched

temp.file=<FILENAME WITH VALID PATH e.g. d://temp//abc.csv>

Records to be processed in one go

minimum.commit.records=<RECORDS LIMIT e.g. 10> 

It starts at 1, so in case you only have ADDRESS, X, Y in the select statement you can specify 1, 2, 3

address.column.location=<LOCATION OF ADDRESS e.g. 1>
x.column.location=<LOCATION OF X>
y.column.location=<LOCATION OF Y>