Proximity Home PageGeospatial Solutions

 



 
Point to Geocode
  -- use the PTG software to convert your latitude-longitude points to geographic area geocodes


The Point to Geocode (PTG) software translates latitude-longitude points to geographic area geocodes. For example, PTG inputs a set of records containing latitude and longitude fields and returns a census block geocode for the census block containing that point. See the graphic below for an example. In this example, the census block code returned provides the state FIPS code, county FIPS code, census tract code and block. As a result, PTG also provides a way to determine the location of points by state, county, tract and block group as well as census block.

PTG is a generalized version of the Point to Census Block software. PTG can assign the geocode of any type of area for which a polygon shapefile is available; e.g., census blocks, census block groups, ZIP codes, congressional districts, cities/places, metropolitan areas, school districts, traffic zones, etc. The polygon shapefile does not need to be census related, the polygons could be trade areas, attendance zones or any custom defined area.

See details on using PTG.

Applications. Consider a situation where attributes (such as population by race) of several thousand addresses need to be summarized by census block. Obtain the latitude-longitude of the addresses and then process the records using PTG to obtain the block (and other) geocodes. Aggregate your point data to summary statistics at the block or other geographic levels. Integrate Census-sourced demographics for the block summary records with your data.

Contact us for additional information. Add "PTG" in the notes section.



Using PTG

PTG operates on a Windows-based computer as an interactive GUI application or batch/command line application.

Installation
Run the PTG installer to set up the basic software and data. The installer places these files on your computer in the default folder c:\ptg (recommended):
  • ptg.exe -- PTG interactive program
  • ptg.ini -- PTG interactive configuration file (maintained with PTG Set Options operation)
  • ptgcmd.exe -- PTG command line program -- same coding functionality
  • ptg.bat -- a batch file command line example using ptgcmd.exe
  • test003.* -- sample test shapefile
  • tl_2009_47_bg00.* -- Tennessee by block group polygon shapefile
  • cty47003points.dbf -- sample input point file; dbf format
  • cty47003points.xls -- sample input point file; xls format

Running PTG Interactive or Batch
To run PTG interactive, start PTG with the desktop icon or Start>Programs. To run PTG batch, a batch command file will need to be set up. Both the interactive and the batch versions will run with the sample application, data and settings.

Sample Applications
The interactive and batch versions use the same sample setup. The sample setup makes use of the state of Tennessee by block group shapefile (tl_2009_47_bg00.shp). The sample point file (cty47003points.dbf) is a renamed version of the sample shapefile dbf (tl_2009_47_bg00.dbf) for Tennessee county 003 with an additional field added named "geocode".

To run the PTG interactive, start the program and click Tools>Run Point to Geocode. A message appears confirming that your settings are correct. Click Yes for the demo application. The progress is displayed in the status line at the base of the PTG window. At the completion of the coding, a Done message appears. The task is completed.

PTG INI File
The PTG INI file provides the settings used by PTG interactive. The default (start-up) PTG INI file is shown below. There are six settings/parameter values that must be set correctly. Normally the PTG INI file settings will be set with PTG>Options>set Options while PTG interactive is running.

PTG INI File Using dBase4 Point File Settings
[Options]
shpfile=c:\ptg\tl_2009_47_bg00.shp
geofield=bkgpidfp00
ptfile=c:\ptg\cty47003points.dbf
ptfilelat=intptlat00
ptfilelon=intptlon00
ptfilegeocode=geocode

The parameter values are as follows:

shpfilepolygon shapefile path and name
geofieldthe fieldname of the field in the polygon shapefile dbf that will be assigned to matched point(s)
ptfilepoint file in dbase 4 structure containing a record for each point to be coded
ptfilelatfieldname in the point file that contains the latitude value
(decimal degrees, F12.6)
ptfilelonfieldname in the point file that contains the longitude value
(decimal degrees, F12.6; normally negative)
ptfilegeocodefieldname in the point file to contain the geocode of the area where point located
character, C15 suggested

PTG INI File Using Excel Point File Settings
The above table shows the INI settings for a dbase4 points input file. The following table shows similar settings for an Excel points input file.
[Options]
shpfile=c:\ptg\tl_2009_47_bg00.shp
geofield=bkgpidfp00
ptfile=c:\ptg\cty47003points.dbf
ptfilelat=11
ptfilelon=12
ptfilegeocode=13

shpfilepolygon shapefile path and name
geofieldthe fieldname of the field in the polygon shapefile dbf that will be assigned to matched point(s)
ptfilepoint file in Excel structure containing a record for each point to be coded
ptfilelatcolumn number in the point file that contains the latitude value
(decimal degrees, F12.6)
ptfileloncolumn number in the point file that contains the longitude value
(decimal degrees, F12.6; normally negative)
ptfilegeocodecolumn number in the point file to contain the geocode of the area where point located
character, C15 suggested

PTG Batch Application
The PTG batch application is designed for non-attended operations. Use of PTG Batch requires some experience using PTG interactive to insure that parameters are set up correctly.

The sample PTG batch command line file (using dbase4 point file) contains one command line:

   ptgcmd c:\ptg\tl_2009_47_bg00.shp bkgpidfp00 c:\ptg\cty47003points.dbf intptlat00 intptlon00 geocode
The alternative sample PTG batch command line file (using Excel point file) contains one command line:

   ptgcmd c:\ptg\tl_2009_47_bg00.shp bkgpidfp00 c:\ptg\cty47003points.dbf 11 12 12
Many command lines could be used in a single batch file, each with different parameters.

The command line structure must be of the form:

   ptgcmd ... followed by the parameter values on same line
The parameter values are in the same style and sequence and shown in the PTG interactive (see above table).

Usage and Production Applications
Normally, for production applications involving national scope census block groups, the PTG batch version is recommended. To accelerate coding speed, run the applications on a state-by state basis. Use of national scope polygon shapefiles at the block or block group levels is not recommended. For example, with point files structured by state, the PTG command file for coding the states of Missouri (FIPS code 29) and Kansas (FIPS code 20) might appear as follows:

ptgcmd c:\ptg\tl_2009_29_bg00.shp bkgpidfp00 c:\ptg\mo_points.dbf intptlat00 intptlon00 geocode
ptgcmd c:\ptg\tl_2009_20_bg00.shp bkgpidfp00 c:\ptg\ks_points.dbf intptlat00 intptlon00 geocode

where the Missouri block group shapefile is c:\ptg\tl_2009_29_bg00.shp, the Missouri points file is c:\ptg\mo_points.dbf, the Kansas shapefile is c:\ptg\tl_2009_20_bg00.shp, and the Kansas points file is c:\ptg\ks_points.dbf. When the process is completed the field GEOCODE in the two point files would have been updated by PTG.

Arrangements for the polygon shapefiles may vary with application. Some users have polygon shapefiles provided by Proximity while others might make use of shapefiles from other sources. Contact Proximity for more information.


Copyright © . Proximity. All Rights Reserved.
Sitemap | Contact Us | News