Difference between revisions of "Freeside:3:Documentation:Developer/FS/GeocodeCache"

From Freeside
Jump to: navigation, search
(Edit via perl MediaWiki framework (1.13))
 
(No difference)

Latest revision as of 13:34, 27 June 2014

NAME

FS::GeocodeCache - An address undergoing the geocode process.

SYNOPSIS

 use FS::GeocodeCache;

 $record = FS::GeocodeCache->standardize(%location_hash);

DESCRIPTION

An FS::GeocodeCache object represents a street address in the process of being geocoded. FS::GeocodeCache inherits from FS::geocode_Mixin.

Most methods on this object throw an exception on error.

FS::GeocodeCache has the following fields, with the same meaning as in FS::cust_location:

address1; address2; city; county; state; zip; latitude; longitude; addr_clean; country; censustract; geocode; district

METHODS

new HASHREF
Creates a new cache object. For internal use. See standardize.
set_censustract
Look up the censustract, if it's not already filled in, and return it. On error, sets 'error' and returns nothing.
This uses the "get_censustract_*" methods in FS::Misc::Geo; currently the only one is 'ffiec'.
set_coord
Set the latitude and longitude fields if they're not already set. Returns those values, in order.

CLASS METHODS

standardize LOCATION
Given a location hash or FS::geocode_Mixin object, standardize the address using the configured method and return an FS::GeocodeCache object.
The methods are the "standardize_*" functions in FS::Geo::Misc.

BUGS

SEE ALSO

FS::Record, schema.html from the base documentation.

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 150:
You forgot a '=back' before '=head1'