Populate Location Latitude and Longitude Information

You can set up geocoding for countries to use in applications that use geography data. Geocoding finds the latitude and longitude coordinates from geographic data such as street addresses or Postal Codes.

For example, on a mobile phone you can view which customer and contact addresses are close to your current location. The application integrates the geocoding with eLocation, which is a geocoding service provided by Oracle.

Note that latitude and longitude are populated only for active locations.

When to Use

You can use this scheduled process to populate latitude and longitude information for addresses in the HZ_LOCATIONS table.
Note: Geocoding can be run only on verified addresses. Ensure that the addresses for which this scheduled processes must be run are verified using the eLocation service.

Before running this scheduled process, enable geocoding using the Manage Geographies tasks. For more information about enabling geocoding, see the Set Up Geocoding topic in the Related Topics section. After you enable geocoding, you run this scheduled process at regular time intervals so that newly created or updated locations are selected and geocoded.

The following location attributes are used to populate latitude and longitude values:
  • ADDRESS1
  • ADDRESS2
  • ADDRESS3
  • ADDRESS4
  • CITY
  • STATE / PROVINCE
  • POSTAL_CODE
  • COUNTRY

The profile value of the Geocoding Subprocess Batch Size (HZ_GEOCODING_BATCH_SIZE) profile option impacts this scheduled process. Use this profile option to specify the maximum number of locations that each batch subprocess can handle for geocoding.

Privileges Required

Verify that you have the following privilege or role:

  • Role:

    • Application Implementation Consultant

  • Privilege:

    • Run Geocode Loader

Before You Start

Review the following before scheduling this scheduled process:

  • Recommended Frequency:

    • The schedule frequency depends on the number of addresses that are yet to be geocoded. In general, you can run this process as needed or schedule it to run once a week.

    • If the number of addresses to be geocoded in the application is less than or equal to 10,000, then schedule the process to run once or two times per day. If you don't want to schedule it, you can manually submit this schedule process when required. If the number of unverified addresses to be processed exceeds 10,000, new addresses aren’t processed.

    • If many addresses are imported on certain days, then schedule this process to run more frequently in a day with a batch size of 50. For example, you can run the scheduled process every 15 minutes on such days or manually submit it multiple times after import is complete with a batch size of 50.

    • After all the locations are geocoded, newly submitted geocoding processes don't spawn any sub-processes.

    • Schedule this process with date range and regenerate the geocode using one of the following modes:
      • Create a new scheduled process every month or every 6 months. That is create a new schedule process every month or every 6 months, with start date as first of month and end date as first of the following month or the seventh month.
      • Create new schedule every year with start date as 1st of the year and end date as last day of year. This however means there is higher probability than first option of unverified addresses count reaching more than 10k and hence geocoding will not process any new addresses.
    • The best practice is to keep track of the From Location ID and To Location ID in the log file of this scheduled process. If these values remain the same across several scheduled runs, then you must change the start date to avoid unverified addresses being picked up for reprocessing.

  • Compatibility:

    • This scheduled process is self-incompatible. If multiple instances are submitted, the first instance runs and subsequent instances remain in blocked status until the first instance is completed.

Note: For more information about the steps to be performed before running this scheduled process, see the Related Topics section.

Parameters

Parameter

Optional or Mandatory

Description

Parameter Values

Special Combinations Required

Notes

Country Code

Optional

Country Code of locations for which latitude and longitude are to be populated.

Example: IN

None

N/A

Start Date

Optional

Specifies the beginning of the date range since the last update.

Date

Format : mm/dd/yy

Example: 12/31/19

Start Date must be earlier than End Date

N/A

End Date

Optional

Specifies the end of the date range since the last update.

Date

Format : mm/dd/yy

Example: 12/31/19

End Date must be later than Start Date

N/A

Regenerate Geocode

Optional

Specifies if coordinates must be regenerated for existing ones. If this parameter is set to Y (Yes), the latitude and the longitude for all locations irrespective of whether the data already exists is repopulated.

Y

N

No

N/A

Batch Size

Optional

Specifies the number of locations to be processed in a single sub-process.

Numeric Value

Maximum value 50

N/A

Note: All the parameters are optional. If this scheduled process is run without any parameters, the process picks all addresses of countries for which geocoding is enabled. This scheduled process can populate a maximum of 50 address locations. If the total number of addresses to be geocoded are more than 10,000, you may have to run this scheduled process many times with each batch of size 50 addresses. Only active locations are considered for latitude and longitude population. This scheduled process populates latitude and longitude values in the HZ_LOCATIONS table. This scheduled process continues to pickup already processed addresses for which the latitude or longitude parameters are null.Use the following service to validate the result:Service:http://elocation.oracle.com/geocoder/xmlreq.htmlSample XML:
<?xml version="1.0" standalone="yes" ?>
<geocode_request vendor="elocation">
<address_list>
<input_location id ="100000000387780"> <input_address
match_mode="default"><unformatted country="US" ><address_line value="500
oracle pky"/><address_line value="Redwood City"/><address_line
value="CA"/></unformatted></input_address></input_location>
<input_location id ="100000000415138"> <input_address
match_mode="default"><unformatted country="DE" ><address_line
value="Kroppacherstr. 15"/><address_line value="Ostrau OT
Schrebitz"/><address_line
value="4749"/></unformatted></input_address></input_location>
</address_list>
</geocode_request>

Troubleshooting Information

  • The log file contains the count of the number of locations that were picked for geocoding and other details of the scheduled process. Go to the scheduled processes UI and drill down on the job to click and open the log file.