SAS/GIS 9.4: Spatial Data and Procedure Guide

SAS/GIS? 9.4: Spatial Data and Procedure Guide

SAS? Documentation

The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2013. SAS/GIS? 9.4: Spatial Data and Procedure Guide. Cary, NC: SAS Institute Inc.

SAS/GIS? 9.4: Spatial Data and Procedure Guide

Copyright ? 2013, SAS Institute Inc., Cary, NC, USA

All rights reserved. Produced in the United States of America.

For a hardcopy book:No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, or otherwise, without the prior written permission of the publisher, SAS Institute Inc.

For a Web download or e-book:Your use of this publication shall be governed by the terms established by the vendor at the time you acquire this publication.

The scanning, uploading, and distribution of this book via the Internet or any other means without the permission of the publisher is illegal and punishable by law. Please purchase only authorized electronic editions and do not participate in or encourage electronic piracy of copyrighted materials. Your support of others' rights is appreciated.

U.S. Government Restricted Rights Notice: Use, duplication, or disclosure of this software and related documentation by the U.S. government is subject to the Agreement with SAS Institute and the restrictions set forth in FAR 52.227?19 Commercial Computer Software-Restricted Rights (June 1987).

SAS Institute Inc., SAS Campus Drive, Cary, North Carolina 27513.

Electronic book 1, June 2013

SAS? Publishing provides a complete selection of books and electronic products to help customers use SAS software to its fullest potential. For more information about our e-books, e-learning products, CDs, and hard-copy books, visit the SAS Publishing Web site at support. publishing or call 1-800-727-3228.

SAS? and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ? indicates USA registration.

Other brand and product names are registered trademarks or trademarks of their respective companies.

Contents

About This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v What's New in SAS/GIS 9.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii Recommended Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix

Chapter 1 ? Overview of SAS/GIS Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Introduction to Geographic Information Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Features of SAS Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Data in SAS/GIS Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Using the SAS/GIS Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Accessing the SAS/GIS Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Chapter 2 ? Preparing Spatial Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Assessing Your Spatial Data Needs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Downloading TIGER/Line Spatial Data Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Examples of Common Spatial Data Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Changing the Default Characteristics of a Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Linking the Attribute Data to the Spatial Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Saving the Map Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Chapter 3 ? Importing Spatial Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Overview of Importing Spatial Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 The GIS Spatial Data Importing Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Common Importing Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Importing ArcInfo Interchange Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Importing DLG Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Importing DXF Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Importing Dynamap Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Importing MapInfo Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Importing SAS/GRAPH Map Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Importing TIGER Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Importing Generic Spatial Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Defining Composites in Imported Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Defining Layers in Imported Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 The SASHELP.GISIMP Data Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

Chapter 4 ? Batch Importing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Overview of Batch Importing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 The Batch Import Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Examples of Batch Importing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 File Reference Table for Batch Importing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 TIGER 2007 ? Present Shapefile Variables for the FACES File Type . . . . . . . . . . . . . 57 Hints and Tips for Batch Importing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

Chapter 5 ? Working with Spatial Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 SAS/GIS Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Data Set and Catalog Entry Interactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Merging Spatial Data with the MERGE= Argument . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Sample SAS/GIS Spatial Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Hints and Tips for Working with Spatial Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

iv Contents

Chapter 6 ? Batch Geocoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Overview of Batch Geocoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Addresses in Spatial Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Using Batch Geocoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 How Batch Geocoding Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 %GCBATCH Macro Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 Batch Geocoding Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Hints and Tips for Batch Geocoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

Chapter 7 ? The GIS Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Overview: GIS Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Concepts: GIS Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Syntax: The GIS Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

Appendix 1 ? Sample Map Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 Map and Data Sets Supplied with SAS/GIS Software . . . . . . . . . . . . . . . . . . . . . . . . . 171 Maps in the USA Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 Maps in the NC Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Maps in the WAKE Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 Copying and Modifying SAS/GIS Maps in the MAPS or MAPSSAS Library . . . . . . 175 Maps Produced by the SAS/GIS Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176

Appendix 2 ? Spatial Database Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 The SAS/GIS Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 SAS/GIS Spatial Database Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 Composites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

Appendix 3 ? Calculating Chain Rank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 RANK Value Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 Chain Rank Calculation Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195

Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205

v

About This Book

Using This Document

Prerequisite

This document is written for users who want to use the SAS/GIS geographic information system to explore data in the context of a map. You must have a map in order to use SAS/GIS software. Furthermore, the map must be in a spatial data format that SAS/GIS software can use.

This document is written for users who are experienced in using the SAS System. You should understand the concepts of programming in the SAS language. The following table summarizes the SAS System concepts that you need to understand in order to use SAS/GIS.

Task Invoke the SAS System at your site

Reference

Instructions provided by the on-site SAS support personnel

Use Base SAS software

Use the DATA step to create and manipulate SAS data sets

Use the SAS windowing environment or SAS Enterprise Guide to enter, edit, and submit program code

Base documentation library: ? SAS Language Reference: Concepts ? SAS Data Set Options: Reference ? SAS Formats and Informats: Reference ? SAS Functions and CALL Routines:

Reference ? SAS Statements: Reference ? SAS System Options: Reference ? Base SAS Utilities: Reference

Allocate SAS libraries and assign librefs Create external files and assign filerefs

Documentation for using the SAS System in your operating environment:

? SAS Companion for Windows

? SAS Companion for UNIX Environments

? SAS Companion for z/OS

Manipulate SAS data sets using SAS procedures

Base SAS Procedures Guide

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download