Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Graduate of Lycoming College - Majors in Computer Science and Mathematics Moved to Lancaster to work with former professor at Market Metrics Joined GeoDecisions in 2003 and headed development team at PennDOT GIS Certificate from PSU, GISP and OCA certifications Corporate faculty at Harrisburg University Founded in 1986 by faculty and staff of Penn State. In January 1992, became part of Gannett Fleming Gannett Fleming is an engineering company with more than 2,100 employees, serving clients worldwide since 1915. IT consulting company specializing in Geospatial Technology. Role of the DBA What’s Geospatial Technology Spatial Data Basics How Databases Support Spatial Data GIS Applications Jobs in the GIS Industry Questions Database backup and recovery Database modifications Update statistics Synchronize replicated data with parent databases Database upgrades User administration Requirements and System Analysis Database design Database standards development Stored procedure, function, trigger development Query optimization Developer support Maps Global Positioning Systems (GPS) Geographic Information Systems (GIS) Land Surveying Remote Sensing Geography Smart Mapping Links geographic information (where things are) with descriptive information (what things are). Used to answer questions and make decisions – – – – Location: What is at…? Trends: What happened since..? Patterns: What spatial patterns exist? Modeling: What if…? Location, location, location Data integration Data visualization Collaborative decision making Solving business problems Because it’s estimated that over 80% of all data has a spatial component Locations Events Flows Coverage History customers, stores auto accidents, births traffic, package deliveries area of radio broadcast growth of population in a town Traditional Data Layers Point Layer Street Lights, Houses, Crime locations Line Layer Streets, Utility Lines, Streams Polygon Layer Water bodies, Land parcels, Parks Raster/Grid Layer Satellite Imagery Spatial Layer Geometries Elements Point Line Polygon How do databases support spatial data? Definition: A geodatabase is a database that’s designed to store and query data that’s related to objects in space including points, lines, and polygons Typical databases are designed to support numeric and character data; spatial databases add support for spatial data types usually referred to as geometry or feature Spatial Measurements – Calculate the distance between two features Spatial Functions – Create features based on existing ones using operations such as buffering, intersection, and union. Spatial Predicates – Spatial queries based on topologic relationships or proximity to other features. Constructor Functions – Create new features by specifying the feature attributes such as vertices and spatial reference. Geometry Functions – Return geometry information such a area, diameter, length, or centroid of a feature. Spatial data support was added in SQL Server 2008 There are two types of spatial data in SQL Server – Geometry – Geography The GEOMETRY data type supports Euclidean, or planar (flat-earth) data. The GEOGRAPHY data type supports ellipsoidal (round-earth) data such as Longitude and Latitude coordinates. The GEOMETRY and GEOGRAPHY data types support eleven types of objects. Only seven of these types can be instantiated within the database. A Point is a zero-dimensional object that represents a single location. For the geography data type, X and Y represent longitude and latitude respectively. Longitude is always within (-180, 180) and Latitude is always within (-90, 90). The following example creates a geometry Point instance representing the point (3, 4) with an SRID of 0: DECLARE @g geometry; SET @g = geometry::STGeomFromText('POINT (3 4)', 0); A LineString is a two-dimensional object representing a sequence of points and the line segments connecting them. A LineString must have at least two points or be NULL to be valid. The following example shows how to create a LineString geometry with three points and an SRID of 0: DECLARE @g geometry; SET @g = geometry::STGeomFromText('LINESTRING(1 1, 2 4, 3 9)', 0); A Polygon is a two-dimensional surface stored as a sequence of points defining an exterior bounding ring and zero or more interior rings. The following example creates a simple Polygon with a hole and SRID 10: DECLARE @g geometry; SET @g = geometry::STPolyFromText('POLYGON((0 0, 0 3, 3 3, 3 0, 0 0), (1 1, 1 2, 2 1, 1 1))', 10); Each spatial instance has a spatial reference identifier (SRID). The SRID corresponds to a spatial reference system based on the specific ellipsoid used for either flatearth mapping or round-earth mapping. The geography spatial data type is implemented as a .NET common language runtime (CLR) data type in SQL Server. The SQL Server geography data type stores ellipsoidal data, such as GPS latitude and longitude coordinates. The geography type is predefined and available in each SQL Server database. CREATE TABLE SpatialTable ( id int IDENTITY (1,1), GeogCol1 geography, GeogCol2 AS GeogCol1.STAsText() ); GO INSERT INTO SpatialTable (GeogCol1) VALUES (geography::STGeomFromText('LINESTRING(-122.360 47.656, 122.343 47.656)', 4326)); INSERT INTO SpatialTable (GeogCol1) VALUES (geography::STGeomFromText('POLYGON((-122.358 47.653, 122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653))', 4326)); GO To demonstrate spatial operations, we’ll create three tables Points, Lines, and Polygons as follows: CREATE ID NAME GEOM ); GO CREATE ID NAME GEOM ); GO CREATE ID NAME GEOM ); GO TABLE Points ( INT IDENTITY(1,1) PRIMARY KEY, VARCHAR(64), GEOMETRY TABLE Lines ( INT IDENTITY(1,1) PRIMARY KEY, VARCHAR(64), GEOMETRY TABLE Polygons ( INT IDENTITY(1,1) PRIMARY KEY, VARCHAR(64), GEOMETRY INSERT INTO Points VALUES('Point1', geometry::STGeomFromText('POINT(3 4)',0)); INSERT INTO Points VALUES('Point2', geometry::STGeomFromText('POINT(5 3)',0)); INSERT INTO Points VALUES('Point3', geometry::STGeomFromText('POINT(5 2)',0)); INSERT INTO Points VALUES('Point4', geometry::STGeomFromText('POINT(2 4.7)',0)); INSERT INTO Points VALUES('Point5', geometry::STGeomFromText('POINT(4.1 2)',0)); INSERT INTO Lines VALUES('Line1', geometry::STGeomFromText('LINESTRING(2 2, 5 5)',0)); INSERT INTO Lines VALUES('Line2', geometry::STGeomFromText('LINESTRING(5 1, 6 1, 6 2, 7 2, 7 3)',0)); INSERT INTO Lines VALUES('Line3', geometry::STGeomFromText('LINESTRING(4 7, 5 1.5)',0)); INSERT INTO Polygons VALUES('Area1', geometry::STGeomFromText('POLYGON ((1 1, 4 1, 4 5, 1 5,1 1))',0)); INSERT INTO Polygons VALUES('Area2', geometry::STGeomFromText('POLYGON ((5 4, 5 7, 8 7, 8 4, 5 4))',0)); INSERT INTO Polygons VALUES('Area3', geometry::STGeomFromText('POLYGON ((2 3, 6 3, 6 6, 2 6, 2 3))',0)); GO SELECT pt.name, pt.geom.STBuffer(.1) FROM polygons pol, Points pt WHERE pol.name = 'Area1' AND pol.geom.STIntersects(pt.geom) = 1 SELECT pol.name, pol.geom FROM polygons pol, lines ln WHERE ln.name = 'Line1' AND ln.geom.STIntersects(pol.geom) = 1 Intersecting and Unioning Spatial Objects Proximity Queries Spatial Buffer SELECT a1.geom.STIntersection(a3.geom) FROM Polygons a1, Polygons a3 WHERE a1.NAME = 'Area1' AND a3.name = 'Area3' SELECT P.name FROM Lines L3, Points P WHERE L3.NAME = 'Line3' AND L3.geom.STDistance(P.geom) <= .4; Name -----Point2 Point3 SELECT l3.geom.STDistance(p2.geom) Distance FROM Lines l3, Points p2 WHERE l3.NAME = 'Line3' AND p2.NAME = 'Point2'; Distance ----------------0.268328157299975 SELECT TOP(2) p.name, l3.GEOM.STDistance(p.geom) Distance FROM Lines l3, Points p WHERE l3.NAME = 'Line3' ORDER BY 2 ASC; Name -----Point3 Point2 Distance -----------------0.0894427190999916 0.268328157299975 SELECT p.name Point, a.name Area FROM Points p JOIN Polygons a ON p.geom.STIntersects(a.GEOM)=1 ORDER BY 1, 2; Point Area ------ ----Point1 Area1 Point1 Area3 Point2 Area3 Point4 Area1 Point4 Area3 What’s the longest trail in Lancaster County? What’s the largest state park in Pennsylvania? How many abandoned mines are within 5 miles of Tuscarora State Park? What’s the municipality with the most abandoned mines? What’s the closest wetland to the intersection of routes 83 and 130? What municipality has the largest area of state parks? Internet application to view store information and track gasoline truck positions in near-realtime. People that live in New York can get information about environmental and health issues in the city Tracks progress toward making New York City a better place to work and live Crash Analysis and Reporting System (CARS) provides DelDOT with easy-to-use tools to get quick access to crash data, and present it in a form that is easy to understand. PennDOT uses RCRS to manage information and communications related to accidents and events affecting Pennsylvania drivers. Developed for the U.S. Military Tracks the movement of military vehicles, equipment, and personnel worldwide Offers near-real-time access to world-wide information Uses IRRIS to ensure the safe and secure movement of all FEMA mobile equipment. GIS Job Descriptions – DBAs • Provide database support, create databases to support application development – Analysts • Create and maintain GIS data, Perform research – Software Developers • Create GIS-based web and desktop applications – Project Managers • Manage GIS projects and staff Likes/Dislikes – Make a difference – Team Environment – Stressful at times Education!!! Networking – Social – Professional Internships Certifications – GISP – PMP – Vendor-Specific (ESRI, Oracle, etc.) Doug Argall, Sr. Data Architect [email protected]