33
Taking SQL Server Beyond Relational Into the Realm of Spatial Data Management Michael Rys Principal Program Manager @SQLServerMike

SQLBits X SQL Server 2012 Spatial

Embed Size (px)

DESCRIPTION

SQLBits X Training Day Presentation on SQL Server 2012 Spatial Copyright (c) Microsoft Corp.

Citation preview

Page 1: SQLBits X SQL Server 2012 Spatial

Taking SQL Server Beyond Relational Into the Realm of Spatial Data Management

Michael RysPrincipal Program Manager@SQLServerMike

Page 2: SQLBits X SQL Server 2012 Spatial

Session Objectives and Takeaways

Session Objective(s): You will understand the existing and upcoming spatial capabilities of SQL Server 2012

Know how to optimize your spatial queries

Key Takeaways:SQL Server 2012 offers a comprehensive, easy to use and high-performing spatial offering

Page 3: SQLBits X SQL Server 2012 Spatial

The Business Opportunity

Increased user-sophistication• More data

sources• More kinds of

data• Integrated

systems and mash-ups

Ubiquitous geographical technology• GPS• Online mapping

services• Availability of

geographical data

Page 4: SQLBits X SQL Server 2012 Spatial

Spatial Teaser

demo

Page 5: SQLBits X SQL Server 2012 Spatial

Customer-base management

and development Environmenta

l-related data impact,

analysis, and planning

Financial and economic analysis in

communities

Government-based planning

and development

analysis

Market segmentation and analysis

Scientific research

study design and analysis

Real-estate development and analysis

Spatial Data Scenarios

Page 6: SQLBits X SQL Server 2012 Spatial

What Is Spatial Data?Vector DataRaster Data

Satellite ImageryDigitized Aerial Photos

POINT MULTIPOINT Tree, Pole, Hydrant, Valve

LINESTRING MULTILINESTRING Road, River, Railway, Pipeline

POLYGON MULTIPOLYGONCadastre, Park, Administrative Boundary

COLLECTION Graphics, Markups

Page 7: SQLBits X SQL Server 2012 Spatial

New Spatial Type Features in SQL Server 2012

Circular arcs segmentsCircularStringsCompoundCurvesCurvePolygons

All methods support circular arcs

Circular arc support on a ellipsoidRed – CircularString with 4 pointsYellow – LineString with the same 4 points

Page 8: SQLBits X SQL Server 2012 Spatial

Other New Type Features in SQL Server 2012

New relational methods added to geographyTo match geometry

Invalid objects are accepted for geographyMakeValid will convert them to valid objects

Bigger than a hemisphere objects for geographyFULLGLOBE spatial object is available“small” holes can be created

Increased precision from 27 to 48 bits for spatial computationsPersisted computed columns of a spatial typeSpatial AggregatorsNew Index features

Page 9: SQLBits X SQL Server 2012 Spatial

Creating spatial objects

My GPS position is (@lat, @lon)

Get a region of 20m around medeclare @region geography = geography::Point(@lat, @lon).STBuffer(20);

declare @g geography = geography::Point(@lat, @lon, 4326);

Page 10: SQLBits X SQL Server 2012 Spatial

Using spatial objects

Get all stores within distance X

Get all stores inside a city Xselect * from Stores swhere s.geo.STIntersects(@myCityBoundary)=1

select * from Stores swhere s.geo.STDistance(@me)<@x

Page 11: SQLBits X SQL Server 2012 Spatial

geography data type• Geodetic (“Round Earth”) geospatial model:

• Ellipsoidal coordinates (Lat, Long, Z, M)• Define points, lines, and areas with

longitude and latitude• Account for planetary curvature and obtain

accurate “great circle” distances

geometry data type• Planar (“Flat Earth”) geospatial model

• projected ‘flat map’ (X, Y, Z, M)• Define points, lines, and areas with

coordinates• Use for localized areas or non-projected

surfaces such as interior spaces

Comprehensive Spatial SupportSpatial Data Types

Page 12: SQLBits X SQL Server 2012 Spatial

A Note about Projections

The Mercator projection did not come out until 1569. Please play along

Page 13: SQLBits X SQL Server 2012 Spatial

Spatial format exampleWell-Known-Binary:

0x0103000000010000000500000000000000004CDDC000000000004C0D4100000000004CDD4000000000004CDD4000000000C07A104100000000004CDD400000000000BD0F41000000000088134100000000004CDDC000000000004C0D41Well-Known-Text:'POLYGON(( -30000 240000, 30000 30000, 270000 30000, 260000 320000, -30000 240000))'GML:<Polygon xmlns="http://www.opengis.net/gml">

<exterior><LinearRing><posList> -30000 240000 30000 30000 270000 30000 260000 320000 -30000 240000 </posList></LinearRing></exterior> </Polygon>

Page 14: SQLBits X SQL Server 2012 Spatial

