Configuring data - geo_addressing_sdk - 5.0

Geo Addressing SDK Developer Guide

Product type
Software
Portfolio
Locate
Product family
Geo Addressing
Product
Geo Addressing SDK
Version
5.0
Language
English
Product name
Geo Addressing SDK
Title
Geo Addressing SDK Developer Guide
Copyright
2023
First publish date
2007
Last updated
2024-11-14
Published on
2024-11-14T12:57:29.533342

Scenario

To configure data, there are two options:
  • extract and configure data programmatically
  • configure previously extracted data
Note: If you have more than one data path, use this syntax:
.withSpdPaths(Paths.get({spdDirectory1}), Paths.get(spdDirectory2))

Extract and configure data programmatically

Use spdDataSource to programmatically configure *.spd data.

AddressingConfiguration configuration = new AddressingConfigurationBuilder()  
    .withData(new SpdDataSourceBuilder()  
      .withNumberOfExtractors(3) // number of CPU to use when using extraction  
      .withSpdPaths(Paths.get("/data"), Paths.get("/data2/some.spd")) // location for *.spd  
      .withExtractedPath(Paths.get("/data-extract-location"))  
      .build())  
    .withResources(Paths.get("{ggs.home directory}/ggs-dist-{version}/resources")) // runtime resource  
   .build();

Configure previously extracted data

Use fileDataSource to programmatically configure extracted data.

Addressing addressing;
  
  public VerifyAddress() throws AddressingException {
  
    addressing = new AddressingBuilder()
        .withConfiguration(new AddressingConfigurationBuilder()
            .withData(new FileDataSource(Paths.get("{pathTo}\\extracteddata")))
            .withResources(Paths.get("{ggs.home directory}/ggs-dist-{version}/resources"))
            .build())
        .build();
  }