Maptitude GISDK Help

Locate View (Deprecated)

 

This macro has been deprecated. Please use Data.Finder Class and Data.Geocoder Class 

 

Summary

Creates or adds to a point geographic file by locating records using a Streets file or a Location index.

 

Syntax

RunMacro("GISDK Locate View", array options)

 

An option is required unless listed as optional:

 

Option Type Contents
ViewSet String The records to be located, either "view|set" or "point layer name|set"
ID String Input view ID field
Address String Street address field
Address2 String Optional second address field
PostalCode String Optional postal code field
City String Optional city field
State String Optional state field
StreetLayer String Name of the Street layer, or null if using the Caliper US Streets file
LocationIndex String Optional name of the Location index file; if null, locate using StreetLayer
OutputDatabase String Name for the new geographic file, or name of the geographic file for an existing point layer
OutputLayer String Layer name for the new geographic file, or layer name for an existing point layer
OutputStandard String Name of the file that can store the standardized output table; can be dBASE (dbf), fixed-format binary (bin), fixed-format ASCII (asc), or Excel (xls); for more information, see "Creating a Report File" in the Maptitude Help
AddressRules String Name of the street address standardization rules file
CityRules String Name of the "City, State" standardization rules file
OffsetDistance Real Optional offset distance from street; if null, use the default offset
OffsetUnits String The name of the offset distance units (plural), such as Feet or Meters; if null, use the default offset units
Map String Optional name of the map to which to add the layer
AddLayer Boolean Optional; True to add a new layer to the map, otherwise False (default)
AlternateZips Integer 1 to look up nearby ZIP Codes, 0 by default; works only for US numeric postal codes, and usesaltzip.bin

 

Notes

Examples

 

// Locate using a Streets layer

// Open customer.dbf and the Hartford.cdf street layer in the Tutorial folder

Macro "Test GISDK Locate View"

      view_set = "CUSTOMER|"

     options = { {"ViewSet" , view_set},

               {"ID", "ID"},

               {"Address", "ADDRESS"},

               {"PostalCode" , "ZIP"},

               {"StreetLayer" , "Hartford Streets"},

               {"OutputDatabase", "C:\\temp\\SelectionCustomers.dbd"},

               {"OutputLayer", "Located Customers"},

               {"OutputStandard", "C:\\temp\\SelectionStd.bin"},

               {"AddressRules", "caliper.rul"},

               {"CityRules", "cityzip.rul"}}

     ShowArray(options)

     SetAlternateInterface("geocode")

     error_msg = RunMacro("GISDK Locate View", options)

     Return(error_msg)

endMacro

 

// Locate using a Location index

// Open customer.dbf and the Hartford.cdf street layer in the Tutorial

// folder and create a location index file hartford.idx in that folder using the

// Tools-Locate-Index Locations command before running this macro

Macro "Test GISDK Locate View"

     view_set = "CUSTOMER|"

     folder = RunMacro("G30 Tutorial Folder")

     options = { {"ViewSet" , view_set },

               {"ID", "ID"},

                {"Address", "ADDRESS"},

               {"PostalCode" , "ZIP"},

               {"StreetLayer" , "Hartford Streets"},

               {"LocationIndex", folder + "Hartford.idx"},

               {"OutputDatabase", folder + "SelectionCustomers.dbd"},

               {"OutputLayer", "Located Customers"},

               {"OutputStandard", folder + "SelectionStd.bin"},

               {"AddressRules", "caliper.rul"},

               {"CityRules", "cityzip.rul"}}

     ShowArray(options)

     SetAlternateInterface("geocode")

     error_msg = RunMacro("GISDK Locate View", options)

     Return(error_msg)

endMacro

 

 

©2025 Caliper Corporation www.caliper.com