A More Complicated PolygonGEOMETRYCOLLECTION (LINESTRING (249779.875 316019.75, 249771.98655378487 316005.40737051796), POLYGON ((228869.875 314609.75, 228870.82875722542 314611.91763005778, 228852.73214285716 314634.03571428568, 228869.875 314609.75)), LINESTRING (218999.875 310799.75, 218890.89169195751 310666.54817905917), POLYGON ((214987.51136363635 305790.84090909094, 215609.875 305879.75, 215639.875 306329.75, 214987.51136363635 305790.84090909094)), POLYGON ((214949.875 305759.75, 214987.51136363635 305790.84090909094, 214922.60227272729 305781.56818181818, 214949.875 305759.75)), POLYGON ((198779.875 305129.75, 198899.875 306239.75, 198770.62329931973 305154.03571428568, 198779.875 305129.75)), POINT (213689.875 305069.75), LINESTRING (192443.05681818182 299977.02272727271, 192299.875 299849.75), POLYGON ((211164.81006493507 298267.15259740257, 211259.875 298409.75, 211049.875 298979.75, 211164.81006493507 298267.15259740257)), POLYGON ((208559.875 296459.75, 208649.875 296879.75, 208593.18772084807 296870.60689045937, 208559.875 296459.75)), POLYGON ((186209.875 295676.75, 186211.79719679634 295678.23970251717, 186209.875 295679.75, 186209.875 295676.75)), POLYGON ((185486.51051401871 295116.14252336451, 186209.875 295289.75, 186209.875 295676.75, 185486.51051401871 295116.14252336451)), POLYGON ((185465.01013513515 295099.4797297297, 185486.51051401871 295116.14252336451, 185459.875 295109.75, 185465.01013513515 295099.4797297297)), POLYGON ((185400.42045454547 294822.84090909094, 185567.52205882352 294894.45588235295, 185465.01013513515 295099.4797297297, 185129.875 294839.75, 185400.42045454547 294822.84090909094)), POLYGON ((217919.875 293309.75, 217922.22136871508 293311.76117318438, 217979.875 293729.75, 217919.875 293309.75)), POLYGON ((260978.05681818182 291114.29545454547, 260981.41346153847 291116.16025641025, 260999.875 291179.75, 260978.05681818182 291114.29545454547)), POLYGON ((260729.875 290369.75, 260978.05681818182 291114.29545454547, 260339.875 290759.75, 260729.875 290369.75)), POLYGON ((256654.2123493976 288283.484939759, 256705.79733009709 288304.11893203884, 256709.875 288389.75, 256654.2123493976 288283.484939759)), POLYGON ((257129.875 287699.75, 257069.875 288449.75, 256705.79733009709 288304.11893203884, 256679.875 287759.75, 257129.875 287699.75)), POLYGON ((233340.88623595506 287202.55898876407, 233339.875 287219.75, 233327.40563147975 287220.00447690859, 233340.88623595506 287202.55898876407)), POLYGON ((235284.85174418605 286116.3081395349, 235292.54166666669 286117.75, 235289.875 286139.75, 235284.85174418605 286116.3081395349)), POINT (249059.875 286049.75), POLYGON ((249539.875 285299.75, 249605.10755813954 285353.12209302327, 249523.65591872792 285314.16696113074, 249539.875 285299.75)), POLYGON ((249179.875 285149.75, 249523.65591872792 285314.16696113074, 248999.875 285779.75, 249179.875 285149.75)), POLYGON ((235060.13538001408 280522.65640394087, 235589.875 281249.75, 234929.875 281069.75, 235060.13538001408 280522.65640394087)), POLYGON ((234969.1261912866 280397.74183117767, 235079.875 280439.75, 235060.13538001408 280522.65640394087, 234969.1261912866 280397.74183117767)), POLYGON ((255634.01293103449 280197.06034482759, 255899.875 280409.75, 255419.875 280439.75, 255634.01293103449 280197.06034482759)), POLYGON ((255762.41231343284 280051.5410447761, 255634.01293103449 280197.06034482759, 255599.875 280169.75, 255762.41231343284 280051.5410447761)), POLYGON ((256919.875 277979.75, 256949.875 278009.75, 256719.875 278239.75, 256919.875 277979.75)), POLYGON ((233159.875 276899.75, 233339.875 277139.75, 233129.29648760331 276951.73347107437, 233159.875 276899.75)), POLYGON ((257429.875 276569.75, 257849.875 277649.75, 257249.875 277589.75, 257729.875 277889.75, 257399.875 278009.75, 257549.875 278609.75, 256949.875 278009.75, 257129.875 277829.75, 257429.875 276569.75)), POINT (186899.875 272969.75), POLYGON ((40823.531387665193 272066.7896475771, 40829.875 272069.75, 40659.586751662966 273233.38636363635, 40659.158594743538 273233.83647732087, 40823.531387665193 272066.7896475771)), POLYGON ((240029.875 263759.75, 240095.94960035523 263817.56527531083, 240075.5039027654 263838.56355932204, 240029.875 263759.75)), POLYGON ((240179.875 262259.75, 240359.875 262589.75, 239789.875 262769.75, 240509.875 263339.75, 240209.875 263279.75, 240269.875 263969.75, 240095.94960035523 263817.56527531083, 240239.875 263669.75, 239399.875 263099.75, 239339.875 262559.75, 240179.875 262259.75)), POINT (34679.875 261659.75), POLYGON ((226326.93676961603 258612.92195325543, 226314.30139593908 258884.58248730964, 226139.875 258899.75, 226326.93676961603 258612.92195325543)), LINESTRING (225689.875 258989.75, 225779.875 258449.75), POLYGON ((60911.292004048584 257375.70141700405, 60929.875 257399.75, 60881.4787735849 257460.88207547169, 60911.292004048584 257375.70141700405)), POLYGON ((60599.875 256049.75, 61049.875 256979.75, 60911.292004048584 257375.70141700405, 60419.875 256739.75, 60599.875 256049.75)), POINT (54119.875 256019.75), POLYGON ((213799.97994752624 252200.79947526235, 215339.875 253529.75, 213809.875 252299.75, 213799.97994752624 252200.79947526235)), POLYGON ((-41160.125 249569.75, -40827.351502311241 249584.218412943, -40830.125 249599.75, -41160.125 249569.75)), LINESTRING (-42900.125 245639.75, -42877.625 245606), POINT (243389.875 243569.75), POLYGON ((-36122.211553323024 242873.25850077279, -36120.125 242879.75, -36960.125 243809.75, -36122.211553323024 242873.25850077279)), POLYGON ((-39203.875 242554.75, -39208.40625 242790.375, -39240.125 242699.75, -39203.875 242554.75)), POLYGON ((190125.02651515152 241826.41666666669, 190109.875 241859.75, 190045.58928571429 241853.72321428571, 190125.02651515152 241826.41666666669)), POLYGON ((189149.875 241769.75, 190045.58928571429 241853.72321428571, 189329.875 242099.75, 189149.875 241769.75)), POLYGON ((241049.875 241079.75, 241169.875 241469.75, 240998.55921052632 241127.11842105264, 241049.875 241079.75)), POLYGON ((1499.875 241019.75, 1518.9894708423381 241023.57289416847, 1529.875 241529.75, 1499.875 241019.75)), POLYGON ((54964.00673652695 240922.48738237808, 54833.693615751792 241252.92422434368, 54779.875 241169.75, 54964.00673652695 240922.48738237808)), POLYGON ((-16498.736332801287 240808.50498802873, -16500.203328981734 240811.86488250655, -16500.125 240809.75, -16498.736332801287 240808.50498802873)), POLYGON ((-16080.125 239849.75, -16110.125 240239.75, -15630.125 240029.75, -16498.736332801287 240808.50498802873, -16080.125 239849.75)), POLYGON ((236085.96195652173 239801.05434782608, 236151.075 239856.15, 236099.875 239849.75, 236085.96195652173 239801.05434782608)), POLYGON ((4799.875 239729.75, 4804.283352668208 239844.36716937355, 4609.875 239919.75, 4799.875 239729.75)), POLYGON ((55469.875 239639.75, 55829.875 239759.75, 54964.00673652695 240922.48738237808, 55469.875 239639.75)), POINT (-36600.125 239369.75), POLYGON ((-23457.895700636931 238339.24044585988, -23517.142543859663 238419.22368421053, -23490.125 238349.75, -23457.895700636931 238339.24044585988)), POLYGON ((-44729.218655589124 237889.78021148036, -44722.468387470988 237890.00522041763, -44730.125 237899.75, -44729.218655589124 237889.78021148036)), POLYGON ((256602.06951371572 236592.61783042393, 256619.875 236639.75, 256491.075 236953.35, 256602.06951371572 236592.61783042393)), POINT (33179.875 235229.75), LINESTRING (49379.875 235139.75, 49315.927631578947 235068.69736842107), POINT (241049.875 234839.75), POLYGON ((-23906.075323974073 234165.1387688985, -23190.125 234179.75, -23760.125 234719.75, -23906.075323974073 234165.1387688985)), POLYGON ((-23910.125 234149.75, -23906.075323974073 234165.1387688985, -23932.402227722778 234164.60148514851, -23910.125 234149.75)), POINT (240569.875 233879.75), POLYGON ((50129.875 232619.75, 50039.875 233639.75, 50007.506578947374 233672.11842105264, 50129.875 232619.75)), POINT (55229.875 232469.75), LINESTRING (25980.907504780116 232494.53011472276, 25979.875 232469.75), POLYGON ((265369.78911042947 231682.57208588958, 265572.02376033057 232037.84917355373, 265319.875 231869.75, 265369.78911042947 231682.57208588958)), POLYGON ((25799.875 231599.75, 25806.53199782451 231606.776831037, 25798.977639296194 231611.11656891496, 25799.875 231599.75)), POLYGON ((264929.875 230909.75, 265559.875 230969.75, 265369.78911042947 231682.57208588958, 264929.875 230909.75)), POLYGON ((1091.2984875444818 230828.82473309609, 1379.875 230879.75, 1019.875 231209.75, 1091.2984875444818 230828.82473309609)), POLYGON ((1109.875 230729.75, 1091.2984875444818 230828.82473309609, 1001.6453349282238 230813.00358851673, 1109.875 230729.75)), POLYGON ((228839.875 230249.75, 229259.875 230339.75, 229469.875 231149.75, 228779.875 230999.75, 229079.875 230549.75, 228659.875 230609.75, 228959.875 230369.75, 228839.875 230249.75)), POINT (175379.875 230099.75), POINT (263969.875 229919.75), POLYGON ((257461.02884615384 229397.92307692306, 257789.875 229589.75, 257339.875 229589.75, 257461.02884615384 229397.92307692306)), POLYGON ((257600.40131578947 229177.25, 257461.02884615384 229397.92307692306, 257429.875 229379.75, 257600.40131578947 229177.25)), POLYGON ((5159.875 229069.75, 5159.875 229109.75, 5127.5872302158241 229105.95143884892, 5159.875 229069.75)), POLYGON ((4649.875 229049.75, 5127.5872302158241 229105.95143884892, 4829.875 229439.75, 4649.875 229049.75)), POLYGON ((182156.71710526315 226532.23120300751, 182729.875 226859.75, 182429.875 227429.75, 182156.71710526315 226532.23120300751)), POLYGON ((182099.875 226499.75, 182150.97910094637 226513.37776025236, 182156.71710526315 226532.23120300751, 182099.875 226499.75)), POLYGON ((192776.21646341463 225803.89634146341, 192779.875 225809.75, 192769.78847342398 225806.59796044498, 192776.21646341463 225803.89634146341)), POINT (223769.875 225689.75), POLYGON ((2040.4677552140493 221660.66108671788, 2250.0847902097885 222190.86888111889, 1979.875 221669.75, 2040.4677552140493 221660.66108671788)), POINT (258989.875 221639.75), POLYGON ((5009.875 221159.75, 4109.875 221579.75, 4589.875 221819.75, 3449.875 222839.75, 3329.875 222059.75, 2849.875 221969.75, 3149.875 222689.75, 2639.875 222659.75, 2609.875 223139.75, 2249.875 222899.75, 2699.875 223499.75, 2039.875 223709.75, 2219.875 222989.75, 1799.875 223019.75, 1829.875 222569.75, 2399.875 222569.75, 2250.0847902097885 222190.86888111889, 2399.875 222479.75, 2699.875 222269.75, 2219.875 221669.75, 3509.875 221969.75, 3569.875 222479.75, 4079.875 221819.75, 3599.875 221489.75, 5009.875 221159.75)), LINESTRING (245999.875 220889.75, 245972.60227272729 220854.29545454547), LINESTRING (66416.924180327871 220398.93032786885, 66269.875 220319.75), POINT (5549.875 220319.75), POLYGON ((253615.83526490067 219878.35927152319, 253949.875 219929.75, 253859.875 220889.75, 253829.875 220259.75, 253259.875 220319.75, 253615.83526490067 219878.35927152319)), POLYGON ((253633.21570796461 219856.80752212388, 253615.83526490067 219878.35927152319, 253559.875 219869.75, 253633.21570796461 219856.80752212388)), POLYGON ((184248.33653846153 218969.75, 184559.875 218969.75, 184602.0436746988 219106.79819277109, 184109.875 219119.75, 184248.33653846153 218969.75)), POLYGON ((258315.11309523811 218482.84523809524, 258329.875 218519.75, 258309.07627795526 218491.5231629393, 258315.11309523811 218482.84523809524)), POLYGON ((179975.38648225469 217126.56628392485, 179799.02822580645 217463.72177419355, 179729.875 217379.75, 179975.38648225469 217126.56628392485)), POLYGON ((179399.875 216329.75, 179879.875 216749.75, 179868.89460784313 216757.98529411765, 179399.875 216329.75)), POLYGON ((180269.875 216179.75, 180689.875 216389.75, 180684.99364406779 216394.78389830509, 180359.875 216599.75, 180402.86469072165 216685.72938144329, 179975.38648225469 217126.56628392485, 179999.875 217079.75, 179519.875 217019.75, 179868.89460784313 216757.98529411765, 180089.875 216959.75, 180269.875 216179.75)), POLYGON ((246690.05199115042 215754.70575221238, 246779.875 215819.75, 246710.64423076925 215865.90384615384, 246690.05199115042 215754.70575221238)), POLYGON ((269530.47783687944 215274.50177304965, 270479.875 215459.75, 269579.875 215429.75, 269530.47783687944 215274.50177304965)), POLYGON ((-21036.351415094337 214517.86320754717, -20970.125 214619.75, -21103.223591549293 214551.29929577466, -21036.351415094337 214517.86320754717)), POLYGON ((270372.89895209577 214511.96556886227, 270457.375 214529.75, 270389.875 214529.75, 270372.89895209577 214511.96556886227)), POLYGON ((254789.875 213989.75, 254429.875 214529.75, 254405.2922989378 214522.92147192717, 254789.875 213989.75)), POLYGON ((190559.875 213959.75, 190619.875 214619.75, 190929.51610929854 214049.35848287112, 190723.65337116155 215258.8020694259, 190591.25431034481 215384.2327586207, 190229.875 215519.75, 190289.875 214889.75, 189959.875 215219.75, 190169.875 214139.75, 190559.875 213959.75)), POLYGON ((190949.875 213929.75, 190987.82460903563 213941.94808861858, 190929.51610929854 214049.35848287112, 190949.875 213929.75)), POLYGON ((266624.79120111733 213634.94553072625, 266771.51679104473 213807.56387181737, 266759.875 213839.75, 266624.79120111733 213634.94553072625)), POLYGON ((187224.7025862069 213341.95689655171, 187289.875 213389.75, 187139.875 213689.75, 187224.7025862069 213341.95689655171)), POLYGON ((256019.75916988417 213334.49903474905, 256169.875 213659.75, 256769.875 213539.75, 256829.875 214109.75, 257399.875 214019.75, 257009.875 214199.75, 257369.875 214679.75, 256619.875 214169.75, 256679.875 213599.75, 256559.875 214379.75, 255989.875 214559.75, 256019.75916988417 213334.49903474905)), POLYGON ((256012.06678082192 213317.83219178082, 256019.875 213329.75, 256019.75916988417 213334.49903474905, 256012.06678082192 213317.83219178082)), POLYGON ((188027.33437961596 212330.44423929098, 188519.875 213239.75, 187949.875 212399.75, 188027.33437961596 212330.44423929098)), POLYGON ((272069.875 211679.75, 272789.875 212279.75, 272159.875 213239.75, 272669.875 212669.75, 272609.875 213209.75, 273389.875 212969.75, 273659.875 213299.75, 273539.875 213989.75, 273209.875 213359.75, 272729.875 213569.75, 273239.875 213749.75, 273269.875 214379.75, 272879.875 214289.75, 273419.875 214619.75, 272009.875 214319.75, 273149.875 214769.75, 272759.875 215039.75, 273449.875 215699.75, 271889.875 215099.75, 271409.875 215399.75, 271499.875 215879.75, 271079.875 215399.75, 270599.875 215639.75, 270449.875 215009.75, 269969.875 215249.75, 270179.875 214679.75, 271229.875 215459.75, 271379.875 214919.75, 270869.875 215069.75, 270599.875 214559.75, 270457.375 214529.75, 270959.875 214529.75, 270089.875 213599.75, 270239.875 213119.75, 270869.875 213089.75, 270389.875 212369.75, 270659.875 211979.75, 271079.875 212609.75, 270989.875 214199.75, 271409.875 214169.75, 271079.875 214439.75, 271559.875 214229.75, 271259.875 213899.75, 271829.875 212969.75, 271469.875 213179.75, 271589.875 212039.75, 272069.875 211679.75)), POLYGON ((245039.875 211469.75, 244979.875 212489.75, 245459.875 212819.75, 244799.875 213119.75, 246449.875 214019.75, 246359.875 214559.75, 246959.875 214589.75, 246869.875 214919.75, 246149.875 214739.75, 247319.875 215549.75, 246629.875 215429.75, 246690.05199115042 215754.70575221238, 245909.875 215189.75, 245729.875 215639.75, 245549.875 214769.75, 245339.875 215369.75, 244949.875 215279.75, 245549.875 214379.75, 244289.875 213059.75, 243989.875 211559.75, 245039.875 211469.75)), POINT (253679.875 211409.75), POLYGON ((180562.77219626168 211397.78738317758, 180539.875 211469.75, 180484.91632231406 211463.96487603308, 180562.77219626168 211397.78738317758)), POLYGON ((188309.875 210689.75, 188606.02594339621 210813.14622641509, 188249.875 211379.75, 188519.875 211889.75, 188027.33437961596 212330.44423929098, 187739.875 211799.75, 188309.875 210689.75)), POINT (61829.875 210479.75), LINESTRING (176480.38132911391 210542.02848101268, 176459.875 210449.75), POLYGON ((189299.875 210209.75, 188669.875 210839.75, 188606.02594339621 210813.14622641509, 188909.875 210329.75, 189299.875 210209.75)), POINT (178889.875 209819.75), POLYGON ((181095.30709876545 208750.73765432098, 181199.875 208769.75, 181004.80833333335 208851.88333333333, 181095.30709876545 208750.73765432098)), POLYGON ((246924.38719512196 208734.81097560976, 246929.875 208739.75,

246509.875 208979.75, 246924.38719512196 208734.81097560976)), POINT (185579.875 208259.75), POLYGON ((180500.76785714284 207803.85714285716, 181079.875 207929.75, 180719.875 208499.75, 181319.875 208499.75, 181095.30709876545 208750.73765432098, 180539.875 208649.75, 180869.875 208229.75, 180500.76785714284 207803.85714285716)), POLYGON ((180479.875 207779.75, 180500.76785714284 207803.85714285716, 180473.79391891894 207797.99324324325, 180479.875 207779.75)), POLYGON ((191028.39590032154 207631.10048231512, 191009.875 207689.75, 190988.30196629214 207635.81741573033, 191028.39590032154 207631.10048231512)), POLYGON ((269452.89139344264 206455.94672131148, 269549.875 206459.75, 269584.37924929179 206548.47521246458, 269452.89139344264 206455.94672131148)), POINT (180029.875 206219.75), POINT (6359.875 205919.75), POLYGON ((248931.96669054442 205650.82449856732, 248993.44108478804 205700.77244389028, 248969.875 205799.75, 248931.96669054442 205650.82449856732)), POLYGON ((246749.875 205529.75, 246778.68688118813 205635.39356435643, 246690.88851351352 205582.18243243243, 246749.875 205529.75)), POLYGON ((270809.875 205379.75, 271021.30357142858 205488.32142857142, 270799.2867647059 205399.51470588235, 270809.875 205379.75)), POLYGON ((271049.875 204809.75, 271919.875 205949.75, 271021.30357142858 205488.32142857142, 271049.875 205499.75, 270749.875 204929.75, 271049.875 204809.75)), POLYGON ((245399.875 204119.75, 246449.875 204149.75, 246689.875 205199.75, 246179.875 204869.75, 246419.875 205139.75, 246059.875 205199.75, 246690.88851351352 205582.18243243243, 246479.875 205769.75, 245819.875 205259.75, 245969.875 204419.75, 245399.875 204119.75)), POLYGON ((276209.875 203909.75, 276419.875 204299.75, 276389.33607784432 204328.49251497007, 276209.875 203909.75)), POLYGON ((-14043.981722276745 203498.25834151128, -14112.60287610619 203558.51106194689, -14190.125 203519.75, -14043.981722276745 203498.25834151128)), POLYGON ((185161.65014792897 201889.80917159765, 185024.14561310783 201952.58298097251, 185009.875 201929.75, 185161.65014792897 201889.80917159765)), POLYGON ((184739.875 200704.75, 184739.875 200849.75, 184663.39148351649 200921.45329670329, 184739.875 200704.75)), POLYGON ((222276.50816582915 200584.8756281407, 222929.875 201089.75, 222149.875 200759.75, 222276.50816582915 200584.8756281407)), POLYGON ((222269.875 200579.75, 222279.3611660079 200580.93577075098, 222276.50816582915 200584.8756281407, 222269.875 200579.75)), POLYGON ((222499.08848314607 200277.50280898876, 222749.875 200639.75, 222279.3611660079 200580.93577075098, 222499.08848314607 200277.50280898876)), POLYGON ((222739.46683673468 199795.46428571429, 222779.875 199889.75, 222499.08848314607 200277.50280898876, 222479.875 200249.75, 222739.46683673468 199795.46428571429)), POINT (83459.875 198899.75), POLYGON ((254381.45394736843 198240.27631578947, 254565.06487341772 198614.56012658228, 254549.875 198629.75, 254381.45394736843 198240.27631578947)), POLYGON ((254999.875 198179.75, 255449.875 198719.75, 254969.875 199439.75, 254565.06487341772 198614.56012658228, 254999.875 198179.75)), POLYGON ((253469.875 197879.75, 253523.15858208956 197917.80970149254, 253490.275 197920.55, 253469.875 197879.75)), POLYGON ((42991.025159744415 197768.8554313099, 43229.875 197879.75, 43147.642083734361 197933.71535129933, 42991.025159744415 197768.8554313099)), POLYGON ((42269.875 197009.75, 42991.025159744415 197768.8554313099, 42389.875 197489.75, 42659.875 197969.75, 42269.875 197849.75, 42269.875 197009.75)), POLYGON ((2411.8262195121933 196623.40853658537, 2446.834064327486 196647.64473684211, 2339.875 196709.75, 2411.8262195121933 196623.40853658537)), POLYGON ((-18780.125 195479.75, -18240.125 195509.75, -18240.125 195532.43292682926, -18780.125 195479.75)), POINT (260279.875 195179.75), POLYGON ((-4607.1211977186322 195090.54847908745, -4598.4228723404231 195201.45212765958, -4680.125 195119.75, -4607.1211977186322 195090.54847908745)), POINT (83579.875 194759.75), LINESTRING (267449.875 194369.75, 267424.63514760148 194315.06365313655), POLYGON ((237869.875 194249.75, 237876.07800751878 194263.39661654134, 237867.19570365359 194269.39817320704, 237869.875 194249.75)), POLYGON ((238739.875 193679.75, 238499.875 194099.75, 238949.875 194399.75, 238469.875 194279.75, 238589.875 194789.75, 238319.875 194489.75, 238169.875 194909.75, 237876.07800751878 194263.39661654134, 238739.875 193679.75)), POLYGON ((113656.46019051042 193574.04906542055, 113609.875 193649.75, 113526.69143132221 193639.35205391527, 113656.46019051042 193574.04906542055)), POLYGON ((-26891.375 192738.75862068965, -26100.125 192929.75, -26310.125 193199.75, -26891.375 192738.75862068965)), POLYGON ((-26978.087085308071 192669.98696682465, -26891.375 192738.75862068965, -26970.125 192719.75, -26978.087085308071 192669.98696682465)), POLYGON ((251789.06963087249 192533.70973154361, 251792.32954545456 192539.47727272727, 251789.875 192539.75, 251789.06963087249 192533.70973154361)), POLYGON ((251729.875 192089.75, 251859.76058352404 192095.79118993136, 251736.59255725192 192140.13167938931, 251729.875 192089.75)), POLYGON ((115993.28846153847 191676.52884615384, 116009.875 192389.75, 113656.46019051042 193574.04906542055, 114329.875 192479.75, 114989.875 192329.75, 114629.875 192689.75, 114899.875 192869.75, 115799.875 192299.75, 115993.28846153847 191676.52884615384)), POLYGON ((251789.875 191429.75, 252359.875 191939.75, 252719.875 191669.75, 253019.875 192149.75, 251859.76058352404 192095.79118993136, 252209.875 191969.75, 251789.875 191429.75)), POLYGON ((251729.875 191429.75, 251459.875 192239.75, 251736.59255725192 192140.13167938931, 251789.06963087249 192533.70973154361, 251639.875 192269.75, 251519.875 192929.75, 250829.875 192479.75, 251279.875 192539.75, 251009.875 191579.75, 251729.875 191429.75)), POLYGON ((115986.6200611477 191389.7876293509, 116069.875 191429.75, 115993.28846153847 191676.52884615384, 115986.6200611477 191389.7876293509)), POLYGON ((257249.875 191159.75, 257614.8889275766 191775.71100278551, 257609.875 191789.75, 257249.875 191159.75)), POLYGON ((234029.875 190949.75, 234037.65742677823 190988.66213389122, 233987.078539823 190972.79424778762, 234029.875 190949.75)), POLYGON ((233339.875 190769.75, 233987.078539823 190972.79424778762, 233639.875 191159.75, 233339.875 190769.75)), POLYGON ((264239.875 190229.75, 264253.34908829175 190239.0782149712, 264059.875 190589.75, 264239.875 190229.75)), LINESTRING (116699.875 189689.75, 116621.81048387097 189632.97580645161), POINT (166199.875 188999.75), POLYGON ((165975.5703642384 188420.21357615895, 165989.875 188429.75, 165972.73214285716 188446.89285714287, 165975.5703642384 188420.21357615895)), POLYGON ((177329.875 188219.75, 177929.875 188399.75, 177327.65277777778 188227.68650793651, 177329.875 188219.75)), LINESTRING (262902.66363232682 188083.60435168739, 262889.875 188069.75), POLYGON ((234673.27122641509 187812.39150943398, 234676.49662162163 187862.38513513515, 234629.875 187829.75, 234673.27122641509 187812.39150943398)), POLYGON ((101032.25159963437 186485.01508226691, 101369.875 187469.75, 100469.875 187079.75, 100589.875 186629.75, 100979.875 186809.75, 101032.25159963437 186485.01508226691)), POLYGON ((101009.875 186419.75, 101042.40347380409 186422.07346241458, 101032.25159963437 186485.01508226691, 101009.875 186419.75)), POLYGON ((179551.08712121213 185767.7803030303, 179729.875 186509.75, 179647.61693548388 186487.81451612903, 179489.875 186119.75, 179551.08712121213 185767.7803030303)), POLYGON ((179279.875 185699.75, 179279.875 186389.75, 179647.61693548388 186487.81451612903, 179849.875 186959.75, 180269.875 186569.75, 180119.875 187649.75, 180629.875 187469.75, 180299.875 188279.75, 181019.875 186689.75, 181829.875 186629.75, 180839.875 188369.75, 180389.875 188369.75, 180899.875 188639.75, 181169.875 188069.75, 180869.875 188789.75, 180509.875 188609.75, 181199.875 189509.75, 181169.875 190139.75, 180689.875 190199.75, 180029.875 189419.75, 180269.875 189149.75, 180509.875 189479.75, 180539.875 188999.75, 178589.875 188129.75, 178529.875 187769.75, 179069.875 188099.75, 179429.875 186779.75, 178679.875 186179.75, 179219.875 186389.75, 179279.875 185699.75)), LINESTRING (236129.875 185729.75, 236109.16703539825 185564.08628318584), LINESTRING (237509.875 185039.75, 237442.04248768473 184979.45443349754), LINESTRING (260879.875 184379.75, 260856.82621951221 184346.45731707316), POLYGON ((216846.31536697247 182036.77752293577, 216849.36148648648 182039.93243243243, 216839.875 182039.75, 216846.31536697247 182036.77752293577)), POLYGON ((218408.82704262878 181957.84946714033, 218399.875 182069.75, 218008.7108208955 182062.2276119403, 218408.82704262878 181957.84946714033)), POLYGON ((229981.83578431374 181876.41666666666, 230279.875 182129.75, 230039.875 182369.75, 229981.83578431374 181876.41666666666)), POLYGON ((229979.875 181859.75, 229981.83578431374 181876.41666666666, 229972.38939539349 181868.38723608444, 229979.875 181859.75)), POLYGON ((218459.875 181319.75, 218669.875 181889.75, 218408.82704262878 181957.84946714033, 218459.875 181319.75)), POLYGON ((261578.65789473685 181123.07236842104, 261593.29336734695 181132.45408163266, 261599.875 181169.75, 261578.65789473685 181123.07236842104)), LINESTRING (126429.18534482759 180978.37068965516, 126419.875 180959.75), LINESTRING (10236.019578313251 180848.78614457831, 10079.875 180809.75), POLYGON ((261299.875 180509.75, 261578.65789473685 181123.07236842104, 261089.875 180809.75, 261299.875 180509.75)), POLYGON ((278729.875 180389.75, 279899.875 180449.75, 280409.875 181589.75, 279989.875 181589.75, 279989.875 181919.75, 279809.875 181619.75, 279419.875 182129.75, 279299.875 181529.75, 280079.875 181409.75, 278729.875 180869.75, 278729.875 180389.75)), POLYGON ((259169.875 179459.75, 259169.14329268292 179462.67682926828, 259167.13261772852 179462.74168975069, 259169.875 179459.75)), POLYGON ((110037.83120437956 179170.62591240875, 110009.875 179729.75, 109499.875 179879.75, 110037.83120437956 179170.62591240875)), POLYGON ((110039.875 179129.75, 110055.75010271158 179147.00554642564, 110037.83120437956 179170.62591240875, 110039.875 179129.75)), POLYGON ((-36930.125 178889.75, -36864.421577946778 178918.4952471483, -36928.922327394219 178906.58741648108, -36930.125 178889.75)), POLYGON ((177719.45736658934 178704.59918793503, 177737.875 178742.75, 177629.875 178769.75, 177719.45736658934 178704.59918793503)), POLYGON ((264089.875 178559.75, 264179.875 178619.75, 264084.58088235295 178572.10294117648, 264089.875 178559.75)), POLYGON ((272309.875 177719.75, 272911.31212574849 177831.12724550898, 272909.875 177839.75, 272309.875 177719.75)), POLYGON ((-26130.125 177599.75, -25710.125 177599.75, -25713.44078947368 177614.11842105264, -26130.125 177599.75)), POLYGON ((206099.875 177449.75, 204671.875 178010.75, 204449.875 177899.75, 206099.875 177449.75)), POINT (-1950.125 177389.75), POLYGON ((239434.82870370371 177231.78703703705, 239489.875 177269.75, 239433.74596774194 177279.42741935485, 239434.82870370371 177231.78703703705)), POLYGON ((272339.875 176849.75, 272325.650862069 176867.85344827586, 271649.875 177179.75, 272339.875 176849.75)), POLYGON ((271675.55845323741 176605.21762589927, 271679.875 176639.75, 271169.875 176819.75, 271675.55845323741 176605.21762589927)), POLYGON ((271619.875 176159.75, 271660.36043689318 176483.63349514562, 271649.875 176489.75, 271619.875 176159.75)), POLYGON ((239459.875 176129.75, 239434.82870370371 177231.78703703705, 238619.875 176669.75, 239459.875 176129.75)), POLYGON ((238658.24709302327 175427.19186046513, 238649.875 175499.75, 238639.4402173913 175455.40217391306, 238658.24709302327 175427.19186046513)), POLYGON ((219539.875 175229.75, 218879.875 176399.75, 219179.875 176789.75, 218759.875 177239.75, 219149.875 178049.75, 218879.875 179369.75, 219419.875 179369.75, 219479.875 178049.75, 219929.875 177899.75, 219689.875 178319.75, 219959.875 178829.75, 220289.875 178199.75, 220409.875 179249.75, 219689.875 179279.75, 218849.875 180689.75, 218819.875 179519.75, 218429.875 180539.75, 217229.875 181169.75, 217409.875 181469.75, 216989.875 181319.75, 217049.875 180749.75, 216809.875 181589.75, 217229.875 181859.75, 216846.31536697247 182036.77752293577, 216269.875 181439.75, 216689.875 179909.75, 218519.875 177539.75, 218429.875 176729.75, 219539.875 175229.75)), POLYGON ((238529.875 174989.75, 238639.4402173913 175455.40217391306, 238349.875 175889.75, 238199.875 175409.75, 238529.875 174989.75)), POLYGON ((277676.90406350914 174466.96205597417, 277711.36493288592 174549.01174496644, 277679.875 174539.75, 277676.90406350914 174466.96205597417)), POLYGON ((180149.36081560282 174240.06914893616, 180269.875 175169.75, 179279.875 174779.75, 180149.36081560282 174240.06914893616)), POLYGON ((180148.72115384616 174235.13461538462, 180149.875 174239.75, 180149.36081560282 174240.06914893616, 180148.72115384616 174235.13461538462)), POLYGON ((173849.15403871829 173840.37750333778, 173863.14532136105 173841.58364839319, 173849.875 173849.75, 173849.15403871829 173840.37750333778)), POINT (200189.875 173639.75), POLYGON ((-17700.125 173279.75, -17700.875 173289.5, -17701.141949152545 173289.41101694916, -17700.125 173279.75)), POLYGON ((212176.66151685393 173125.70505617978, 212489.875 173159.75, 212339.875 173669.75, 212176.66151685393 173125.70505617978)), POLYGON ((212159.875 173069.75, 212176.66151685393 173125.70505617978, 211963.29605263157 173102.51315789475, 212159.875 173069.75)), POLYGON ((276389.875 172649.75, 276929.875 172799.75, 277079.875 173549.75, 277619.875 173069.75, 277676.90406350914 174466.96205597417, 277379.875 173759.75, 276659.875 174359.75, 276389.875 172649.75)), POINT (-15120.125 172649.75), POINT (264959.875 172589.75), POINT (235829.875 172409.75), POLYGON ((234271.98767605634 172348.42203219316, 234299.875 172349.75, 234291.625 172415.75, 234271.98767605634 172348.42203219316)), LINESTRING (-15540.125 172409.75, -15489.725000000006 172300.55), POINT (-21720.125 172289.75), POLYGON ((-16680.125 172259.75, -16650.125 172379.75, -16709.38880368098 172367.05061349692, -16680.125 172259.75)), POLYGON ((263159.875 172109.75, 263347.70108695654 172767.14130434784, 263249.875 172799.75, 263159.875 172109.75)), POLYGON ((255299.875 171899.75, 255155.36795774647 172598.20070422534, 254999.875 172469.75, 255299.875 171899.75)), POLYGON ((184109.875 171719.75, 184195.75669642858 171773.99107142858, 184171.94396551725 171983.54310344829, 184109.875 171719.75)), POLYGON ((47459.413461538468 171450.67307692306, 48119.875 171719.75, 47849.875 172379.75, 47039.875 172289.75, 47459.413461538468 171450.67307692306)), POLYGON ((47459.875 171449.75, 47459.413461538468 171450.67307692306, 47457.820205479453 171450.02397260274, 47459.875 171449.75)), POLYGON ((233939.875 171209.75, 234271.98767605634 172348.42203219316, 233669.875 172319.75, 234119.875 171869.75, 233939.875 171209.75)), POLYGON ((218939.875 170969.75, 218398.48682519281 171292.50064267352, 218399.875 171239.75, 218939.875 170969.75)), POLYGON ((211679.875 170819.75, 211672.14666276347 170828.88348946135, 211672.30823442136 170822.42062314542, 211679.875 170819.75)), POLYGON ((210809.875 170729.75, 210689.875 171239.75, 211349.875 171209.75, 211672.14666276347 170828.88348946135, 211649.875 171719.75, 212219.875 171689.75, 211679.875 171869.75, 211859.875 172379.75, 211109.875 173009.75, 211963.29605263157 173102.51315789475, 211619.875 173159.75, 212009.875 173579.75, 211739.875 174749.75, 212249.875 175259.75, 210839.875 176279.75, 210629.875 174749.75, 210419.875 175499.75, 210029.875 174689.75, 210419.875 173549.75, 209519.875 172229.75, 209759.875 171329.75, 210809.875 170729.75)), POLYGON ((232199.875 170579.75, 232651.66307947019 170730.34602649006, 232139.875 171479.75, 232195.75177725119 170641.59834123222, 232199.875 170639.75, 232195.90911513858 170639.2382729211, 232199.875 170579.75)), POLYGON ((231325.64964788733 170416.16851106641, 231329.875 170429.75, 231318.63904494382 170429.1882022472, 231325.64964788733 170416.16851106641)), POLYGON ((232884.2770797227 170389.73266897746, 232889.875 170399.75, 232739.875 170759.75, 232651.66307947019 170730.34602649006, 232884.2770797227 170389.73266897746)), POLYGON ((13379.875 168059.75, 12921.965909090912

168159.29545454544, 12929.875 168119.75, 13379.875 168059.75)), LINESTRING (147433 167793.5, 147419.875 167759.75), POLYGON ((180948.82236842107 167317.64473684211, 181469.875 167459.75, 181423.26145418326 167493.93326693226, 180929.875 167339.75, 180948.82236842107 167317.64473684211)), POLYGON ((144659.875 167279.75, 144663.39578239608 167299.70110024451, 144660.9585214447 167302.50395033861, 144659.875 167279.75)), POLYGON ((181289.875 166919.75, 180948.82236842107 167317.64473684211, 180809.875 167279.75, 181289.875 166919.75)), LINESTRING (173879.875 166409.75, 173890.12816455695 166397.21835443037), LINESTRING (180929.875 166139.75, 180938.20099118943 166109.22136563878), POLYGON ((140126.91535874439 165654.50336322869, 140159.875 165779.75, 140059.76747311826 165827.1693548387, 140126.91535874439 165654.50336322869)), POLYGON ((140594.3577586207 165495.2672413793, 140369.875 165719.75, 140431.29009433964 165523.22169811319, 140594.3577586207 165495.2672413793)), POLYGON ((1638.359848484848 165471.26515151514, 1589.875 165479.75, 1584.6951438848919 165472.84352517987, 1638.359848484848 165471.26515151514)), LINESTRING (152305.29251527495 165215.06568228107, 152279.875 165119.75), POLYGON ((256679.875 163289.75, 256692.10447761195 163308.36007462686, 256673.85916886543 163297.2697889182, 256679.875 163289.75)), POINT (148199.875 162719.75), POLYGON ((227609.875 161969.75, 227429.875 162329.75, 227969.875 162599.75, 227759.875 161969.75, 228599.875 162119.75, 228179.875 162089.75, 228929.875 162869.75, 228509.875 163649.75, 229289.875 164309.75, 228989.875 164549.75, 228539.875 164069.75, 227729.875 164879.75, 227909.875 164159.75, 227519.875 163649.75, 228089.875 163739.75, 228359.875 163259.75, 227849.875 163319.75, 227579.875 162539.75, 227339.875 162899.75, 227699.875 163139.75, 227249.875 163469.75, 226919.875 162029.75, 227609.875 161969.75)), POLYGON ((228740.23214285716 161839.03571428571, 228920.4013157895 162039.22368421053, 228823.875 162135.75, 228599.875 162119.75, 228740.23214285716 161839.03571428571)), POLYGON ((255179.875 161759.75, 255839.875 163409.75, 256019.875 162899.75, 256673.85916886543 163297.2697889182, 256079.875 164039.75, 255299.875 162779.75, 255209.875 163919.75, 254999.875 162749.75, 253769.875 162329.75, 254189.875 161789.75, 255179.875 161759.75)), POLYGON ((228665.38199300697 161755.86888111889, 228779.875 161759.75, 228740.23214285716 161839.03571428571, 228665.38199300697 161755.86888111889)), POLYGON ((227009.875 161699.75, 227221.05239403452 161706.90855572998, 227249.875 161759.75, 226987.56095041323 161736.94008264464, 227009.875 161699.75)), POLYGON ((195125.31478349119 161110.69722598104, 195179.875 161129.75, 195116.29884105962 161133.98841059604, 195125.31478349119 161110.69722598104)), POLYGON ((216749.875 161067.14130434784, 216750.88882488478 161067.53801843317, 216749.875 161069.75, 216749.875 161067.14130434784)), POLYGON ((216798.47965116281 160963.70348837209, 217139.875 161219.75, 216750.88882488478 161067.53801843317, 216798.47965116281 160963.70348837209)), POLYGON ((216820.58928571429 160915.46428571429, 216798.47965116281 160963.70348837209, 216779.875 160949.75, 216820.58928571429 160915.46428571429)), POLYGON ((225509.875 160829.75, 225869.875 161039.75, 225869.23602236423 161043.42412140576, 225509.875 160829.75)), POLYGON ((185169.475 160750.55, 185219.875 160859.75, 185122.95192307694 160843.59615384616, 185169.475 160750.55)), POLYGON ((216749.875 160739.75, 216749.875 161067.14130434784, 216449.875 160949.75, 216149.875 161339.75, 215969.875 161039.75, 216749.875 160739.75)), POINT (221969.875 160019.75), POLYGON ((138719.875 159629.75, 138672.4498502994 159698.73203592814, 138631.875 159669.75, 138719.875 159629.75)), POLYGON ((-37794.237903225818 159606.52419354839, -37826.263865368324 159695.21147332768, -37860.125 159689.75, -37794.237903225818 159606.52419354839)), POLYGON ((138029.875 159239.75, 138631.875 159669.75, 138389.875 159779.75, 138029.875 159239.75)), POLYGON ((39530.9082103321 156591.44741697417, 39542.084302325587 156826.14534883722, 39449.875 156719.75, 39530.9082103321 156591.44741697417)), POLYGON ((278463.4044117647 156542.32918552036, 278937.90131578944 156578.82894736843, 278699.875 156869.75, 278463.4044117647 156542.32918552036)), POLYGON ((278969.875 156539.75, 278959.16071428568 156580.46428571429, 278937.90131578944 156578.82894736843, 278969.875 156539.75)), POLYGON ((278429.875 156495.90384615384, 278463.4044117647 156542.32918552036, 278429.875 156539.75, 278429.875 156495.90384615384)), LINESTRING (197635.3973880597 156496.76492537314, 197639.875 156479.75), POLYGON ((278429.875 156220.65909090909, 278429.875 156495.90384615384, 278309.875 156329.75, 278429.875 156220.65909090909)), POLYGON ((278429.875 156209.75, 278440.13815789472 156211.32894736843, 278429.875 156220.65909090909, 278429.875 156209.75)), POLYGON ((278639.875 156029.75, 279209.875 156329.75, 278440.13815789472 156211.32894736843, 278639.875 156029.75)), POLYGON ((230849.875 155459.75, 230240.64043209876 155811.23148148149, 230219.875 155789.75, 230849.875 155459.75)), POLYGON ((228696.15878378379 155341.37162162163, 228675.34908343869 155574.44026548672, 228629.875 155429.75, 228696.15878378379 155341.37162162163)), POLYGON ((169289.875 155159.75, 169295.79605263157 155163.30263157893, 169290.81576655051 155164.7674216028, 169289.875 155159.75)), POINT (136559.875 155069.75), POLYGON ((277641.23093220335 154230.76694915255, 277619.875 154319.75, 277616.75232342008 154284.61988847583, 277641.23093220335 154230.76694915255)), POLYGON ((222479.875 153779.75, 222452.29291044775 153796.49626865672, 222431.3455882353 153781.36764705883, 222479.875 153779.75)), POLYGON ((198198.78495260666 153261.78791469196, 198186.14916520211 153277.131370826, 198179.875 153269.75, 198198.78495260666 153261.78791469196)), POLYGON ((221069.875 153149.75, 221081.2807507987 153164.51038338657, 221066.63175675675 153163.53378378379, 221069.875 153149.75)), POLYGON ((277979.875 152819.75, 278069.875 153989.75, 277859.875 153749.75, 277641.23093220335 154230.76694915255, 277979.875 152819.75)), POLYGON ((199829.875 152789.75, 199709.875 153779.75, 198809.875 154229.75, 197969.875 153539.75, 198186.14916520211 153277.131370826, 198689.875 153869.75, 199349.875 153779.75, 199139.875 153209.75, 199829.875 152789.75)), POLYGON ((259835.0474137931 152486.64655172415, 259679.875 153029.75, 259739.875 152519.75, 259835.0474137931 152486.64655172415)), POLYGON ((171932.53036723164 152291.50141242938, 171899.875 152309.75, 171880.60833333334 152305.21666666667, 171932.53036723164 152291.50141242938)), POLYGON ((182249.875 151109.75, 182260.78409090909 151115.20454545453, 182220.54915730338 151146.15449438203, 182249.875 151109.75)), POINT (210089.875 149639.75), POLYGON ((64779.731801909307 149197.1008353222, 64859.875 149219.75, 64988.644230769234 149484.44230769231, 64889.875 149459.75, 64779.731801909307 149197.1008353222)), POLYGON ((207122.26438053098 148303.02433628318, 208109.875 148589.75, 207119.875 148319.75, 207122.26438053098 148303.02433628318)), POLYGON ((185031.14212328766 145966.49657534246, 185058.46654929576 146033.56562099874, 185009.875 146039.75, 185031.14212328766 145966.49657534246)), POLYGON ((181531.49662162163 145194.88513513515, 181532.71710526315 145195.32894736843, 181529.875 145199.75, 181531.49662162163 145194.88513513515)), POLYGON ((181799.875 144779.75, 181829.875 145289.75, 182339.875 145229.75, 181409.875 145529.75, 181709.875 145259.75, 181532.71710526315 145195.32894736843, 181799.875 144779.75)), POLYGON ((263879.80892070488 143212.67951541851, 263994.25 143232.875, 263909.875 143279.75, 263879.80892070488 143212.67951541851)), POLYGON ((264719.875 142829.75, 264599.875 143339.75, 263994.25 143232.875, 264719.875 142829.75)), POLYGON ((261115.981870229 141993.41412213742, 261209.875 142049.75, 261185.85826359832 142114.93828451884, 261115.981870229 141993.41412213742)), POINT (175949.875 139379.75), POLYGON ((277079.875 136499.75, 277169.875 136829.75, 277075.82848837209 136500.58720930232, 277079.875 136499.75)), POLYGON ((223229.875 126779.75, 223226.64630044843 126828.98766816143, 223214.13355513307 126787.27851711027, 223229.875 126779.75)), POLYGON ((223289.875 125759.75, 223649.875 126479.75, 223139.875 126539.75, 223214.13355513307 126787.27851711027, 222539.875 127109.75, 222389.875 126569.75, 223139.875 126479.75, 223289.875 125759.75)), POLYGON ((211499.875 125729.75, 211501.19703389832 125731.2754237288, 211529.875 126089.75, 211499.875 125729.75)), POLYGON ((145461.17348229344 124306.14123102867, 145529.875 124379.75, 145449.04166666666 124320.18859649124, 145461.17348229344 124306.14123102867)), POINT (-2250.125 123899.75), POLYGON ((144899.875 123359.75, 144424.53519417477 123429.65291262136, 144389.875 123419.75, 144899.875 123359.75)), POLYGON ((147029.875 123239.75, 146339.875 123809.75, 147329.875 123299.75, 147779.875 123689.75, 146129.875 124319.75, 145889.875 123809.75, 145461.17348229344 124306.14123102867, 145109.875 123929.75, 146159.875 123359.75, 147029.875 123239.75)), POLYGON ((268008.56609947642 122638.80759162305, 267928.13438566553 122748.48720136519, 267809.875 122759.75, 268008.56609947642 122638.80759162305)), POLYGON ((-4471.1362359550549 121959.86235955056, -4240.6411290322576 122068.33064516129, -4320.125 122129.75, -4471.1362359550549 121959.86235955056)), POLYGON ((267834.238449692 121733.22022587269, 267929.875 121799.75, 267684.09663588391 121810.43601583113, 267834.238449692 121733.22022587269)), POLYGON ((-3660.125 121619.75, -3660.125 122189.75, -3390.125 121829.75, -3780.125 122969.75, -3346.3232675649633 123756.0156400385, -3383.4583333333285 123907.93181818182, -3630.125 124109.75, -3990.125 122909.75, -4290.125 123809.75, -4590.125 122699.75, -4800.125 122999.75, -4890.125 122249.75, -4200.125 122459.75, -4110.125 122129.75, -4240.6411290322576 122068.33064516129, -3660.125 121619.75)), POLYGON ((268227.48236196319 120456.74386503067, 268649.875 120779.75, 268199.875 120479.75, 268227.48236196319 120456.74386503067)), POLYGON ((246045.83244680852 119424.64361702127, 246179.875 119759.75, 246029.875 119429.75, 246045.83244680852 119424.64361702127)), POLYGON ((238689.71875 119108.1875, 238829.875 119129.75, 238784.79962311557 119157.48869346734, 238689.71875 119108.1875)), POLYGON ((167514.7025862069 118333.19827586207, 167489.875 118469.75, 167336.875 118451.75, 167514.7025862069 118333.19827586207)), POLYGON ((145139.875 118319.75, 144419.875 119309.75, 145469.875 118889.75, 144929.875 119639.75, 142949.875 120779.75, 142979.875 122129.75, 142409.875 121979.75, 142169.875 120869.75, 141479.875 120809.75, 141809.875 120179.75, 141479.875 120119.75, 141869.875 120119.75, 141899.875 119789.75, 142319.875 120149.75, 144419.875 119519.75, 142379.875 119819.75, 142739.875 119339.75, 142499.875 118949.75, 142289.875 119189.7

GEOMETRYCOLLECTION (POLYGON ((228869.875 314609.75, 228870.82875722542 314611.91763005778, 228852.73214285716 314634.03571428568, 228869.875 314609.75)), LINESTRING (218999.875 310799.75, 218890.89169195751 310666.54817905917), POLYGON ((214987.51136363635 305790.84090909094, 215609.875 305879.75, 215639.875 306329.75, 214987.51136363635 305790.84090909094)), POLYGON ((214949.875 305759.75, 214987.51136363635 305790.84090909094, 214922.60227272729 305781.56818181818, 214949.875 305759.75)), …..

Page 15: SQLBits X SQL Server 2012 Spatial

Spatial Examples

demo

Page 16: SQLBits X SQL Server 2012 Spatial

Circular ArcsGeography Type Considerations

CIRCULARSTRING (0 50, 90 50, 180 50, 270 50, 0 50)

CURVEPOLYGON (CIRCULARSTRING (0 50, 90 50, 180 50, 270 50, 0 50))

If a circular linestring encloses an area, a curve polygon can be created

Coordinate pair order is importantfor the geography type. This setof coordinates is ordered accordingto the “left foot rule” for exteriorrings.

Page 17: SQLBits X SQL Server 2012 Spatial

Both types provide static and instance methodsCalculate distances, find intersections, etc.

SELECT StreetNameFROM StreetsWHERE Streets.StreetGeo.STIntersects(@ms) = 1

Find streets that intersect the Microsoft campus

Performing Spatial Operations

Page 18: SQLBits X SQL Server 2012 Spatial

Spatial operations

BOOLEAN OPERATIONS

STUnionSTIntersectionSTDifferenceSTSymDifference

RELATION OPERATIONS

STIntersectsSTContainsSTWithinSTTouchesSTOverlaps

CONSTRUCTIONS

STConvexHullSTBufferSTReduceBufferWithCurves

NUMERICAL OPERATIONS

STDistanceSTLengthSTAreaShortestLineTo

Page 19: SQLBits X SQL Server 2012 Spatial

New Spatial Methods in SQL Server 2012

To both types geometry\geography STCurveN(int n)Int STNumCurves()geometry\geography STCurveToLine()geometry\geography CurveToLineWithTolerance(int tolerance, bool relative)geometry\geography BufferWithCurves(double range)geometry\geography ShortestLineTo(geometry\geography other)Bool CompatibleWithDbCompatibilityLevel(int compatLevel)

To GEOGRAPHY typeBool STIsValid()Geography MakeValid()Bool STContains(geography other)Bool STWithin(geography other)Bool STOverlaps(geography other)Geography STConvexHull()Bool ReorientObject(geography other)

Page 20: SQLBits X SQL Server 2012 Spatial

New Methods for Circular ArcsBufferWithCurves

BufferWithCurves()

DECLARE @g GEOGRAPHY = GEOGRAPHY::STGeomFromText('CIRCULARSTRING(0 50, 45 50, 90 50)',4326)DECLARE @b GEOGRAPHY = @g.BufferWithCurves(500000)SELECT @b.STNumPoints()--Number of vertices: 11

DECLARE @g GEOGRAPHY = GEOGRAPHY::STGeomFromText('CIRCULARSTRING(0 50, 45 50, 90 50)',4326)DECLARE @b GEOGRAPHY = @g.STBuffer(500000)SELECT @b.STNumPoints()--Number of vertices: 257

This method will construct theresulting polygon with circular arcs, often resulting in a dramatically smaller spatialobject.

Page 21: SQLBits X SQL Server 2012 Spatial

New GEOGRAPHY MethodsReorientObject

ReorientObject

• This method will reverse the order of coordinates which define polygon rings.

• This method is a NoOp on line strings, circular arcs and points.

• This method does only work with the GEOGRAPHY type.

Page 22: SQLBits X SQL Server 2012 Spatial

Convert Existing Data to Spatial Data

Convert 2 columns (latitude, longitude) to geography

or

alter table MyTableadd geo as (geography::Point(lat, lon, 4326)) persisted

update MyTableset geo = geography::Point(lat, lon, 4326)

Page 23: SQLBits X SQL Server 2012 Spatial

Spatial Reference ID (SRID)Each Spatial object has an SRID associatedSRID is “locale” for spatial objects

Determines Coordinate systemMeasurementsProjection semanticsGeoid dimensions

Only objects of same SRID can operationally be combinedSRID for GEOGRAPHY (default: WGS 84)

Impacts operational semantics390 predefined SRIDs based on European Petroleum Survey Group List:select * from sys.spatial_reference_systemsSQL Server 2012: We added 1 Microsoft specified SRID for a spherical globe!

SRID for GEOMETRY (default: 0)User-defined, no impact on operational semantics

Page 24: SQLBits X SQL Server 2012 Spatial

Convert Existing Data to Spatial Data

Use address geocoder to convert addresses to points (Latitude, Longitude)zip codes to polygons

Web services:Bing MapsGoogle MapsYahoo PlaceFinderOpenStreetMapsESRIOthers…

webgis.usc.edu/Services/Geocode/About/GeocoderList.aspx

Page 25: SQLBits X SQL Server 2012 Spatial

Generate Your Own

Dynamic data generationGPS devicesCamerasPhones

Using toolsBing MapsIDV Spatial wikiOthers…

www.idvsolutions.com/products_spatialWiki.aspx

Page 26: SQLBits X SQL Server 2012 Spatial

Get More Out of Your Data

Use spatial aggregates to getCity boundaries out of the zip codesState boundaries out of the zip codesCountries out of the states

UnionAggregate EnvelopeAggregate CollectionAggregateConvexHullAggregate

Page 27: SQLBits X SQL Server 2012 Spatial

Get Additional Data

Get it freeAsk your local governmentFederal, State and Local data www.geodata.govOpen source maps www.openstreetmap.orgthe U.S. Census Bureau www.census.gov/geo/www/cob

Buy itESRIPitney Bowes MapInfoNAVTEQTeleAtlasdatamarket.azure.com

and others....

Page 28: SQLBits X SQL Server 2012 Spatial

How do I Load Spatial Data?

Shape2SQLDownload from SharpGIS.netBuilt using the redistributable spatial library.WPF project using the Builder APIDoes not need to be on the same machine as the database instance

MapPoint Add-in for SQL ServerFree downloadNeeds Microsoft MapPoint (Free Trial available)

SAFE FMECommercial grade, lots of options

ESRI ArcGISPitney Bowes EasyLoader

Michael Rys
Add info/slide about Paul's SSIS loader
Page 29: SQLBits X SQL Server 2012 Spatial

Generating and Loading Spatial Data

demo

Page 30: SQLBits X SQL Server 2012 Spatial

High Performance Spatial CapabilitiesSpatial Indexing

Spatial indexing is built into the query engine

Grid-based quad-tree index structure

Query optimizer determines cost-based query plans

Page 31: SQLBits X SQL Server 2012 Spatial

Status of Spatial in SQL Azure

SQL Server 2008 Spatial support got added to SQL Azure in Summer 2010SQL Server 2012 is extending Spatial Capabilities, some are already available in SQL Azure now!

Capabilities that can work with compat level 100

Page 32: SQLBits X SQL Server 2012 Spatial

What is new in SQL Azure Spatial Support in 2011

New MethodsGEOGRAPHY Parity with GEOMETRY TYPE: STContains, STOverlaps etcNew Capabilities:

AsBinaryZM(), IsValidDetailed(), ShortestLineTo()Spatial Aggregators: CollectionAggregate, ConvexHullAggregate, EnvelopeAggregate*, UnionAggregate

Better PerformanceNearest Neighbor Query PlanPersisted Computed Spatial ColumnsUnitSphere SRID 104001 for GEOGRAPHY

Page 33: SQLBits X SQL Server 2012 Spatial

• geometry and geography data types

• Methods for spatial operations

Take advantage of comprehensive spatial support

• Store spatial data with business data• Spatial indexing

Build high performance spatial

solutions

• Industry-standards compatibility• Comprehensive programmatic

library

Extend and integrate geospatial

applications

Conclusion