CREATE SCHEMA test_schema
GO

CREATE TABLE test_schema.test_geometry (
	TST_ID uniqueidentifier NOT NULL,
	TST_GEOMETRY geometry,
	CONSTRAINT PK_test_geometry PRIMARY KEY CLUSTERED 
	(
		TST_ID ASC
	)
)
GO

CREATE SPATIAL INDEX SPIX_test_geometry ON test_schema.test_geometry
(
	TST_GEOMETRY
)USING  GEOMETRY_GRID 
WITH (BOUNDING_BOX =(2583000.000, 1189000.000, 2609000.000, 1208000.000), GRIDS =(LEVEL_1 = HIGH,LEVEL_2 = HIGH,LEVEL_3 = HIGH,LEVEL_4 = HIGH), 
CELLS_PER_OBJECT = 16, PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
GO

INSERT INTO test_schema.test_geometry (TST_ID, TST_GEOMETRY) VALUES ( NEWID(), geometry::STGeomFromText('POLYGON ((2601963.26 1201556.951, 2601960.746 1201627.344, 2601028.044 1201308.056, 2600608.199 1200996.307, 2600583.058 1200915.857, 2600615.737 1200737.357, 2600628.306 1200644.336, 2600610.705 1200508.575, 2600542.826 1200413.04, 2600351.758 1200237.053, 2600427.177 1200226.997, 2600638.359 1200453.266, 2600678.585 1200596.568, 2600645.906 1200787.639, 2600633.338 1200913.343, 2600655.965 1200966.139, 2600814.35 1201086.815, 2601038.1 1201252.746, 2601933.092 1201556.951, 2601963.26 1201556.951))',2056))
GO
INSERT INTO test_schema.test_geometry (TST_ID, TST_GEOMETRY) VALUES ( NEWID(), geometry::STGeomFromText('POLYGON ((2599259.627 1198959.815, 2599268.496 1198970.387, 2599271.871 1198970.539, 2599337.58 1198923.727, 2599339.249 1198924.475, 2599360.984 1198951.643, 2599392.732 1198944.673, 2599394.274 1198944.965, 2599395.131 1198946.281, 2599351.566 1199133.184, 2599350.393 1199134.24, 2599343.869 1199135.097, 2599290.722 1199159.216, 2599289.241 1199158.993, 2599288.33 1199157.804, 2599274.382 1199107.437, 2599220.005 1199121.421, 2599217.913 1199120.692, 2599189.432 1199062.102, 2599190.173 1199059.993, 2599203.482 1199053.646, 2599176.509 1199019.943, 2599177.317 1199018.181, 2599256.908 1198959.49, 2599258.332 1198959.114, 2599259.627 1198959.815))',2056))
GO
INSERT INTO test_schema.test_geometry (TST_ID, TST_GEOMETRY) VALUES ( NEWID(), geometry::STGeomFromText('POLYGON ((2602311.11729156 1201938.63284093, 2602313.39159998 1202017.22096812, 2602384.83118446 1202147.11431895, 2602423.91533729 1202192.74528873, 2602425.16185916 1202192.96772578, 2602434.29487143 1202161.51175297, 2602360.71434043 1202014.30904481, 2602351.966684 1201873.41424707, 2602350.99306096 1201872.85933517, 2602322.07326993 1201875.49979141, 2602311.11729156 1201938.63284093))',2056))
GO
INSERT INTO test_schema.test_geometry (TST_ID, TST_GEOMETRY) VALUES ( NEWID(), geometry::STGeomFromText('POLYGON ((2601306.506 1199512.964, 2601302.704 1199509.637, 2601314.11 1199481.598, 2601268.724 1199463.063, 2601222.151 1199451.656, 2601177.003 1199436.448, 2601186.983 1199422.666, 2601192.209 1199407.458, 2601198.863 1199364.21, 2601248.763 1199374.665, 2601402.741 1199461.162, 2601431.018 1199474.944, 2601457.632 1199499.658, 2601490.899 1199537.677, 2601500.88 1199577.124, 2601506.821 1199638.906, 2601510.625 1199716.372, 2601512.526 1199757.719, 2601509.2 1199804.769, 2601463.576 1199796.689, 2601444.568 1199798.59, 2601457.873 1199781.481, 2601464.527 1199761.521, 2601463.576 1199739.66, 2601461.578 1199718.143, 2601447.417 1199687.857, 2601434.585 1199665.045, 2601400.13 1199631.777, 2601398.229 1199632.252, 2601362.111 1199601.837, 2601364.487 1199599.936, 2601327.893 1199571.895, 2601287.497 1199542.905, 2601306.506 1199512.964))',2056))
GO
INSERT INTO test_schema.test_geometry (TST_ID, TST_GEOMETRY) VALUES ( NEWID(), geometry::STGeomFromText('POLYGON ((2599781.35775047 1200074.81994451, 2599780.86143578 1200076.30915109, 2599829.32584635 1200150.16019745, 2599830.31275702 1200150.60010279, 2599966.51701239 1200030.81667747, 2599966.81307304 1200029.77659365, 2599952.79286583 1200012.92177596, 2599781.35775047 1200074.81994451))',2056))
GO
INSERT INTO test_schema.test_geometry (TST_ID, TST_GEOMETRY) VALUES ( NEWID(), geometry::STGeomFromText('POLYGON ((2598873.825 1202325.322, 2598890.463 1202282.536, 2598891.318 1202281.901, 2598976.401 1202307.826, 2598983.179 1202292.012, 2598984.059 1202291.407, 2599031.694 1202308.005, 2599073.147 1202298.321, 2599202.703 1202262.885, 2599309.679 1202274.754, 2599511.214 1202224.961, 2599561.414 1202160.713, 2599626.105 1202168.015, 2599626.982 1202168.87, 2599611.688 1202232.43, 2599543.166 1202368.334, 2599435.36 1202448.931, 2599296.22 1202486.996, 2599210.049 1202488.107, 2599127.296 1202463.071, 2599016.401 1202417.389, 2598874.219 1202326.527, 2598873.825 1202325.322))',2056))
GO
INSERT INTO test_schema.test_geometry (TST_ID, TST_GEOMETRY) VALUES ( NEWID(), geometry::STGeomFromText('POLYGON ((2597295.83057753 1198959.62890708, 2597294.18950578 1198960.86886861, 2597294.04733796 1198965.1916887, 2597294.6593018 1198966.63159128, 2597296.12065578 1198967.19034652, 2597297.77347036 1198966.20184125, 2597298.74757764 1198963.46895885, 2598037.89427373 1198924.14362, 2598228.71107638 1198705.04949411, 2598229.1898081 1198703.52363875, 2598189.81256335 1198581.67977566, 2598196.89723994 1198305.69275898, 2598096.7405243 1197922.97486343, 2598121.68450209 1197823.19104413, 2598121.45449523 1197821.66919869, 2598120.21163594 1197820.76135255, 2597747.74617864 1197731.22879568, 2597693.92921202 1197748.84925044, 2597620.30556548 1197692.75470019, 2597609.62851334 1197450.83131308, 2597634.62843278 1197414.83062252, 2597634.66851229 1197346.378597, 2597616.91289304 1197275.11403679, 2597684.47703992 1197171.98447318, 2597684.6577699 1197170.13750911, 2597555.01400819 1197079.71092775, 2597407.72225856 1197025.75520168, 2597296.20520819 1197014.89863928, 2597239.82498654 1197011.37453446, 2597133.80539068 1196852.34925349, 2597179.73544831 1196802.59354651, 2597190.56339489 1196658.89392603, 2597190.11920011 1196657.48063323, 2597188.44587276 1196656.74810882, 2597187.10619568 1196657.38048468, 2596743.22599596 1197133.49657947, 2596542.66082986 1197248.14225028, 2596442.19544904 1197362.92119199, 2596106.8097968 1197691.18563137, 2596019.52850283 1197628.34389819, 2596023.04758883 1197564.97210287, 2596022.53101324 1197563.51635712, 2596020.73628095 1197562.8860353, 2595944.24212331 1197610.22140045, 2595915.21342493 1197715.5679236, 2596062.58542054 1197870.66300589, 2596127.64181076 1197917.64803441, 2596453.89588596 1197942.87481888, 2596625.20273587 1198021.38980471, 2596764.3873551 1198146.29743256, 2596896.95193234 1198397.00862228, 2597104.13735098 1198568.51987328, 2597093.49317371 1198682.07298088, 2597093.96866051 1198683.56442283, 2597347.3054343 1198808.62488694, 2597295.83057753 1198959.62890708))',2056))
GO
INSERT INTO test_schema.test_geometry (TST_ID, TST_GEOMETRY) VALUES ( NEWID(), geometry::STGeomFromText('POLYGON ((2601299.114 1199741.966, 2601232.533 1199713.898, 2601125.639 1199681.765, 2601046.944 1199667.993, 2601043.009 1199698.159, 2601060.715 1199699.471, 2601060.715 1199723.735, 2601041.042 1199721.112, 2601020.366 1199720.059, 2601020.366 1199701.929, 2601036.451 1199705.373, 2601037.763 1199664.714, 2600827.254 1199660.124, 2600722.732 1199664.159, 2600681.668 1199665.37, 2600678.389 1199650.942, 2600569.528 1199652.254, 2600385.251 1199688.978, 2600390.497 1199586.019, 2600378.037 1199589.954, 2600380.004 1199527.654, 2600461.978 1199532.9, 2600463.29 1199584.052, 2600395.088 1199586.019, 2600390.497 1199684.388, 2600566.905 1199647.664, 2600678.389 1199647.008, 2600715.114 1199647.008, 2600718.393 1199589.298, 2600903.981 1199593.889, 2600905.293 1199577.494, 2600911.851 1199576.182, 2600913.162 1199546.672, 2600946.608 1199552.574, 2600942.673 1199585.363, 2600948.575 1199587.987, 2601031.205 1199593.889, 2601031.205 1199567.001, 2601041.698 1199568.969, 2601042.353 1199599.791, 2601050.879 1199598.479, 2601045.632 1199653.566, 2601125.639 1199663.402, 2601232.533 1199698.159, 2601264.666 1199711.275, 2601302.136 1199720.815, 2601299.114 1199741.966))',2056))
GO
INSERT INTO test_schema.test_geometry (TST_ID, TST_GEOMETRY) VALUES ( NEWID(), geometry::STGeomFromText('POLYGON ((2602920.25635392 1200369.95147185, 2602923.3571201 1200355.81797431, 2602921.77803152 1200353.81981235, 2602755.91531686 1200318.15749733, 2602435.06141438 1200252.21279499, 2602158.78969132 1200154.18189869, 2602030.11109158 1200129.13785565, 2602028.65533902 1200129.41395001, 2602027.7891126 1200130.61609275, 2602025.94854568 1200138.14502991, 2602027.14331903 1200140.06582733, 2602159.34668164 1200168.69263524, 2602398.3840182 1200256.08780376, 2602471.56584368 1200273.93405839, 2602806.76399418 1200343.45951454, 2602917.39624339 1200373.78532457, 2602921.15895661 1200373.04489194, 2602921.46941717 1200371.18498186, 2602920.25635392 1200369.95147185))',2056))
GO
INSERT INTO test_schema.test_geometry (TST_ID, TST_GEOMETRY) VALUES ( NEWID(), geometry::STGeomFromText('POLYGON ((2601283.22387674 1199245.2969166, 2601283.7736708 1199246.74426091, 2601479.52346912 1199312.13137787, 2601480.5005284 1199311.67520398, 2601498.12937556 1199283.6819655, 2601338.49912134 1199150.4691041, 2601337.51962072 1199150.96385529, 2601283.22387674 1199245.2969166))',2056))
GO
INSERT INTO test_schema.test_geometry (TST_ID, TST_GEOMETRY) VALUES ( NEWID(), geometry::STGeomFromText('POLYGON ((2601942.10682422 1202269.564978, 2601942.00952488 1202271.64305624, 2601980.08784362 1202341.18985949, 2602024.44762785 1202388.76252851, 2602077.43116231 1202435.32462324, 2602117.51907779 1202478.62063561, 2602155.03377917 1202524.07404666, 2602171.38886569 1202523.5206264, 2602172.74239603 1202522.89168864, 2602178.10738416 1202494.96610038, 2602147.67893961 1202422.40737818, 2602221.96015089 1202500.85532236, 2602223.57463912 1202500.82810745, 2602266.21079034 1202480.82017409, 2602266.4285278 1202479.05135383, 2602260.92678171 1202464.45508042, 2602226.55851736 1202447.62885208, 2602202.74486769 1202407.9378799, 2602185.29567536 1202380.7990972, 2602183.42828032 1202380.5691151, 2602142.51951251 1202396.30452896, 2602124.31891855 1202385.68673595, 2602051.70057626 1202305.96340274, 2602059.70132846 1202295.7235817, 2602059.8526362 1202294.26630323, 2602058.9700247 1202293.09689768, 2601964.97878093 1202235.74518156, 2601962.961175 1202236.676646, 2601962.93661881 1202238.70462981, 2601942.10682422 1202269.564978))',2056))
GO
INSERT INTO test_schema.test_geometry (TST_ID, TST_GEOMETRY) VALUES ( NEWID(), geometry::STGeomFromText('POLYGON ((2600744.18 1199903.994, 2600732.951 1199873.882, 2600751.834 1199854.489, 2600800.828 1199838.668, 2600863.601 1199822.846, 2600918.719 1199811.619, 2600965.16 1199808.046, 2601063.658 1199820.296, 2601148.887 1199829.992, 2601268.309 1199852.449, 2601313.476 1199856.022, 2601315.517 1199853.98, 2601365.021 1199861.125, 2601401.766 1199853.47, 2601422.18 1199848.877, 2601417.587 1199833.566, 2601444.635 1199822.848, 2601444.125 1199799.371, 2601462.496 1199795.288, 2601509.449 1199805.496, 2601507.408 1199815.193, 2601492.609 1199846.325, 2601474.746 1199867.25, 2601446.677 1199886.133, 2601412.74 1199895.83, 2601377.014 1199899.913, 2601327.511 1199903.995, 2601265.758 1199902.464, 2601213.703 1199893.278, 2601048.859 1199865.718, 2601010.582 1199859.083, 2600974.348 1199856.021, 2600931.477 1199855.51, 2600894.222 1199859.083, 2600854.414 1199866.738, 2600819.201 1199874.394, 2600776.332 1199887.663, 2600744.18 1199903.994))',2056))
GO
INSERT INTO test_schema.test_geometry (TST_ID, TST_GEOMETRY) VALUES ( NEWID(), geometry::STGeomFromText('POLYGON ((2596083.86028108 1200339.60545655, 2596084.27294556 1200340.97490669, 2596217.51633 1200410.55212291, 2596297.13175547 1200425.4623516, 2596310.36120285 1200445.06850253, 2596298.90648527 1200528.34925412, 2596299.75386685 1200529.08541174, 2596326.75325962 1200532.30596779, 2596327.66897166 1200531.45789752, 2596340.46809048 1200446.65874387, 2596359.71602413 1200434.17326958, 2596439.24607926 1200427.07331794, 2596437.58257837 1200403.63310062, 2596436.6897321 1200402.71641558, 2596352.09172864 1200410.67545929, 2596411.79986916 1200352.07243353, 2596568.57087137 1200336.61863129, 2596569.47227527 1200335.65468878, 2596564.63225591 1200308.10663947, 2596563.93359132 1200307.32222299, 2596486.89342613 1200313.31153872, 2596483.15406755 1200238.53310062, 2596482.11086874 1200237.58401689, 2596457.98473335 1200238.65692102, 2596457.07341605 1200239.36174848, 2596462.87387496 1200292.31187234, 2596441.83854621 1200310.05789994, 2596355.64686669 1200338.84992571, 2596322.29795658 1200392.10522848, 2596304.17248569 1200396.24796994, 2596271.51438828 1200387.997195, 2596229.79157652 1200380.71550222, 2596230.47224559 1200360.30653001, 2596262.43401882 1200341.12938953, 2596303.57283925 1200346.69803662, 2596303.72747931 1200345.26822447, 2596288.54916936 1200327.45991801, 2596256.93402882 1200323.10593796, 2596187.1301805 1200349.99391369, 2596164.98463173 1200349.27885438, 2596096.24226213 1200318.00222717, 2596083.86028108 1200339.60545655))',2056))
GO
INSERT INTO test_schema.test_geometry (TST_ID, TST_GEOMETRY) VALUES ( NEWID(), geometry::STGeomFromText('POLYGON ((2600767.06671913 1200444.71332339, 2600767.38463121 1200448.39766547, 2600769.72301882 1200449.20509314, 2600908.70617133 1200400.92563212, 2601233.43584798 1200291.21669291, 2601299.00292501 1200273.73182965, 2601361.70026423 1200270.81494902, 2601387.30671228 1200264.78617143, 2601388.47910993 1200262.9124706, 2601385.36303634 1200150.91978891, 2601383.34531591 1200149.77934071, 2601087.40192272 1200180.58851664, 2600863.55330373 1200252.27983437, 2600722.98993495 1200306.45367426, 2600721.90022829 1200307.46693579, 2600721.81189288 1200308.95235057, 2600767.06671913 1200444.71332339))',2056))
GO
INSERT INTO test_schema.test_geometry (TST_ID, TST_GEOMETRY) VALUES ( NEWID(), geometry::STGeomFromText('POLYGON ((2600235.84941998 1202692.01871919, 2600233.82674629 1202691.94480062, 2600232.79593725 1202693.91354433, 2600238.18368265 1202703.75378745, 2600240.14732634 1202704.02647832, 2600245.13369687 1202700.75365365, 2600254.33411572 1202690.63188053, 2600257.51981024 1202677.21954271, 2600256.77576098 1202657.9545634, 2600246.76689809 1202597.89934791, 2600236.64648426 1202559.00249249, 2600207.40710751 1202484.36285088, 2600191.43218744 1202437.19591238, 2600195.02637683 1202420.65965639, 2600209.57059144 1202407.56956062, 2600266.39848743 1202393.7117476, 2600280.8532374 1202379.44240712, 2600288.93940696 1202368.88971357, 2600342.19952925 1202156.0117552, 2600365.29322952 1202067.47854606, 2600370.74559365 1202028.42389065, 2600369.21151078 1201970.93290185, 2600373.54563664 1201952.15178614, 2600393.61162444 1201943.55196787, 2600405.33289826 1201945.7499701, 2600407.1798637 1201945.1312041, 2600407.62446574 1201943.23471525, 2600401.46421869 1201921.67642021, 2600400.14513853 1201920.31925884, 2600398.28528084 1201920.66940847, 2600394.54116475 1201925.10222528, 2600356.62138167 1201936.47832929, 2600355.27997447 1201937.82092544, 2600356.73818916 1201953.14582184, 2600358.27373728 1202039.82209534, 2600349.86438894 1202077.28599355, 2600279.86434761 1202351.14727937, 2600267.9061741 1202375.06437697, 2600255.38628131 1202382.428856, 2600242.01177493 1202389.1163219, 2600221.37598882 1202389.14219831, 2600207.35407277 1202393.78943993, 2600197.9198124 1202395.39527236, 2600183.54910328 1202413.05229556, 2600180.46919502 1202428.45136388, 2600180.47001139 1202443.86888697, 2600225.96174287 1202551.91929968, 2600234.36801469 1202582.48881893, 2600245.87320898 1202652.2889015, 2600245.87324719 1202678.41421158, 2600235.84941998 1202692.01871919))',2056))
GO
INSERT INTO test_schema.test_geometry (TST_ID, TST_GEOMETRY) VALUES ( NEWID(), geometry::STGeomFromText('POLYGON ((2599924.56366098 1200629.02394864, 2599925.08490423 1200626.78390872, 2599924.47014811 1200625.34129987, 2599922.60569953 1200624.84213634, 2599921.35246171 1200625.78463247, 2599870.1677663 1200716.16218734, 2599848.58600463 1200752.1333306, 2599827.76643534 1200792.96441859, 2599812.53508968 1200817.02838091, 2599791.75912176 1200856.98510691, 2599746.98496548 1200935.34422816, 2599736.61200378 1200956.08516528, 2599695.1211828 1201015.93682656, 2599671.11373539 1201047.14920245, 2599643.11975877 1201086.34263586, 2599619.12121904 1201122.33934716, 2599553.54243489 1201210.31622539, 2599519.23172403 1201258.98961087, 2599499.11145105 1201279.16704062, 2599499.40520057 1201281.72634425, 2599514.10141341 1201295.55602225, 2599515.55388983 1201295.83353384, 2599516.79996886 1201295.03731325, 2599518.62131143 1201288.33238068, 2599531.19021979 1201271.04956167, 2599539.276409 1201256.5252878, 2599554.40591406 1201234.22766642, 2599615.19902751 1201151.03230109, 2599686.34810787 1201049.49995063, 2599709.58306739 1201019.04787401, 2599739.17695799 1200975.85439306, 2599761.60952253 1200940.60430495, 2599812.06835711 1200853.30056119, 2599860.85578017 1200763.71821313, 2599883.24050993 1200720.54647077, 2599906.29789582 1200682.37927269, 2599915.19432848 1200672.61937803, 2599932.79062014 1200643.8240518, 2599932.76311232 1200641.69453728, 2599924.56366098 1200629.02394864))',2056))
GO
INSERT INTO test_schema.test_geometry (TST_ID, TST_GEOMETRY) VALUES ( NEWID(), geometry::STGeomFromText('POLYGON ((2602064.303 1199398.897, 2602155.115 1199302.939, 2602322.373 1199460.986, 2602206.848 1199506.729, 2602064.433 1199400.383, 2602064.303 1199398.897))',2056))
GO
INSERT INTO test_schema.test_geometry (TST_ID, TST_GEOMETRY) VALUES ( NEWID(), geometry::STGeomFromText('POLYGON ((2599603.72294532 1199414.21355609, 2599602.84321382 1199415.60049437, 2599648.99384678 1199525.29158457, 2599663.74069435 1199574.11786042, 2599651.06409217 1199578.00823688, 2599655.13697735 1199591.06693809, 2599788.81317809 1199583.49902854, 2599835.62616522 1199583.16530665, 2599845.17901028 1199579.8125439, 2599897.02169928 1199577.34449275, 2599896.84054407 1199561.06594858, 2599895.98162174 1199560.09713929, 2599800.89864586 1199565.44003064, 2599783.8846284 1199553.39604774, 2599727.18670448 1199432.99568, 2599723.69483328 1199409.32416414, 2599603.72294532 1199414.21355609))',2056))
GO
INSERT INTO test_schema.test_geometry (TST_ID, TST_GEOMETRY) VALUES ( NEWID(), geometry::STGeomFromText('POLYGON ((2600666.92020367 1198781.13119448, 2600666.19957055 1198760.24026151, 2600681.58490484 1198762.40028562, 2600682.95372549 1198761.75597088, 2600683.4797194 1198760.33743843, 2600677.27951087 1198584.72533085, 2600675.21193439 1198468.05576419, 2600677.27634941 1198401.98786829, 2600660.43165636 1198375.02081199, 2600658.75857658 1198374.0989986, 2600657.32524201 1198374.69253735, 2600656.74750311 1198376.13234601, 2600657.78217086 1198438.09946292, 2600657.78370077 1198511.47131456, 2600659.85128886 1198615.81165478, 2600663.98194787 1198677.79570066, 2600662.03735926 1198755.605012, 2600658.95128161 1198755.48685663, 2600657.82595987 1198757.69607342, 2600663.10537445 1198783.89821932, 2600682.66782139 1198833.31715553, 2600696.07475225 1198889.00325183, 2600723.06364041 1198993.69859902, 2600724.82798246 1198995.56379653, 2600726.36594579 1198995.8254513, 2600740.17274743 1198989.49592323, 2600741.32886702 1198987.53040281, 2600709.25608593 1198874.61242728, 2600691.5977296 1198782.37798057, 2600689.74502438 1198781.13125559, 2600666.92020367 1198781.13119448))',2056))
GO
INSERT INTO test_schema.test_geometry (TST_ID, TST_GEOMETRY) VALUES ( NEWID(), geometry::STGeomFromText('POLYGON ((2600476.724 1201115.791, 2600528.456 1201194.912, 2600572.581 1201252.73, 2600606.816 1201290.008, 2600656.773 1201331.09, 2600724.735 1201373.186, 2600839.611 1201409.195, 2600942.823 1201452.052, 2600930.397 1201482.737, 2600929.129 1201510.378, 2600965.519 1201517.732, 2600973.38 1201557.799, 2600945.993 1201570.732, 2600947.261 1201580.622, 2600948.529 1201592.288, 2600944.851 1201613.843, 2600920.253 1201690.934, 2600911.631 1201711.729, 2600881.074 1201773.351, 2600864.844 1201801.246, 2600885.892 1201818.744, 2600898.825 1201854.754, 2600939.019 1201978.506, 2600941.174 1201994.482, 2600969.45 1202057.372, 2600893.753 1202197.608, 2600816.662 1202160.33, 2600749.967 1202102.511, 2600707.871 1202049.765, 2600649.165 1201936.663, 2600611.507 1201860.333, 2600557.112 1201751.542, 2600535.303 1201696.26, 2600503.351 1201635.652, 2600458.338 1201563.885, 2600423.089 1201507.081, 2600389.742 1201436.33, 2600376.302 1201398.037, 2600427.147 1201372.932, 2600417.003 1201340.726, 2600419.793 1201326.779, 2600428.415 1201334.893, 2600444.391 1201324.496, 2600439.319 1201314.606, 2600475.456 1201293.812, 2600476.217 1201261.352, 2600463.157 1201231.936, 2600452.379 1201192.629, 2600445.786 1201160.423, 2600442.489 1201126.949, 2600455.676 1201127.203, 2600461.508 1201111.48, 2600476.724 1201115.791))',2056))
GO


CREATE VIEW test_schema.vw_test_geometry as select * from test_schema.test_geometry
GO


INSERT INTO dbo.GEOMETRY_COLUMNS
           (F_TABLE_CATALOG
           ,F_TABLE_SCHEMA
           ,F_TABLE_NAME
           ,F_GEOMETRY_COLUMN
           ,COORD_DIMENSION
           ,SRID
           ,GEOMETRY_TYPE)
     VALUES
           ('KOER_TEST'
           ,'test_schema'
           ,'test_geometry'
           ,'TST_GEOMETRY'
           ,2
           ,2056
           ,'POLYGON')
GO


INSERT INTO dbo.GEOMETRY_COLUMNS
           (F_TABLE_CATALOG
           ,F_TABLE_SCHEMA
           ,F_TABLE_NAME
           ,F_GEOMETRY_COLUMN
           ,COORD_DIMENSION
           ,SRID
           ,GEOMETRY_TYPE)
     VALUES
           ('KOER_TEST'
           ,'test_schema'
           ,'vw_test_geometry'
           ,'TST_GEOMETRY'
           ,2
           ,2056
           ,'POLYGON')
GO

-- drop view test_schema.vw_test_geometry;
-- drop TABLE test_schema.test_geometry;
-- drop schema test_schema;