Download presentation
1
WinGapSQL and GIS Mark Lovett & Rusty Scoven
2015 WinGap Conference WinGapSQL and GIS Mark Lovett & Rusty Scoven
2
2018 V3 (DBF) Official Support Ends
3
Managing GIS data using database connections
ArcMap for Desktop Basic License SSMS (Sequel Server Management Studio)
4
ArcMap Query Layer Stand alone table created from a connected database Provides for live updates from the database directly to the map project Must have a database connection in order to be created Utilizes SQL syntax in order to create the stand alone table Works much like a SQL view query Only exists within the map project it was created in Are read only Editable when accessed via certain types of services/licenses
6
From the catalogue tree create a database connection
Double click Add Database Connection
7
Database Connection window will appear and be blank
Must add the SQL Instance and the Authentication Type The Instance can be found within SSMS (see next slide) The Authentication Type for Windows Authentication will be Operating system authentication Those users that use password protected authentication will select Database Authentication and enter the user name and password
8
SQL Instance name as seen from SSMS
9
Back to the Database Connection window
The Database can either be keyed or as a test to see if you entered the correct Instance and Authentication Type, you can click the drop down arrow and select the database you wish to query from. The Query Layer will only pull from that database
10
Once the database connection is established it will display in the Catalogue tree
You can rename it by right clicking on it if you prefer or take the default It will default to being disconnected (appear with a red x beside it) To connect it double click the connection you created (red x will disappear and a + will appear to the left
11
Once connected you will be able to see all of the WinGap dbo tables within the database
These dbo tables cannot and should not be renamed, deleted, copied, cut, changed or manipulated in any shape form or fashion Any manipulation of these tables could result in WinGap SQL malfunctioning If you are an individual that is click happy DO NOT click the + symbol
12
To create the Query Layer Go to:
File>>>>>Add Data>>>>>Add Query Layer
13
The New Query Layer window opens
14
Select your database connection by clicking the drop down arrow
A list of all the dbo tables within the database will appear
15
First give the query layer a name on the Name line
As for the query, a couple of ways to skin this cat You can build the query by navigating through the list of dbo tables, selecting the table and then selecting the field names from the columns box OR you can use SSMS to build your query and copy and paste
18
After you have built your query you can click Validate to ensure it is correct and then click Finish
19
After you click finish the new Query Layer table will appear in the Table of Contents window
20
To view the table, right click on the table, and select Open
21
The attribute table will display showing the columns you selected in the query
22
The table will update as changes are made in WinGap SQL
Example is Realkey 2, lets remove the Homestead Code in WinGap SQL
25
Once the change is made in WinGap SQL you must refresh the data so that it can update in ArcMap
Refreshing the data can be done in two ways, closing the table and reopening it OR by selecting Reload Cache from the table while it is open
26
After performing either option to refresh the table will update
27
The Query Layer can be edited or changed to fit the user’s needs
To edit the Query Layer, right click on the table, select properties
28
From the Source tab select Change Query
29
The Edit Query Layer will open
You can now add or subtract from the original query
32
The Query Layer also allows for pulling data from multiple tables using SQL join commands
For these types of queries I prefer SSMS but you can use the query window within ArcMap as well
35
Major benefit in using Query Layer is on the fly updates from WinGAP SQL
Another PLUS is not having to maintain a bunch of fields within shapefile or geodatabase The Query Layer can be joined to spatial layers and as updates are made in WinGap SQL they will be reflected in the map
36
Attribute table from parcel data
37
To perform the join, right click on the shapefile, select Joins and Relates, the select Join
38
Join Data window appears
Select the primary key to join the data on, click OK
39
Message below may appear
Select Perform Join Now Without Index
40
Join occurs Open attribute table to review the joined data
41
For the update example lets look at Realkey 5723
Acreage discrepancy requires an update
44
Refresh the attribute table using the same method
45
Table updates
46
Can be used with symbology and thematic mapping updates
To use symbology, right click on the layer you want to symbolize, then click properties
47
The Layer Properties window will appear
Click on the Symbology tab, select categories, then select the field you wish to symbolize on followed by add all values
48
The example I am using is the Taxdistrict field from WinGapSQL
The example shows a parcel that appears to be in the wrong Tax District
53
Click the refresh button from the map to see the update.
54
Using a SQL View with ARCGIS
55
SQL Views Creating SQL Views Joining SQL views with ARCGIS
56
Query from SSMS: Lets say you have a complex query, and you would like to use those results with your parcel data This a query that compares data from two different data years
57
CREATING A VIEW IN SIMPLE FORM
CREATE VIEW view_name AS SELECT column_name(s) FROM table_name WHERE condition
58
CREATING A VIEW FROM THE SSMS QUERY
CREATE VIEW view_name AS SELECT column_name(s) FROM table_name WHERE condition
59
Where does my VIEW live?
60
Adding the VIEW to ARCGIS
61
Joining the View to the Parcel Layer
62
Now Lets Display the Queried Parcels
63
Visual display of our data may indicate incorrect Neighborhood changes
64
Using joined data for analysis
65
Example: You want to determine if parcels are more valuable within a one mile radius of a school
66
In our example you have joined a Query Layer or a View to your Parcel Layer
67
Select by Location from PARCELS that are within a distance of 5,280 feet (1 mile) from SCHOOLS
68
Now you have selected all of the parcels within a one mile radius of the schools
69
Now you have your selection, lets move it to a usable report
70
Now you have a usable spreadsheet to use for analysis
71
What if you have a spreadsheet of information that you would like to Map and Analyze with your Parcel Data?
72
Example: You have been given a list of parcels that should have been combined. You want to determine if these combinations have been completed.
73
First you will add your Excel data to ARCGIS
74
Next step: Joining to our Parcel Layer
75
Now that you have joined the combination list to the parcel data you can select parcels by attributes from the Excel data. Using SELECT BY ATTRIBUTES You can select any parcel that was supposed to be Deleted as a result of a combination by selecting any parcel that has a Realkey from the Deleted Parcel
76
Now you have a visual representation of the parcels that should have been deleted per a combination with another parcel
77
WinGAPSQL + ARCGIS = Time Saving Analysis
This is just a sampling of the many things that can be accomplished by using these two powerful tools! WinGAPSQL + ARCGIS = Time Saving Analysis
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.