.. GIS tools and methods to develop and update location shapefiles .. location shapefiles are essential to most GIS applications. Location shapefiles, or point shapefiles, enable viewing/analyzing locations on a map and attributes of these locations such store or customer ID, street address, city, date updated, value, ZIP code and wide-ranging attributes about the location. This section reviews tools and methods to develop and use location shapefiles. See more detail about topics covered in this section in the related Web page.
Viewing/Analyzing Store Locations in the Dallas, TX Area
The following graphic illustrates how store locations can be shown in context of other geography and associated demographic-economic attributes. This view shows store locations (red markers) in context of Dallas city (blue cross-hatch pattern) and broader metro area. Markers shown in this view are based on a location shapefile created using steps described below. The identify tool is used to click on a location and show attributes in a mini-profile.
.. view developed with ProximityOne CV XE GIS and related GIS project.
View the locations contextually with thematic patterns by tract or other geography. Combine views of store, customer, agent, competitor and other location shapefiles.
The following view shows patterns of median household income by census tract.
.. view developed with ProximityOne CV XE GIS and related GIS project.
Development of location shapefiles often starts with a list of addresses. Locations are not always address-oriented; they might be geographically dispersed measurement or transaction locations — having no address assigned. In applications reviewed here, locations are organized as rows in a CSV file. Each CSV file contains like-structured attributes for each location. The example used in this section uses store locations located in the Dallas, TX area.
There are two basic methods used to create location shapefiles: 1) geocoding address-data contained in the source data file or 2) using the latitude-longitude of the location included in the source data file record. The focus here is on option 2 — using the latitude-longitude of the location already present in the source data file.
Creating a Location Shapefile
The process of creating a location shapefile uses the CV XE GIS Manage Location Shapefile feature. With CV running, the process is started with File>Tools>ManageLocationShapefile. The following form appears.
.. ManageLocationShapefile feature/operation in ProximityOne CV XE GIS.
CV XE GIS provides other ways to create location shapefiles:
• Tools>AddShapes>Points — click points on the map window canvas.
• Tools>FindAddress — creates a single point shapefile based on specified address.
• Tools>FindAddress (Batch) — creates a point shapefile based on specified file of address records.
See details in User Guide.
Steps to Create a Location Shapefile
The process of creating the shapefile “C:\cvxe\1\locations1pts.shp” can be viewed by clicking the Run button on the form (with CV running). Two input CSV structured files are required:
• data definition file
• source data file
There are two sets of illustration location input files included with the CV installer:
• locations1_dd.csv and locations1.csv (7 locations in Johnson County, KS)
• locations2_dd.csv and locations2.csv (252 locations in Dallas and Houston)
These files are located in the \1 (typically c:\cvxe\1) folder. The marker/location shapefile used in the map shown above was created using the lcoations2 input files.
Data Definition File
The Data Definition (DD) file is an ASCII/text file structured as a CSV file. It may created with any text editor. The DD file is specific to the source data file. But in the case of recurring source data files for different periods the same DD file might apply to many source data files. There are several rules and guidelines for development of the DD file:
• there is one line/record for each field in the source data file.
• each line/record must be structured in an exact form:
.. each line/record is comprised of exactly 4 elements separated by a comma:
.. 1 field name for subject matter item
– must consist of 1 to 10 characters and include no blanks or special characters
.. 2 field type: C for character, N for numeric
.. 3 field length: an integer specifying the maximum with of the field
.. 4 maximum number of decimals for field (value is 0 for character fields)
The DD File must include three final fields:
The structure of these three DD file records must be as shown above. The source data file, described below, must have the LATITUDE and LONGITUDE fields populated with accurate values. The GEOID field may populated with either an accurate value of placeholder value like 0.
Example. Data for each store for the default DD file name “C:\cvxe\1\locations1_dd.csv” include the following fields/attributes:
Optionally create a DD File using the Create DD File button on the form. Clicking this button will create a DD File containing attributes of the dBase file specified in the associated edit box. The DD File name is created from the dBase file name. If the dBase file name is “c:\cvxe\1\locations1pts.dbf”, the DD File will be named “c:\cvxe\1\locations1pts_dd.csv”.
About the GEOID
The GEOID is a 15 character code which defines the Census 2010 census block containing each location. The GEOID is generally assigned by the ManageLocationShapefile operation and is one of the important and distinctive features of this tool. The GEOID is used to uniquely determine, with the GIS application, any of the following: state, county, census tract, block group, or census block.
The GEOID, as used in this section, is the 15 character Census 2010 geocode for the census block. The GEOID value 481130002011012 (see in location profile in map at top of section) is structured as:
state FIPS code: 48 (2 chars)
county FIPS code: 113 (3 chars)
census tract code 000201 (6 chars)
census block code: 1012 (4 chars) (block group code: 1 — first of 4 characters)
About the Source Data File
The Source Data File is an ASCII/text file structured as a CSV file. It is typically developed by exporting/saving an Excel or dBase file in CSV structure. There are several rules and guidelines for development of the source data file:
• fields must be structured and arranged as defined in the DD File.
• character fields must not contain embedded commas.
• final items in record sequence must be:
.. LATITUDE – must have accurate decimal degree value; 6 digit precision suggested.
.. LONGITUDE- must have accurate decimal degree value; 6 digit precision suggested.
.. GEOID – this may be 0, not assigned or the accurately assigned GEOID value.
– optionally create/rewrite the GEOID used in the new shapefile.
Updates; Combining Vintages of Location Attributes
Location based data might update frequently, even daily. The recommended method to add, update and extend the scope of location-based data is to create new address shapefiles corresponding to different vintages or dates covered. The structure of the files must be the same so that they files can be used together or separately. Suppose there is one set of data covering year to date and a second set of data covering the following month. The ManagePointShapefile operation would be run once for each time period. Two shapefiles would be created. These shapefiles may be added to a GIS project and used separately or in combination to view/analyze patterns.
Join me in a Data Analytics Lab session to discuss more details about accessing and using wide-ranging demographic-economic data and data analytics. Learn more about using these data for areas and applications of interest.
About the Author
— Warren Glimpse is former senior Census Bureau statistician responsible for innovative data access and use operations. He is also the former associate director of the U.S. Office of Federal Statistical Policy and Standards for data access and use. He has more than 20 years of experience in the private sector developing data resources and tools for integration and analysis of geographic, demographic, economic and business data. Contact Warren. Join Warren on LinkedIn.
You must be logged in to post a comment.