Class: clu_mapcenter_api
Source Location: /clu_mapcenter_api.php
Class Details
Class Methods
static method get_clu_attributes_by_criteria [line 649]
static array|boolean get_clu_attributes_by_criteria(
string
$state, [string
$county = "none"], [struct
$criteria = array()], [
$wkt = false])
|
|
Returns the attributes for each of the CLUs in the attributed CLU database within the state STATE. If COUNTY is set, restricts the retrieved CLUs to the given county in STATE. Attributes are returned in an array of CLU attribute structs defined as follows: - gid: Primary key of the CLU. Integer.
- extents: Extents of the CLU in latlong/NAD83, as standard extents struct.
- statefips: State FIPS code.
- countyfips: County FIPS code.
- farmnbr: FSA farm number.
- tractnbr: FSA tract number.
- clunbr: FSA CLU number.
- fsa_acres: Acreage of the CLU according to the FSA.
- cropdata: Struct of crop data for the CLU, keyed to the FSA field number, which will be the CLU number, plus a letter designation for split CLUs with multiple crops.
The values are crop description structs, defined as follows:
- cropcode: FSA numeric crop code for the CLU's crop, if available.
- cropdesc: FSA crop name, if available.
- croptype: FSA crop type/variety code, if available.
- cropacres: Acreage of the CLU area planted with this crop, if available.
CRITERIA is a struct which specifies criteria to narrow the search. The following fields may be specified: - acres: Area of each CLU boundary in acres, a struct with two fields: "comparison", a comparison operator (one of ">", "<", ">=", or "<="), and
- crop: a numeric code from the FCIC crop types (see GET_FCIC_CROP_TYPES).
- extent: An extents struct, spatially limiting matched boundaries to those in the given extent. This must be in latlong NAD83 (EPSG:4269).
- excludegids: Array of GIDs, excludes the boundaries so identified. These are the id values for the "gid" field in the attribute struct.
- limit: Integer value, limits the number of results (and thus hilites) to the value given. This is a maximum; searches may return fewer results, or none at all.
- offset: Integer value, skips the given number of results before returning rows. Useful with LIMIT to "scroll through" result sets and hilite groups of results at a time.</li
Use of this method requires the "use_attribclus" privilege.
Tags:
Parameters:
static method get_customer_clu_attributes [line 304]
static array|boolean get_customer_clu_attributes(
string
$customer_nbr, [string
$statename = 'any'], [struct
$criteria = array()], [boolean
$wkt = false])
|
|
Returns the attributes for each of the CLUs in the attributed CLU database belonging to the grower identified by CUSTOMER_NBR. Attributes are returned in an array of CLU attribute structs defined as follows: - gid: Primary key of the CLU. Integer.
- extents: Extents of the CLU in latlong/NAD83, as standard extents struct.
- statefips: State FIPS code.
- countyfips: County FIPS code.
- farmnbr: FSA farm number.
- tractnbr: FSA tract number.
- clunbr: FSA CLU number.
- fsa_acres: Acreage of the CLU according to the FSA.
- cropdata: Struct of crop data for the CLU, keyed to the FSA field number, which will be the CLU number, plus a letter designation for split CLUs with multiple crops.
The values are crop description structs, defined as follows:
- cropcode: FSA numeric crop code for the CLU's crop, if available.
- cropdesc: FSA crop name, if available.
- croptype: FSA crop type/variety code, if available.
- cropacres: Acreage of the CLU area planted with this crop, if available.
If STATENAME is set, restricts the results to those boundaries within the given state. CRITERIA is a struct which specifies criteria to narrow the search. The following fields may be specified: - county: Name of a county within STATENAME.
- acres: Area of each CLU boundary in acres, a struct with two fields: "comparison", a comparison operator (one of ">", "<", ">=", or "<="), and
- crop: a numeric code from the FCIC crop types (see GET_FCIC_CROP_TYPES).
- prodcode: an array of producer codes to match against; this can be one of the following:
- OW: Owner.
- OP: Operator.
- OO: Owner/Operator.
- OT: Other Tenant.
- extent: An extents struct, spatially limiting matched growers to those with boundaries in the given extent. This must be in latlong NAD83 (EPSG:4269). The area of the
extent must not exceed 25,000 acres.
- limit: Integer value, limits the number of results (and thus hilites) to the value given. This is a maximum; searches may return fewer results, or none at all.
- offset: Integer value, skips the given number of results before returning rows. Useful with LIMIT to "scroll through" result sets and hilite groups of results at a time.</li
Use of this method requires the "use_attribclus" privilege.
Tags:
Parameters:
static method get_customer_clu_boundaries [line 432]
static base64|boolean get_customer_clu_boundaries(
string
$customer_nbr, [string
$statename = 'any'], [string
$format = "shapefile"], [
$criteria = array()])
|
|
Returns the attributes and geometries (projected in latlong/NAD83, EPSG 4269) of the CLUs in the attributed CLU database belonging to the grower identified by CUSTOMER_NBR. CLUs are returned in the format specified by FORMAT (defaults to ESRI Shapefile). If STATENAME is set, restricts the results to those boundaries within the given state. Available formats are "shapefile" (ESRI Shapefile), "mapinfo" (MapInfo MIF/MID), "GML" (OGC GML), "KML" (Google Earth KML), or "GeoJSON" (GeoJSON file). The shapefile, mapinfo, and GML formats are multi-file, and are returned in a ZIP. CRITERIA is a struct which specifies criteria to narrow the search. The following fields may be specified: - county: Name of a county within STATENAME.
- acres: Area of each CLU boundary in acres, a struct with two fields: "comparison", a comparison operator (one of ">", "<", ">=", or "<="), and
- crop: a numeric code from the FCIC crop types (see GET_FCIC_CROP_TYPES).
- prodcode: an array of producer codes to match against; this can be one of the following:
- OW: Owner.
- OP: Operator.
- OO: Owner/Operator.
- OT: Other Tenant.
- extent: An extents struct, spatially limiting matched boundaries to those in the given extent. This must be in latlong NAD83 (EPSG:4269).
- limit: Integer value, limits the number of results (and thus hilites) to the value given. This is a maximum; searches may return fewer results, or none at all.
- offset: Integer value, skips the given number of results before returning rows. Useful with LIMIT to "scroll through" result sets and hilite groups of results at a time.
The CLU features will have the following attributes: - fips_st_cd: FIPS state number.
- fips_cnty_cd: FIPS county number.
- farm_nbr: FSA-578 farm number.
- tract_nbr: FSA-578 tract number.
- field_nbr: FSA-578 field number.
- clu_nbr: FSA-578 CLU number.
- fsa_acres: Acreage of field as reported to FSA. May not match measured area of geometry!
- crop_cd: FSA standard crop number.
- crop_short_desc: FSA standard crop letter code.
- crop_type_cd: FSA standard crop type (subtype of crop).
- the_geom: CLU geometry. Specific representation depends on the output format.
Returns FALSE if the customer number is not found in the database. Use of this method requires the "use_attribclus" privilege.
Tags:
Parameters:
static method get_customer_clu_extents [line 202]
static array|boolean get_customer_clu_extents(
string
$customer_nbr, [string
$statename = 'any'], [
$criteria = array()])
|
|
Returns the extents (in latlong, EPSG:4269) of the CLUs in the attributed CLU database belonging to the grower identified by CUSTOMER_NBR. Use of this method requires the "use_attribclus" privilege. Extents are returned as a struct with coordinate fields MINX, MINY, MAXX, MAXY. If STATENAME is set, restricts the results to those boundaries within the given state. CRITERIA is a struct which specifies criteria to narrow the search. The following fields may be specified: - county: Name of a county within STATENAME.
- acres: Area of each CLU boundary in acres, a struct with two fields: "comparison", a comparison operator (one of ">", "<", ">=", or "<="), and
- crop: a numeric code from the FCIC crop types (see GET_FCIC_CROP_TYPES).
- prodcode: an array of producer codes to match against; this can be one of the following:
- OW: Owner.
- OP: Operator.
- OO: Owner/Operator.
- OT: Other Tenant.
- extent: An extents struct, spatially limiting matched growers to those with boundaries in the given extent. This must be in latlong NAD83 (EPSG:4269). The area of the
extent must not exceed 25,000 acres.
- limit: Integer value, limits the number of results (and thus hilites) to the value given. This is a maximum; searches may return fewer results, or none at all.
- offset: Integer value, skips the given number of results before returning rows. Useful with LIMIT to "scroll through" result sets and hilite groups of results at a time.
Use of this method requires the "use_attribclus" privilege.
Tags:
Parameters:
static method get_customer_clu_pdf [line 1080]
static base64|boolean get_customer_clu_pdf(
string
$mapcontext, string
$customer_nbr, [struct
$analysisimages = array()])
|
|
Generates and returns a PDF report mapping out the attributed CLU boundaries owned by grower CUSTOMER_NBR, using map MAPCONTEXT to draw the maps. MAPCONTEXT should be for the state in which the grower's CLU boundaries are found, but it is not an error if this isn't the case. The grower's attributed CLU boundaries must already be hilited in order to generate the PDF! Select them using one of the selection functions or HILITE_CUSTOMER_CLU_BOUNDARIES before calling this function! ANALYSISIMAGES is an optional struct, keyed to the hilite SHPIDs of the attributed clus, with values of analysis (or edited image) image handles to display with the CLUs. Only one image handle can be associated with each CLU hilite. (Use of this feature requires administrator rights.) Returns FALSE if the grower has no CLU boundaries. Use of this method requires the "use_attribclus" privilege.
Tags:
Parameters:
static method get_hilited_clu_attributes [line 843]
static struct|boolean get_hilited_clu_attributes(
)
|
|
Returns the attributes of the attributed CLUs which are currenty hilited. Attributes are returned in a struct keyed to the SHPID of the hilites, with values being CLU attribute structs defined as follows: - statefips: State FIPS code.
- countyfips: County FIPS code.
- farmnbr: FSA farm number.
- tractnbr: FSA tract number.
- clunbr: FSA CLU number.
- fieldnbr: FSA field number. For split CLUs with multiple crops, this will be clunbr plus a letter designation. Otherwise, same as clunbr.
- fsa_acres: Acreage of the CLU according to the FSA.
- cropcode: FSA numeric crop code for the CLU's crop, if available.
- cropdesc: FSA crop name, if available.
- croptype: FSA crop type/variety code, if available.
- cropacres: Acreage of the CLU area planted with this crop, if available.
Use of this method requires the "use_attribclus" privilege.
Tags:
static method get_hilited_clu_boundaries [line 1009]
static base64|boolean get_hilited_clu_boundaries(
[string
$format = "shapefile"])
|
|
Returns the attributes and geometries (projected in latlong/NAD83, EPSG 4269) of the CLUs in the attributed CLU database which are currently hilited. CLUs are returned in the format specified by FORMAT (defaults to ESRI Shapefile). Available formats are "shapefile" (ESRI Shapefile), "mapinfo" (MapInfo MIF/MID), "GML" (OGC GML), "KML" (Google Earth KML), or "GeoJSON" (GeoJSON file). The shapefile, mapinfo, and GML formats are multi-file, and are returned in a ZIP. The CLU features will have the following attributes: - extents: Extents of the CLU in latlong/NAD83, as standard extents struct.
- fips_st_cd: FIPS state number.
- fips_cnty_cd: FIPS county number.
- farm_nbr: FSA-578 farm number.
- tract_nbr: FSA-578 tract number.
- field_nbr: FSA-578 field number.
- clu_nbr: FSA-578 CLU number.
- fsa_acres: Acreage of field as reported to FSA. May not match measured area of geometry!
- crop_cd: FSA standard crop number.
- crop_short_desc: FSA standard crop letter code.
- crop_type_cd: FSA standard crop type (subtype of crop).
- the_geom: CLU geometry. Specific representation depends on the output format.
Returns FALSE if the customer number is not found in the database. Use of this method requires the "use_attribclus" privilege.
Tags:
Parameters:
static method get_hilited_clu_customers [line 922]
static array get_hilited_clu_customers(
integer
$shpid, [array
$ownership = array('OW', 'OP', 'OO')])
|
|
Returns an array of customer info structs associated with the attributed CLU whose hilited boundary is identified by SHPID. OWNERSHIP is an array of ownership codes (producer codes) which identify how the customer is associated with the CLU boundaries. Valid values are: - OW: Owner.
- OP: Operator.
- OO: Owner/Operator.
- OT: Other Tenant.
By default, OT relationships are excluded. The returned array does not include grower information other than the customer number. Returns false if no match was found (no ownership information available). Use of this method requires the "use_attribclus" privilege.
Tags:
Parameters:
static method hilite_clus_by_criteria [line 758]
static boolean|struct hilite_clus_by_criteria(
string
$state, [string
$county = "none"], [struct
$criteria = array()])
|
|
Selects CLUs from the attributed CLU database which are within STATE, optionally filtered by COUNTY and CRITERIA, and hilites the resulting boundaries. CRITERIA is a struct which specifies criteria to narrow the search. The following fields may be specified: - gids: Array of CLU boundary GIDs. Each CLU so identified will be hilited, unless they do not match the other criteria given.
- acres: area of each CLU boundary in acres, a struct with two fields: "comparison", a comparison operator (one of ">", "<", ">=", or "<="), and
- crop: a numeric code from the FCIC crop types (see GET_FCIC_CROP_TYPES).
- extent: An extents struct, spatially limiting matched boundaries to those in the given extent. This must be in latlong NAD83 (EPSG:4269).
- limit: Integer value, limits the number of results (and thus hilites) to the value given. This is a maximum; searches may return fewer results, or none at all.
- offset: Integer value, skips the given number of results before returning rows. Useful with LIMIT to "scroll through" result sets and hilite groups of results at a time.
Returns hilite struct for all hilited shapes, including the newly hilited attributed CLUs. Use of this method requires the "use_attribclus" privilege.
Tags:
Parameters:
static method hilite_customer_clu_boundaries [line 550]
static struct|boolean hilite_customer_clu_boundaries(
string
$customer_nbr, [string
$statename = 'any'], [
$criteria = array()])
|
|
Selects CLUs from attributed CLU database for grower CUSTOMER_NBR, and copies them to the hilite table for the current user. If STATENAME is set, restricts the results to those boundaries within the given state. CRITERIA is a struct which specifies criteria to narrow the search. The following fields may be specified: - county: Name of a county within STATENAME.
- acres: Area of each CLU boundary in acres, a struct with two fields: "comparison", a comparison operator (one of ">", "<", ">=", or "<="), and
- crop: a numeric code from the FCIC crop types (see GET_FCIC_CROP_TYPES).
- prodcode: an array of producer codes to match against; this can be one of the following:
- OW: Owner.
- OP: Operator.
- OO: Owner/Operator.
- OT: Other Tenant.
- extent: An extents struct, spatially limiting matched boundaries to those in the given extent. This must be in latlong NAD83 (EPSG:4269).
- limit: Integer value, limits the number of results (and thus hilites) to the value given. This is a maximum; searches may return fewer results, or none at all.
- offset: Integer value, skips the given number of results before returning rows. Useful with LIMIT to "scroll through" result sets and hilite groups of results at a time.
By default, OT relationships are excluded. Returns hilite struct for all hilited shapes, including the newly hilited attributed CLUs. Use of this method requires the "use_attribclus" privilege.
Tags:
Parameters:
static method query_map_layer_at_map_coordinate [line 1151]
static struct|boolean query_map_layer_at_map_coordinate(
string
$mapcontext, double
$xcord, double
$ycord, mixed
$layer, [string
$coordsys = "+init=EPSG:4269"], [double
$tolerance = 0])
|
|
Queries the layer identified by LAYER in map MAPCONTEXT, at the point defined by map coordinates XCORD and YCORD, and returns attribute information about any intersecting vectors at that point. XCORD and YCORD must be in latlong NAD83 (EPSG 4269) unless COORDSYS is specified. LAYER may be the index number or the name of the layer to query. LAYER must identify a vector layer; this function does not support querying raster layers. If TOLERANCE is greater than 0, the layer query will also look for shapes which are within TOLERANCE meters of the point. This allows for "inexact" matches. Returns a struct keyed to the permanent ID of the shapes in the layer, with values being per-shape attribute structs. The exact keys and values of these attribute structs will vary by layer. Each attribute struct will contain an extents struct for the shape's extents, keyed to "extents". If no results found, returns false. This CLU_MAPCENTER_API version returns object information as given for the 'objects' key in the struct returned by get_accessible_regions_and_objects() when querying one of the object layers ("boundaries", "locations", or "paths"), and returns CLU attributes as given for get_hilited_clu_attributes() when querying the attributed CLU layer; otherwise, attributes returned are those of the shape directly, without any joining to other tables.
Tags:
Overrides mapcenter_api::query_map_layer_at_map_coordinate() (Queries the layer identified by LAYER in map MAPCONTEXT, at the point defined by map coordinates XCORD and YCORD, and returns attribute information about any intersecting vectors at that point. XCORD and YCORD must be in latlong NAD83 (EPSG 4269) unless COORDSYS is specified. LAYER may be the index number or the name of the layer to query. LAYER must identify a vector layer; this function does not support querying raster layers.)
Parameters:
static method query_map_layer_at_pixel_point [line 1239]
static struct|boolean query_map_layer_at_pixel_point(
string
$mapcontext, integer
$xpoint, integer
$ypoint, mixed
$layer, [double
$pixeltolerance = 0])
|
|
Queries the layer identified by LAYER in map MAPCONTEXT, at the pixel coordinates XPOINT and YPOINT, and returns attribute information about any intersecting vectors at that point. XPOINT must be in range 0 .. map width, YPOINT in range 0 .. map height. Coordinate 0,0 is top left corner of the map. LAYER may be the index number or the name of the layer to query. LAYER must identify a vector layer; this function does not support querying raster layers. If PIXELTOLERANCE is greater than 0, the layer query will also look for shapes which are within PIXELTOLERANCE pixels of the pixel point. This allows for "inexact" matches. Returns a struct keyed to the permanent ID of the shapes in the layer, with values being per-shape attribute structs. The exact keys and values of these attribute structs will vary by layer. Each attribute struct will contain an extents struct for the shape's extents, keyed to "extents". If no results found, returns false. This CLU_MAPCENTER_API version returns object information as given for the 'objects' key in the struct returned by get_accessible_regions_and_objects() when querying one of the object layers ("boundaries", "locations", or "paths"), and returns CLU attributes as given for get_hilited_clu_attributes() when querying the attributed CLU layer; otherwise, attributes returned are those of the shape directly, without any joining to other tables.
Tags:
Overrides mapcenter_api::query_map_layer_at_pixel_point() (Queries the layer identified by LAYER in map MAPCONTEXT, at the pixel coordinates XPOINT and YPOINT, and returns attribute information about any intersecting vectors at that point. XPOINT must be in range 0 .. map width, YPOINT in range 0 .. map height. Coordinate 0,0 is top left corner of the map. LAYER must identify a vector layer; this function does not support querying raster layers.)
Parameters:
static method query_map_layer_with_layer_shapes [line 1377]
static struct query_map_layer_with_layer_shapes(
string
$mapcontext, mixed
$targetlayer, mixed
$sourcelayer, array
$ids)
|
|
Queries the layer identified by TARGETLAYER in map MAPCONTEXT, using the shapes identified by integer IDs in array IDS, which are contained in the layer SOURCELAYER. For each shape from SOURCELAYER in IDS, attribute information for the intersecting shapes from TARGETLAYER will be returned. SOURCELAYER and TARGETLAYER may be the index numbers or the names of the layers. They must identify vector layers; this function does not support querying raster layers. Returns a struct keyed to the ID of each shape from SOURCELAYER in IDS, with the values being a struct keyed to the ID of each found shape in TARGETLAYER; values of those structs will be per-shape attribute structs. The exact keys and values of these attribute structs will vary by TARGETLAYER. Each attribute struct will contain an extents struct for the shape's extents, keyed to "extents". It will also contain a field "intersect_area", which describes the area of the intersection between the shapes from SOURCELAYER and from TARGETLAYER, in square meters. If no results are found for a given shape from SOURCELAYER, the value of that ID in the returned struct will be boolean false. This CLU_MAPCENTER_API version returns object information as given for the 'objects' key in the struct returned by get_accessible_regions_and_objects() when querying one of the object layers ("boundaries", "locations", or "paths"), and returns CLU attributes as given for get_hilited_clu_attributes() when querying the attributed CLU layer; otherwise, attributes returned are those of the shape directly, without any joining to other tables. The "intersect_area" struct field will be present in the results for objects and attributed CLUs.
Tags:
Overrides mapcenter_api::query_map_layer_with_layer_shapes() (Queries the layer identified by TARGETLAYER in map MAPCONTEXT, using the shapes identified by integer IDs in array IDS, which are contained in the layer SOURCELAYER. For each shape from SOURCELAYER in IDS, attribute information for the intersecting shapes from TARGETLAYER will be returned. SOURCELAYER and TARGETLAYER may be the index numbers or the names of the layers. They must identify vector layers; this function does not support querying raster layers.)
Parameters:
static method query_multiple_map_layers_at_map_coordinate [line 1299]
static struct|boolean query_multiple_map_layers_at_map_coordinate(
string
$mapcontext, double
$xcord, double
$ycord, array
$layerlist, [string
$coordsys = "+init=EPSG:4269"], [double
$tolerance = 0])
|
|
As query_map_layer_at_map_coordinate(), but queries each of the layers given in array LAYERLIST; all other arguments are as for query_map_layer_at_map_coordinate(). Returns a struct keyed to the layer name or ID of each layer queried in LAYERLIST, with values being the query structs as returned by query_map_layer_at_map_coordinate(), or boolean false if the query of that layer returned no shapes. This CLU_MAPCENTER_API version returns object information as given for the 'objects' key in the struct returned by get_accessible_regions_and_objects() when querying one of the object layers ("boundaries", "locations", or "paths"), and returns CLU attributes as given for get_hilited_clu_attributes() when querying the attributed CLU layer; otherwise, attributes returned are those of the shape directly, without any joining to other tables.
Tags:
Overrides mapcenter_api::query_multiple_map_layers_at_map_coordinate() (As query_map_layer_at_map_coordinate(), but queries each of the layers given in array LAYERLIST; all other arguments are as for query_map_layer_at_map_coordinate().)
Parameters:
static method query_multiple_map_layers_at_pixel_point [line 1335]
static struct|boolean query_multiple_map_layers_at_pixel_point(
string
$mapcontext, integer
$xpoint, integer
$ypoint, mixed
$layerlist, [double
$pixeltolerance = 0])
|
|
As query_map_layer_at_pixel_point(), but queries each of the layers given in array LAYERLIST; all other arguments are as for query_map_layer_at_pixel_point(). Returns a struct keyed to the layer name or ID of each layer queried in LAYERLIST, with values being the query structs as returned by query_map_layer_at_pixel_point(), or boolean false if the query of that layer returned no shapes. This CLU_MAPCENTER_API version returns object information as given for the 'objects' key in the struct returned by get_accessible_regions_and_objects() when querying one of the object layers ("boundaries", "locations", or "paths"), and returns CLU attributes as given for get_hilited_clu_attributes() when querying the attributed CLU layer; otherwise, attributes returned are those of the shape directly, without any joining to other tables.
Tags:
Overrides mapcenter_api::query_multiple_map_layers_at_pixel_point() (As query_map_layer_at_pixel_point(), but queries each of the layers given in array LAYERLIST; all other arguments are as for query_map_layer_at_pixel_point().)
Parameters:
static method search_clu_database [line 101]
static boolean|array search_clu_database(
string
$state, [string
$county = "none"], [array
$criteria = array()])
|
|
Searches attributed CLU database for a particular grower or set of growers. If COUNTY is "none", all counties in STATE are searched. COUNTY cannot be "none" if no other search criteria are specified. CRITERIA is a struct which specifies criteria to narrow the search. The following fields may be specified: - growerid: Numeric grower ID. Unique to every grower, so only one result will be returned. Not a good idea to combine with other criteria (but this is not an error).
- lastname: Last name of the grower. Case-insensitive, partial matches allowed.
- firstname: First name of the grower. Case-insensitive, partial matches allowed.
- coname: Company/business name of the grower. Case-insensitive, partial matches.
- totalacres: The grower's total acres, a struct with two fields: "comparison", a comparison operator (one of ">", "<", ">=", or "<="), and "value", the numeric value to
compare against.
- fieldsize: Size of each field; struct identical to "totalacres", but the comparison will apply to each individual field's acreage, not to the sum total.
- crop: A numeric code from the FCIC crop types (see GET_FCIC_CROP_TYPES).
- cropacres: Grower's total acres of the crop under "crop", above. Struct identical to the one for "totalacres"; this is invalid if "crop" is not set.
- cropfieldsize: Size of each field's acreage planted with the crop under "crop", above. Struct identical to the one for "totalacres", but the comparison applies to each
individual field's cropped acreage. This is invalid if "crop" is not set.
- prodcode: An array of producer codes to match against; this can be one of the following:
- OW: Owner.
- OP: Operator.
- OO: Owner/Operator.
- OT: Other Tenant.
- extent: An extents struct, spatially limiting matched growers to those with boundaries in the given extent. This must be in latlong NAD83 (EPSG:4269). The area of the
extent must not exceed 25,000 acres.
- limit: Integer value, limits the number of results to the value given. This is a maximum; searches may return fewer results, or none at all. If not set, defaults to
1000.
- offset: Integer value, skips the given number of results before returning rows. Useful with LIMIT to "scroll through" result sets.
Name searches (those which use LASTNAME, FIRSTNAME, or CONAME) work as follows: If LASTNAME is set, FIRSTNAME will be combined with it if set; the match will be only for growers who match both criteria. If LASTNAME and CONAME are both set, both will be checked independently; the results will be growers which match either LASTNAME (and FIRSTNAME, if set) or CONAME. FIRSTNAME combined with CONAME (but not also LASTNAME) has no effect, and the search proceeds using CONAME. FIRSTNAME by itself is not permitted. The search is case-insensitive. Partial name matches are allowed: the portion of the name parameter given will be matched against with a wildcard for the end of the string. This means that, for instance, setting CONAME to "LA" would retrieve all growers whose company criteria start with "LA". Note that the portion of the string given must match exactly (except for case)! Also, the given string will be taken to be the first part of the full name; this method cannot do "wildcard" matches against middle or end portions of the name. Returns boolean FALSE if no match found, otherwise returns array of structs: 1 substruct per match found, containing the grower's identification data and customer number. Each struct may have the following fields: - customer_nbr: Grower's unique customer number.
- co_name: Company (business) name.
- first_name: First name.
- middle_init: Middle initial.
- last_name: Last name.
- name_suffix: Name suffix, if any.
- addr_1: Main part of address.
- addr_2: Additional part of address.
- city: City of residence.
- st_cd: Two-letter state code.
- zip_cd: 5 digit ZIP code.
- zip_cd_4: 4 digit ZIP extension.
- phone_nbr: Phone number.
If the field would be empty, it will not be present. Use of this method requires the "use_attribclus" privilege.
Tags:
Parameters:
|
|