Vous êtes sur la page 1sur 20

Streamlining Data Management

Using SDE Spatial Views

Virginia GIS Conference


October 23, 2006

Stuart Blankenship
Geographic Information System Manager
Software

• ArcSDE 9.1 (SQL Server)


• ArcIMS 9.1
• ArcGIS Desktop 9.1 (ArcInfo, ArcView)
• 3-D Analyst, Spatial Analyst, Network Analyst Extensions
• ERDAS Imagine
• ArcGIS Server (Future Development)
Database Management

• Update Data Using Versioned Editing in SDE


• Script Runs Nightly to Reconcile and Post all Versions
and Compress the Database
• Edits Display on Website by Next Day
• Use SDE Spatial Views to Join SDE Layers and Attributes
Stored in Separate SQL Server Databases
• Allows GIS to Maintain Geography While Other Divisions
Maintain Attribute Information
Versioning at DEFAULT

VEDP
MAIN

NAME1 NAME2 NAME3

Name = Name of person who created and is editing version


Users Permission Level
SDE_EDIT user reconciles/posts to main parent version as appropriate
SDE Super user
SDE user reconcile/posts from main version to default version
SDE_EDIT Edit all data
Each version is protected

Important • Be sure to reconcile personal version with main version when beginning each edit session.
• Post to main version regularly when edits are complete so other users can reconcile any changes.
Notes
• GIS Manager will post all changes from main to protected default version.
Automated Reconcile/Post/Compress
of SDE Database

• Batch Script Runs Nightly When Usage is Low


• Rename Old Shapefile Exports by Appending Date to Name
• Create Backup Shapefiles of Frequently Edited Layers
• Alter Main Version to Public for Reconcile/Post
• Run Automated Reconcile/Post Script
• Downloaded from ArcScripts
• Drop All SDE Users
• Delete Versions
• Compress Database
• Create Versions
VEDP Central Websites VEDP Internal Applications
Database VirginiaScan VirginiaAllies
GIS Crystal Reports
• Assures that all VEDP employees
and applications are drawing from
the same data source

• Helps to prevent duplication of


effort between divisions Output

• Allows for better organization of


data SQL Server

Databases
Linking Tables
Higher Education Demographics GIS Data (SDE) Sites Schools
GIS Data Sites
Degrees Offered Population Sites Geography Sites Test Scores
Sites Geography Sites Enrollment Households County Geography Counties Enrollment
County Geography Counties

Sites ID Number Sites ID Number


Sites Sites
Geography Attributes

Sites Geography with Attributes


Input
County FIPS County FIPS
County County
Geography Attributes
Direct Data Load Data Editing Applications
County Geography with
Attributes Access
Spreadsheets Microsoft Custom Web
Databases
Geography and attributes can be Access Applications
edited independently
SDE Spatial Views
• Join Between Spatial and Non-Spatial Data That Takes Place at
the Database Level
• Specialized Version of Typical Database View
• Views are Also Created for Feature and Spatial Index
Tables
SDE Spatial Views Versus ArcMap Joins
• Advantages
• Can Take Advantage of Full Capability of RDBMS (More
Complex Queries Can Be Performed)
• Any Client That Can Consume SDE Layers Can Use Spatial
Views (Joins in ArcMap Are Saved in an .mxd or .lyr file)

• Disadvantages
• More Complex to Setup and Required Some RDBMS
Experience
• Versioned Feature Classes Require Special Treatment (more
later)
Spatial View
Examples
• SDE Layer Joined to Data
in Separate “Geography”
Database Maintained by
Other Divisions at VEDP
Complex Queries
Complex
Queries
Spatial View Examples

• Allows for Joins to


Multiple Records in
Other SQL Server
Databases
Spatial View Examples
Spatial View Examples –
Web Applications
Creating Spatial Views - SDE Command Line

sdetable -o create_view
-T SV_HIGHER_ED
-t "HIGHER_ED,dbo.v_Higher_Education"
-c "HIGHER_ED.SHAPE, HIGHER_ED.NAME, v_Higher_Education.Type"
-w HIGHER_ED.INSTCODE=v_Higher_Education.Instcode
-u username
-p password
-s server
-i sde_instance
-D database

• Don’t Need to Specify All Columns in Command Line


• View Can Be Modified Using RDBMS Management Tools
Modifying/Maintaining Spatial Views -
SQL Server Enterprise Manager
Considerations

• Important to Maintain
Table Structure
•Select Columns
Individually Instead of
Using Select *
• Consider Using Trigger
to Notify GIS Staff When
Records Have Been
Added or Deleted
SDE Spatial Views and Versions
• Spatial Views Are Not Version Aware and Will NOT Pull Data
from Adds and Deletes Tables
• SDE Database Needs to Be Fully Compressed Regularly
Which Will Push All Changes Into the Business Table
• Until Compress is Performed, View Will Not Function
Properly
• Possibly Use SDE Multiversioned Views Which Will
Allow Access to Multiversioned Business Table
Conclusions
• Spatial Views Can Be a Great Tool for Data Management If
You Need to Pull Together Data From Multiple Sources
• Be Aware That There Is Not a Great Deal of Documentation –
ESRI’s Support Center Does Have Some Good Discussions on
the Subject Among SDE Users
• If You’re SDE Database Is Versioned and Data Is Regularly
Edited, Regular Database Compression Should Be Built Into the
Workflow
• The New Release of ArcSDE 9.2 Will Have an Impact on How
Spatial Views Are Managed (Non-Versioned Editing)
New VirginiaScan Interactive Map
Thank You

http://www.yesvirginia.org
http://gis.vedp.org

Vous aimerez peut-être aussi