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 the command line. You can create a scheduled job for example, using Windows scheduler to automate address uploading to LSS.
- Oracle
- MySQL
- Microsoft SQL Server
Pre-requisites
- JRE 1.7 should be installed.
- The JAVA_HOME should be set.
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 the configuration.properties
file, which in turn defines the elements required to configure the system. Make sure the argument information specified is the 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
.
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
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
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>