SQL Server 2008 - 创建中的空间 MultiLineString 问题
我有 3 行字符串。它们是正确的,但是当我们尝试创建 MultiLineString 时,SQL Server 2008 会抛出异常:
System.ArgumentException: 24200: 指定的输入不 代表一个有效的地理实例。
我看不出错误在哪里。有人可以帮助我吗?
DECLARE @g3 geography = geography::STGeomFromText('LINESTRING(-3.3513800000000002 40.49083, -3.3511300000000004 40.49065, -3.3511300000000004 40.49065, -3.35076 40.49078, -3.34947 40.49137, -3.34905 40.49156, -3.3486800000000003 40.491730000000004, -3.3470400000000002 40.49251, -3.3470400000000002 40.49251, -3.3469900000000003 40.492450000000005, -3.34594 40.49123, -3.3452300000000003 40.49034, -3.3451400000000002 40.490230000000004, -3.3450800000000002 40.49015, -3.3450100000000002 40.49007, -3.34498 40.49002, -3.34498 40.49002, -3.345 40.490010000000005, -3.3450100000000002 40.49, -3.3450200000000003 40.48998, -3.3450300000000004 40.48997000000001, -3.3450400000000004 40.48995, -3.3450400000000004 40.48993, -3.3450400000000004 40.489920000000005, -3.3450300000000004 40.489900000000006, -3.3450200000000003 40.48988000000001, -3.3450100000000002 40.48987, -3.34499 40.48986, -3.34498 40.489850000000004, -3.3449500000000003 40.48984, -3.34493 40.48984, -3.3449100000000005 40.489830000000005, -3.3448900000000003 40.48984, -3.3448700000000002 40.48984, -3.3448400000000005 40.489850000000004, -3.3448300000000004 40.48986, -3.3448100000000003 40.48987, -3.3448 40.48988000000001, -3.34479 40.489900000000006, -3.34478 40.489920000000005, -3.34478 40.48993, -3.34478 40.48995, -3.34479 40.48997000000001, -3.3448 40.48998, -3.3448100000000003 40.49, -3.34342 40.49056, -3.3433500000000005 40.490590000000004, -3.3432700000000004 40.49063, -3.34317 40.49069, -3.3430400000000002 40.490790000000004, -3.3427100000000003 40.491020000000006, -3.3423700000000003 40.491240000000005, -3.3409600000000003 40.492270000000005, -3.34037 40.492700000000006, -3.3401600000000004 40.49282, -3.3399500000000004 40.49298, -3.3394800000000004 40.49325, -3.3392600000000003 40.49338, -3.3390700000000004 40.493500000000004, -3.3389300000000004 40.4936, -3.3388600000000004 40.493660000000005, -3.3387700000000002 40.493770000000005, -3.3386700000000004 40.493970000000004, -3.33863 40.49412, -3.3386000000000004 40.49466, -3.33855 40.49486, -3.33849 40.49504, -3.3384000000000005 40.495290000000004, -3.33828 40.495520000000006, -3.3381600000000002 40.49573, -3.3380300000000002 40.49597, -3.3378900000000002 40.49624, -3.3378900000000002 40.49624, -3.3377800000000004 40.49636, -3.33761 40.496500000000005, -3.3374200000000002 40.496640000000006, -3.3371600000000003 40.49685, -3.3369500000000003 40.497020000000006, -3.33637 40.49743, -3.3362700000000003 40.497490000000006, -3.3362200000000004 40.497550000000004, -3.3357900000000002 40.49775, -3.3353200000000003 40.497980000000005, -3.3350800000000005 40.498110000000004, -3.33496 40.49817, -3.3349300000000004 40.498200000000004, -3.3349300000000004 40.49823000000001, -3.3349400000000004 40.498250000000006, -3.3349400000000004 40.498250000000006, -3.33495 40.49826, -3.33496 40.49828, -3.3349800000000002 40.498290000000004, -3.3350100000000004 40.498290000000004, -3.3350500000000003 40.498290000000004, -3.33517 40.498290000000004, -3.33531 40.49833, -3.33543 40.49841, -3.33557 40.498540000000005, -3.33571 40.49868, -3.3357500000000004 40.498720000000006, -3.33578 40.49879000000001, -3.3357900000000002 40.498810000000006, -3.33578 40.498850000000004, -3.33578 40.498850000000004, -3.33577 40.49888, -3.3357300000000003 40.49891, -3.3353800000000002 40.499120000000005, -3.3349300000000004 40.4994, -3.3343100000000003 40.499770000000005, -3.3343100000000003 40.499770000000005, -3.3341600000000002 40.49964000000001, -3.33327 40.500170000000004, -3.33327 40.500170000000004, -3.3316000000000003 40.501160000000006, -3.3316000000000003 40.501160000000006, -3.3313 40.50133)', 4326)
DECLARE @g4 geography = geography::STGeomFromText('LINESTRING(-3.3313 40.50133, -3.3304300000000002 40.501850000000005, -3.3292100000000002 40.50258, -3.3291000000000004 40.50263, -3.3291000000000004 40.50263, -3.3295200000000005 40.503040000000006, -3.3295200000000005 40.50305, -3.3295200000000005 40.50307, -3.32953 40.503080000000004, -3.32954 40.5031, -3.3295600000000003 40.50311000000001, -3.3295700000000003 40.50312, -3.3295800000000004 40.50312, -3.3296 40.503130000000006, -3.32961 40.503130000000006, -3.33027 40.50377, -3.33027 40.50377, -3.33027 40.503780000000006, -3.3302600000000004 40.503800000000005, -3.33027 40.503820000000005, -3.33027 40.50383, -3.33027 40.503840000000004, -3.33028 40.50386, -3.33029 40.503870000000006, -3.3303100000000003 40.503890000000005, -3.3303200000000004 40.503890000000005, -3.3303300000000004 40.5039, -3.33034 40.5039, -3.33036 40.5039, -3.3303800000000003 40.5039, -3.3303900000000004 40.5039, -3.3304000000000004 40.503890000000005, -3.33041 40.50388, -3.33042 40.503870000000006, -3.3304300000000002 40.50386, -3.3304400000000003 40.50383, -3.3304500000000003 40.503820000000005, -3.3304500000000003 40.503800000000005, -3.3311400000000004 40.503400000000006, -3.3311400000000004 40.503400000000006, -3.33116 40.503420000000005, -3.3312000000000004 40.503440000000005, -3.33123 40.50345, -3.3312700000000004 40.50345, -3.3313200000000003 40.50345, -3.3313500000000004 40.503440000000005, -3.3313900000000003 40.503420000000005, -3.3318600000000002 40.50381, -3.3319300000000003 40.50388, -3.3320200000000004 40.503960000000006, -3.33211 40.50403, -3.3322300000000004 40.50413, -3.3322700000000003 40.50417, -3.3322900000000004 40.504180000000005, -3.33239 40.504270000000005, -3.3326900000000003 40.504490000000004, -3.33313 40.50482, -3.33313 40.50482, -3.33312 40.50477, -3.33306 40.50470000000001, -3.3330300000000004 40.50466, -3.3329700000000004 40.5046, -3.33292 40.50452000000001, -3.3328800000000003 40.504380000000005, -3.33287 40.50424, -3.33287 40.50408, -3.3329100000000005 40.50395, -3.3329400000000002 40.50385, -3.3329700000000004 40.503800000000005, -3.33298 40.503780000000006, -3.3330200000000003 40.503690000000006, -3.3331500000000003 40.503530000000005, -3.33341 40.50336, -3.3350100000000004 40.50235, -3.3354600000000003 40.50207, -3.3358100000000004 40.501920000000005, -3.33604 40.50186, -3.33645 40.50177, -3.33651 40.501760000000004, -3.3371700000000004 40.501630000000006, -3.3373500000000002 40.50159, -3.33754 40.501540000000006, -3.3377200000000004 40.50148, -3.3378400000000003 40.501430000000006, -3.33788 40.50141, -3.33793 40.501380000000005, -3.33801 40.50133, -3.3381200000000004 40.50126, -3.33829 40.50113, -3.3383800000000003 40.50103, -3.33842 40.500980000000005, -3.33854 40.500820000000004, -3.3386500000000003 40.50065, -3.3387900000000003 40.50041, -3.3387900000000003 40.50041, -3.3389300000000004 40.50023, -3.3391800000000002 40.4998, -3.3392500000000002 40.49967, -3.3393100000000002 40.499590000000005, -3.3393900000000003 40.499480000000005, -3.3395 40.49938, -3.3398700000000003 40.499120000000005, -3.3398700000000003 40.499120000000005, -3.3400100000000003 40.499030000000005, -3.3406800000000003 40.49857, -3.34154 40.498000000000005, -3.3416200000000002 40.49795, -3.3417000000000003 40.497890000000005, -3.34174 40.49786, -3.3417700000000003 40.497870000000006, -3.3418300000000003 40.49788, -3.3418900000000002 40.497870000000006, -3.3419100000000004 40.49786, -3.34193 40.497840000000004, -3.34195 40.49781, -3.3419700000000003 40.49777, -3.3419700000000003 40.49772, -3.3429800000000003 40.49709, -3.3438200000000004 40.496550000000006, -3.3448100000000003 40.49591, -3.3449500000000003 40.49582, -3.3452200000000003 40.49564, -3.3459200000000004 40.49519, -3.3461600000000002 40.495050000000006, -3.34641 40.494890000000005, -3.3475 40.494170000000004, -3.3476100000000004 40.4941, -3.3476100000000004 40.4941, -3.34812 40.493770000000005, -3.34824 40.493700000000004, -3.34845 40.4936, -3.34845 40.4936, -3.34846 40.493610000000004, -3.3484800000000003 40.49362, -3.34852 40.49363, -3.3485600000000004 40.493640000000006, -3.34859 40.493640000000006, -3.3486300000000004 40.493640000000006, -3.3486700000000002 40.49363, -3.3489600000000004 40.493880000000004, -3.35002 40.49486, -3.35021 40.495070000000005, -3.3507200000000003 40.49562, -3.3507000000000002 40.495630000000006, -3.35068 40.495650000000005, -3.3506700000000005 40.495670000000004, -3.3506600000000004 40.49570000000001, -3.3506600000000004 40.495720000000006, -3.3506600000000004 40.495740000000005, -3.3506700000000005 40.495760000000004, -3.35068 40.49579000000001, -3.3507000000000002 40.4958, -3.3507200000000003 40.49582, -3.35075 40.495830000000005, -3.3507700000000002 40.49584, -3.3508000000000004 40.495850000000004, -3.35083 40.495850000000004, -3.3508600000000004 40.495850000000004, -3.35089 40.49584, -3.3509200000000003 40.495830000000005, -3.3509900000000003 40.495920000000005, -3.35115 40.496080000000006, -3.35124 40.496190000000006, -3.35142 40.496320000000004, -3.3515900000000003 40.496430000000004, -3.35185 40.496570000000005, -3.3524700000000003 40.496770000000005, -3.3527000000000004 40.4968, -3.3527000000000004 40.4968, -3.3534200000000003 40.496950000000005, -3.35393 40.49705, -3.3540500000000004 40.497080000000004, -3.3540500000000004 40.497080000000004, -3.3540400000000003 40.49709, -3.3540300000000003 40.497110000000006, -3.3540300000000003 40.49712, -3.3540300000000003 40.49714, -3.3540400000000003 40.497150000000005, -3.3540500000000004 40.49716, -3.3540600000000005 40.49718, -3.35407 40.49719, -3.3540900000000002 40.49720000000001, -3.3541100000000003 40.49720000000001, -3.35413 40.49721, -3.35415 40.49721, -3.3541700000000003 40.49721, -3.3541900000000004 40.49720000000001, -3.35421 40.49720000000001, -3.35427 40.49723, -3.3543300000000004 40.497260000000004, -3.3543700000000003 40.49728, -3.3544300000000002 40.49729000000001, -3.35447 40.49729000000001, -3.3545200000000004 40.49729000000001, -3.3545900000000004 40.49728, -3.3546500000000003 40.497260000000004, -3.3547100000000003 40.49723, -3.3547700000000002 40.49720000000001, -3.35482 40.497170000000004, -3.35482 40.497170000000004, -3.3548600000000004 40.49721, -3.3549200000000003 40.49723, -3.3549800000000003 40.497240000000005, -3.3550400000000002 40.497220000000006, -3.35509 40.49719, -3.3551200000000003 40.497150000000005, -3.3556100000000004 40.49712, -3.3563300000000002 40.497060000000005, -3.3569400000000002 40.49698, -3.3579600000000003 40.49674, -3.3589300000000004 40.49653, -3.3592000000000004 40.49647, -3.3596100000000004 40.496370000000006, -3.3598800000000004 40.49631, -3.3601500000000004 40.49624, -3.36052 40.49613, -3.3608300000000004 40.496050000000004, -3.3608300000000004 40.496050000000004, -3.36085 40.49606, -3.3608800000000003 40.49606, -3.3609000000000004 40.49606, -3.36093 40.49606, -3.3609500000000003 40.496050000000004, -3.3609600000000004 40.49604, -3.3609700000000004 40.49602, -3.36098 40.496, -3.36099 40.49598, -3.36098 40.495940000000004, -3.3609700000000004 40.495920000000005, -3.3609500000000003 40.495900000000006, -3.36093 40.49589, -3.3609000000000004 40.49588000000001, -3.3608700000000002 40.49588000000001, -3.36085 40.49589, -3.36079 40.495760000000004, -3.36058 40.49531, -3.3605400000000003 40.495200000000004)', 4326)
DECLARE @g5 geography = geography::STGeomFromText('LINESTRING(-3.3605400000000003 40.495200000000004, -3.36058 40.49531, -3.36079 40.495760000000004, -3.36085 40.49589, -3.36085 40.49589, -3.3608300000000004 40.495900000000006, -3.3608100000000003 40.495920000000005, -3.3608000000000002 40.49595, -3.3604300000000004 40.49604, -3.3601400000000003 40.496100000000005, -3.35991 40.49616, -3.35964 40.496230000000004, -3.35936 40.496280000000006, -3.3590500000000003 40.496340000000004, -3.3588500000000003 40.49638, -3.3566800000000003 40.496880000000004, -3.35509 40.497020000000006, -3.35509 40.497020000000006, -3.3550400000000002 40.496990000000004, -3.3549800000000003 40.49698, -3.3549200000000003 40.49698, -3.3548600000000004 40.497, -3.35482 40.497040000000005, -3.3548000000000004 40.497080000000004, -3.3547200000000003 40.497130000000006, -3.3546600000000004 40.49716, -3.35461 40.49719, -3.35456 40.49721, -3.3545100000000003 40.49721, -3.3544600000000004 40.497220000000006, -3.3544500000000003 40.497220000000006, -3.3543900000000004 40.49723, -3.3542500000000004 40.49716, -3.3542500000000004 40.49716, -3.3542600000000004 40.497130000000006, -3.3542600000000004 40.4971, -3.3542600000000004 40.49709, -3.3542500000000004 40.497080000000004, -3.3542400000000003 40.497060000000005, -3.35422 40.49705, -3.3542 40.497040000000005, -3.3541900000000004 40.497040000000005, -3.3541700000000003 40.49703, -3.35415 40.49703, -3.35413 40.49703, -3.3541100000000003 40.497040000000005, -3.3540900000000002 40.497040000000005, -3.35407 40.49705, -3.3540600000000005 40.497060000000005, -3.3540500000000004 40.497080000000004, -3.35393 40.49705, -3.3534200000000003 40.496950000000005, -3.3527000000000004 40.4968, -3.3527000000000004 40.4968, -3.3524700000000003 40.496770000000005, -3.35185 40.496570000000005, -3.3515900000000003 40.496430000000004, -3.35142 40.496320000000004, -3.35124 40.496190000000006, -3.35115 40.496080000000006, -3.3509900000000003 40.495920000000005, -3.3509200000000003 40.495830000000005, -3.3509400000000004 40.49582, -3.35096 40.4958, -3.3509800000000003 40.49578, -3.3509900000000003 40.495760000000004, -3.3510000000000004 40.495740000000005, -3.3510000000000004 40.495720000000006, -3.3510000000000004 40.49570000000001, -3.3509900000000003 40.495670000000004, -3.3509800000000003 40.495650000000005, -3.35096 40.495630000000006, -3.3509400000000004 40.49562, -3.3509200000000003 40.4956, -3.35089 40.4956, -3.3508600000000004 40.49559, -3.35083 40.49559, -3.3508000000000004 40.49559, -3.3507700000000002 40.4956, -3.3507400000000005 40.495610000000006, -3.3507200000000003 40.49562, -3.35021 40.495070000000005, -3.35002 40.49486, -3.3489600000000004 40.493880000000004, -3.3486700000000002 40.49363, -3.3486700000000002 40.49363, -3.34871 40.49362, -3.3487400000000002 40.4936, -3.3487700000000004 40.49358, -3.34879 40.49356, -3.3488 40.49353, -3.3488100000000003 40.493500000000004, -3.3488200000000003 40.49347, -3.3488100000000003 40.49344000000001, -3.3488 40.493410000000004, -3.3488 40.4934, -3.3490400000000004 40.493230000000004, -3.34952 40.492940000000004, -3.3495500000000002 40.492920000000005, -3.3498 40.492760000000004, -3.34986 40.492670000000004, -3.34986 40.492670000000004, -3.3505300000000004 40.492230000000006, -3.3508000000000004 40.492050000000006, -3.3512800000000005 40.491760000000006, -3.35137 40.491710000000005, -3.3515300000000003 40.491620000000005, -3.35203 40.4913)', 4326)
declare @g6 geography = geography::STGeomFromText('MultiLineString((-3.3513800000000002 40.49083, -3.3511300000000004 40.49065, -3.3511300000000004 40.49065, -3.35076 40.49078, -3.34947 40.49137, -3.34905 40.49156, -3.3486800000000003 40.491730000000004, -3.3470400000000002 40.49251, -3.3470400000000002 40.49251, -3.3469900000000003 40.492450000000005, -3.34594 40.49123, -3.3452300000000003 40.49034, -3.3451400000000002 40.490230000000004, -3.3450800000000002 40.49015, -3.3450100000000002 40.49007, -3.34498 40.49002, -3.34498 40.49002, -3.345 40.490010000000005, -3.3450100000000002 40.49, -3.3450200000000003 40.48998, -3.3450300000000004 40.48997000000001, -3.3450400000000004 40.48995, -3.3450400000000004 40.48993, -3.3450400000000004 40.489920000000005, -3.3450300000000004 40.489900000000006, -3.3450200000000003 40.48988000000001, -3.3450100000000002 40.48987, -3.34499 40.48986, -3.34498 40.489850000000004, -3.3449500000000003 40.48984, -3.34493 40.48984, -3.3449100000000005 40.489830000000005, -3.3448900000000003 40.48984, -3.3448700000000002 40.48984, -3.3448400000000005 40.489850000000004, -3.3448300000000004 40.48986, -3.3448100000000003 40.48987, -3.3448 40.48988000000001, -3.34479 40.489900000000006, -3.34478 40.489920000000005, -3.34478 40.48993, -3.34478 40.48995, -3.34479 40.48997000000001, -3.3448 40.48998, -3.3448100000000003 40.49, -3.34342 40.49056, -3.3433500000000005 40.490590000000004, -3.3432700000000004 40.49063, -3.34317 40.49069, -3.3430400000000002 40.490790000000004, -3.3427100000000003 40.491020000000006, -3.3423700000000003 40.491240000000005, -3.3409600000000003 40.492270000000005, -3.34037 40.492700000000006, -3.3401600000000004 40.49282, -3.3399500000000004 40.49298, -3.3394800000000004 40.49325, -3.3392600000000003 40.49338, -3.3390700000000004 40.493500000000004, -3.3389300000000004 40.4936, -3.3388600000000004 40.493660000000005, -3.3387700000000002 40.493770000000005, -3.3386700000000004 40.493970000000004, -3.33863 40.49412, -3.3386000000000004 40.49466, -3.33855 40.49486, -3.33849 40.49504, -3.3384000000000005 40.495290000000004, -3.33828 40.495520000000006, -3.3381600000000002 40.49573, -3.3380300000000002 40.49597, -3.3378900000000002 40.49624, -3.3378900000000002 40.49624, -3.3377800000000004 40.49636, -3.33761 40.496500000000005, -3.3374200000000002 40.496640000000006, -3.3371600000000003 40.49685, -3.3369500000000003 40.497020000000006, -3.33637 40.49743, -3.3362700000000003 40.497490000000006, -3.3362200000000004 40.497550000000004, -3.3357900000000002 40.49775, -3.3353200000000003 40.497980000000005, -3.3350800000000005 40.498110000000004, -3.33496 40.49817, -3.3349300000000004 40.498200000000004, -3.3349300000000004 40.49823000000001, -3.3349400000000004 40.498250000000006, -3.3349400000000004 40.498250000000006, -3.33495 40.49826, -3.33496 40.49828, -3.3349800000000002 40.498290000000004, -3.3350100000000004 40.498290000000004, -3.3350500000000003 40.498290000000004, -3.33517 40.498290000000004, -3.33531 40.49833, -3.33543 40.49841, -3.33557 40.498540000000005, -3.33571 40.49868, -3.3357500000000004 40.498720000000006, -3.33578 40.49879000000001, -3.3357900000000002 40.498810000000006, -3.33578 40.498850000000004, -3.33578 40.498850000000004, -3.33577 40.49888, -3.3357300000000003 40.49891, -3.3353800000000002 40.499120000000005, -3.3349300000000004 40.4994, -3.3343100000000003 40.499770000000005, -3.3343100000000003 40.499770000000005, -3.3341600000000002 40.49964000000001, -3.33327 40.500170000000004, -3.33327 40.500170000000004, -3.3316000000000003 40.501160000000006, -3.3316000000000003 40.501160000000006, -3.3313 40.50133),(-3.3313 40.50133, -3.3304300000000002 40.501850000000005, -3.3292100000000002 40.50258, -3.3291000000000004 40.50263, -3.3291000000000004 40.50263, -3.3295200000000005 40.503040000000006, -3.3295200000000005 40.50305, -3.3295200000000005 40.50307, -3.32953 40.503080000000004, -3.32954 40.5031, -3.3295600000000003 40.50311000000001, -3.3295700000000003 40.50312, -3.3295800000000004 40.50312, -3.3296 40.503130000000006, -3.32961 40.503130000000006, -3.33027 40.50377, -3.33027 40.50377, -3.33027 40.503780000000006, -3.3302600000000004 40.503800000000005, -3.33027 40.503820000000005, -3.33027 40.50383, -3.33027 40.503840000000004, -3.33028 40.50386, -3.33029 40.503870000000006, -3.3303100000000003 40.503890000000005, -3.3303200000000004 40.503890000000005, -3.3303300000000004 40.5039, -3.33034 40.5039, -3.33036 40.5039, -3.3303800000000003 40.5039, -3.3303900000000004 40.5039, -3.3304000000000004 40.503890000000005, -3.33041 40.50388, -3.33042 40.503870000000006, -3.3304300000000002 40.50386, -3.3304400000000003 40.50383, -3.3304500000000003 40.503820000000005, -3.3304500000000003 40.503800000000005, -3.3311400000000004 40.503400000000006, -3.3311400000000004 40.503400000000006, -3.33116 40.503420000000005, -3.3312000000000004 40.503440000000005, -3.33123 40.50345, -3.3312700000000004 40.50345, -3.3313200000000003 40.50345, -3.3313500000000004 40.503440000000005, -3.3313900000000003 40.503420000000005, -3.3318600000000002 40.50381, -3.3319300000000003 40.50388, -3.3320200000000004 40.503960000000006, -3.33211 40.50403, -3.3322300000000004 40.50413, -3.3322700000000003 40.50417, -3.3322900000000004 40.504180000000005, -3.33239 40.504270000000005, -3.3326900000000003 40.504490000000004, -3.33313 40.50482, -3.33313 40.50482, -3.33312 40.50477, -3.33306 40.50470000000001, -3.3330300000000004 40.50466, -3.3329700000000004 40.5046, -3.33292 40.50452000000001, -3.3328800000000003 40.504380000000005, -3.33287 40.50424, -3.33287 40.50408, -3.3329100000000005 40.50395, -3.3329400000000002 40.50385, -3.3329700000000004 40.503800000000005, -3.33298 40.503780000000006, -3.3330200000000003 40.503690000000006, -3.3331500000000003 40.503530000000005, -3.33341 40.50336, -3.3350100000000004 40.50235, -3.3354600000000003 40.50207, -3.3358100000000004 40.501920000000005, -3.33604 40.50186, -3.33645 40.50177, -3.33651 40.501760000000004, -3.3371700000000004 40.501630000000006, -3.3373500000000002 40.50159, -3.33754 40.501540000000006, -3.3377200000000004 40.50148, -3.3378400000000003 40.501430000000006, -3.33788 40.50141, -3.33793 40.501380000000005, -3.33801 40.50133, -3.3381200000000004 40.50126, -3.33829 40.50113, -3.3383800000000003 40.50103, -3.33842 40.500980000000005, -3.33854 40.500820000000004, -3.3386500000000003 40.50065, -3.3387900000000003 40.50041, -3.3387900000000003 40.50041, -3.3389300000000004 40.50023, -3.3391800000000002 40.4998, -3.3392500000000002 40.49967, -3.3393100000000002 40.499590000000005, -3.3393900000000003 40.499480000000005, -3.3395 40.49938, -3.3398700000000003 40.499120000000005, -3.3398700000000003 40.499120000000005, -3.3400100000000003 40.499030000000005, -3.3406800000000003 40.49857, -3.34154 40.498000000000005, -3.3416200000000002 40.49795, -3.3417000000000003 40.497890000000005, -3.34174 40.49786, -3.3417700000000003 40.497870000000006, -3.3418300000000003 40.49788, -3.3418900000000002 40.497870000000006, -3.3419100000000004 40.49786, -3.34193 40.497840000000004, -3.34195 40.49781, -3.3419700000000003 40.49777, -3.3419700000000003 40.49772, -3.3429800000000003 40.49709, -3.3438200000000004 40.496550000000006, -3.3448100000000003 40.49591, -3.3449500000000003 40.49582, -3.3452200000000003 40.49564, -3.3459200000000004 40.49519, -3.3461600000000002 40.495050000000006, -3.34641 40.494890000000005, -3.3475 40.494170000000004, -3.3476100000000004 40.4941, -3.3476100000000004 40.4941, -3.34812 40.493770000000005, -3.34824 40.493700000000004, -3.34845 40.4936, -3.34845 40.4936, -3.34846 40.493610000000004, -3.3484800000000003 40.49362, -3.34852 40.49363, -3.3485600000000004 40.493640000000006, -3.34859 40.493640000000006, -3.3486300000000004 40.493640000000006, -3.3486700000000002 40.49363, -3.3489600000000004 40.493880000000004, -3.35002 40.49486, -3.35021 40.495070000000005, -3.3507200000000003 40.49562, -3.3507000000000002 40.495630000000006, -3.35068 40.495650000000005, -3.3506700000000005 40.495670000000004, -3.3506600000000004 40.49570000000001, -3.3506600000000004 40.495720000000006, -3.3506600000000004 40.495740000000005, -3.3506700000000005 40.495760000000004, -3.35068 40.49579000000001, -3.3507000000000002 40.4958, -3.3507200000000003 40.49582, -3.35075 40.495830000000005, -3.3507700000000002 40.49584, -3.3508000000000004 40.495850000000004, -3.35083 40.495850000000004, -3.3508600000000004 40.495850000000004, -3.35089 40.49584, -3.3509200000000003 40.495830000000005, -3.3509900000000003 40.495920000000005, -3.35115 40.496080000000006, -3.35124 40.496190000000006, -3.35142 40.496320000000004, -3.3515900000000003 40.496430000000004, -3.35185 40.496570000000005, -3.3524700000000003 40.496770000000005, -3.3527000000000004 40.4968, -3.3527000000000004 40.4968, -3.3534200000000003 40.496950000000005, -3.35393 40.49705, -3.3540500000000004 40.497080000000004, -3.3540500000000004 40.497080000000004, -3.3540400000000003 40.49709, -3.3540300000000003 40.497110000000006, -3.3540300000000003 40.49712, -3.3540300000000003 40.49714, -3.3540400000000003 40.497150000000005, -3.3540500000000004 40.49716, -3.3540600000000005 40.49718, -3.35407 40.49719, -3.3540900000000002 40.49720000000001, -3.3541100000000003 40.49720000000001, -3.35413 40.49721, -3.35415 40.49721, -3.3541700000000003 40.49721, -3.3541900000000004 40.49720000000001, -3.35421 40.49720000000001, -3.35427 40.49723, -3.3543300000000004 40.497260000000004, -3.3543700000000003 40.49728, -3.3544300000000002 40.49729000000001, -3.35447 40.49729000000001, -3.3545200000000004 40.49729000000001, -3.3545900000000004 40.49728, -3.3546500000000003 40.497260000000004, -3.3547100000000003 40.49723, -3.3547700000000002 40.49720000000001, -3.35482 40.497170000000004, -3.35482 40.497170000000004, -3.3548600000000004 40.49721, -3.3549200000000003 40.49723, -3.3549800000000003 40.497240000000005, -3.3550400000000002 40.497220000000006, -3.35509 40.49719, -3.3551200000000003 40.497150000000005, -3.3556100000000004 40.49712, -3.3563300000000002 40.497060000000005, -3.3569400000000002 40.49698, -3.3579600000000003 40.49674, -3.3589300000000004 40.49653, -3.3592000000000004 40.49647, -3.3596100000000004 40.496370000000006, -3.3598800000000004 40.49631, -3.3601500000000004 40.49624, -3.36052 40.49613, -3.3608300000000004 40.496050000000004, -3.3608300000000004 40.496050000000004, -3.36085 40.49606, -3.3608800000000003 40.49606, -3.3609000000000004 40.49606, -3.36093 40.49606, -3.3609500000000003 40.496050000000004, -3.3609600000000004 40.49604, -3.3609700000000004 40.49602, -3.36098 40.496, -3.36099 40.49598, -3.36098 40.495940000000004, -3.3609700000000004 40.495920000000005, -3.3609500000000003 40.495900000000006, -3.36093 40.49589, -3.3609000000000004 40.49588000000001, -3.3608700000000002 40.49588000000001, -3.36085 40.49589, -3.36079 40.495760000000004, -3.36058 40.49531, -3.3605400000000003 40.495200000000004),(-3.3605400000000003 40.495200000000004, -3.36058 40.49531, -3.36079 40.495760000000004, -3.36085 40.49589, -3.36085 40.49589, -3.3608300000000004 40.495900000000006, -3.3608100000000003 40.495920000000005, -3.3608000000000002 40.49595, -3.3604300000000004 40.49604, -3.3601400000000003 40.496100000000005, -3.35991 40.49616, -3.35964 40.496230000000004, -3.35936 40.496280000000006, -3.3590500000000003 40.496340000000004, -3.3588500000000003 40.49638, -3.3566800000000003 40.496880000000004, -3.35509 40.497020000000006, -3.35509 40.497020000000006, -3.3550400000000002 40.496990000000004, -3.3549800000000003 40.49698, -3.3549200000000003 40.49698, -3.3548600000000004 40.497, -3.35482 40.497040000000005, -3.3548000000000004 40.497080000000004, -3.3547200000000003 40.497130000000006, -3.3546600000000004 40.49716, -3.35461 40.49719, -3.35456 40.49721, -3.3545100000000003 40.49721, -3.3544600000000004 40.497220000000006, -3.3544500000000003 40.497220000000006, -3.3543900000000004 40.49723, -3.3542500000000004 40.49716, -3.3542500000000004 40.49716, -3.3542600000000004 40.497130000000006, -3.3542600000000004 40.4971, -3.3542600000000004 40.49709, -3.3542500000000004 40.497080000000004, -3.3542400000000003 40.497060000000005, -3.35422 40.49705, -3.3542 40.497040000000005, -3.3541900000000004 40.497040000000005, -3.3541700000000003 40.49703, -3.35415 40.49703, -3.35413 40.49703, -3.3541100000000003 40.497040000000005, -3.3540900000000002 40.497040000000005, -3.35407 40.49705, -3.3540600000000005 40.497060000000005, -3.3540500000000004 40.497080000000004, -3.35393 40.49705, -3.3534200000000003 40.496950000000005, -3.3527000000000004 40.4968, -3.3527000000000004 40.4968, -3.3524700000000003 40.496770000000005, -3.35185 40.496570000000005, -3.3515900000000003 40.496430000000004, -3.35142 40.496320000000004, -3.35124 40.496190000000006, -3.35115 40.496080000000006, -3.3509900000000003 40.495920000000005, -3.3509200000000003 40.495830000000005, -3.3509400000000004 40.49582, -3.35096 40.4958, -3.3509800000000003 40.49578, -3.3509900000000003 40.495760000000004, -3.3510000000000004 40.495740000000005, -3.3510000000000004 40.495720000000006, -3.3510000000000004 40.49570000000001, -3.3509900000000003 40.495670000000004, -3.3509800000000003 40.495650000000005, -3.35096 40.495630000000006, -3.3509400000000004 40.49562, -3.3509200000000003 40.4956, -3.35089 40.4956, -3.3508600000000004 40.49559, -3.35083 40.49559, -3.3508000000000004 40.49559, -3.3507700000000002 40.4956, -3.3507400000000005 40.495610000000006, -3.3507200000000003 40.49562, -3.35021 40.495070000000005, -3.35002 40.49486, -3.3489600000000004 40.493880000000004, -3.3486700000000002 40.49363, -3.3486700000000002 40.49363, -3.34871 40.49362, -3.3487400000000002 40.4936, -3.3487700000000004 40.49358, -3.34879 40.49356, -3.3488 40.49353, -3.3488100000000003 40.493500000000004, -3.3488200000000003 40.49347, -3.3488100000000003 40.49344000000001, -3.3488 40.493410000000004, -3.3488 40.4934, -3.3490400000000004 40.493230000000004, -3.34952 40.492940000000004, -3.3495500000000002 40.492920000000005, -3.3498 40.492760000000004, -3.34986 40.492670000000004, -3.34986 40.492670000000004, -3.3505300000000004 40.492230000000006, -3.3508000000000004 40.492050000000006, -3.3512800000000005 40.491760000000006, -3.35137 40.491710000000005, -3.3515300000000003 40.491620000000005, -3.35203 40.4913))', 4326)
谢谢!
I have 3 line string. They are correct but when we try create a MultiLineString
SQL Server 2008 throws an exception:
System.ArgumentException: 24200: The specified input does not
represent a valid geography instance.
I don't see where is the error. Somebody can help me?
DECLARE @g3 geography = geography::STGeomFromText('LINESTRING(-3.3513800000000002 40.49083, -3.3511300000000004 40.49065, -3.3511300000000004 40.49065, -3.35076 40.49078, -3.34947 40.49137, -3.34905 40.49156, -3.3486800000000003 40.491730000000004, -3.3470400000000002 40.49251, -3.3470400000000002 40.49251, -3.3469900000000003 40.492450000000005, -3.34594 40.49123, -3.3452300000000003 40.49034, -3.3451400000000002 40.490230000000004, -3.3450800000000002 40.49015, -3.3450100000000002 40.49007, -3.34498 40.49002, -3.34498 40.49002, -3.345 40.490010000000005, -3.3450100000000002 40.49, -3.3450200000000003 40.48998, -3.3450300000000004 40.48997000000001, -3.3450400000000004 40.48995, -3.3450400000000004 40.48993, -3.3450400000000004 40.489920000000005, -3.3450300000000004 40.489900000000006, -3.3450200000000003 40.48988000000001, -3.3450100000000002 40.48987, -3.34499 40.48986, -3.34498 40.489850000000004, -3.3449500000000003 40.48984, -3.34493 40.48984, -3.3449100000000005 40.489830000000005, -3.3448900000000003 40.48984, -3.3448700000000002 40.48984, -3.3448400000000005 40.489850000000004, -3.3448300000000004 40.48986, -3.3448100000000003 40.48987, -3.3448 40.48988000000001, -3.34479 40.489900000000006, -3.34478 40.489920000000005, -3.34478 40.48993, -3.34478 40.48995, -3.34479 40.48997000000001, -3.3448 40.48998, -3.3448100000000003 40.49, -3.34342 40.49056, -3.3433500000000005 40.490590000000004, -3.3432700000000004 40.49063, -3.34317 40.49069, -3.3430400000000002 40.490790000000004, -3.3427100000000003 40.491020000000006, -3.3423700000000003 40.491240000000005, -3.3409600000000003 40.492270000000005, -3.34037 40.492700000000006, -3.3401600000000004 40.49282, -3.3399500000000004 40.49298, -3.3394800000000004 40.49325, -3.3392600000000003 40.49338, -3.3390700000000004 40.493500000000004, -3.3389300000000004 40.4936, -3.3388600000000004 40.493660000000005, -3.3387700000000002 40.493770000000005, -3.3386700000000004 40.493970000000004, -3.33863 40.49412, -3.3386000000000004 40.49466, -3.33855 40.49486, -3.33849 40.49504, -3.3384000000000005 40.495290000000004, -3.33828 40.495520000000006, -3.3381600000000002 40.49573, -3.3380300000000002 40.49597, -3.3378900000000002 40.49624, -3.3378900000000002 40.49624, -3.3377800000000004 40.49636, -3.33761 40.496500000000005, -3.3374200000000002 40.496640000000006, -3.3371600000000003 40.49685, -3.3369500000000003 40.497020000000006, -3.33637 40.49743, -3.3362700000000003 40.497490000000006, -3.3362200000000004 40.497550000000004, -3.3357900000000002 40.49775, -3.3353200000000003 40.497980000000005, -3.3350800000000005 40.498110000000004, -3.33496 40.49817, -3.3349300000000004 40.498200000000004, -3.3349300000000004 40.49823000000001, -3.3349400000000004 40.498250000000006, -3.3349400000000004 40.498250000000006, -3.33495 40.49826, -3.33496 40.49828, -3.3349800000000002 40.498290000000004, -3.3350100000000004 40.498290000000004, -3.3350500000000003 40.498290000000004, -3.33517 40.498290000000004, -3.33531 40.49833, -3.33543 40.49841, -3.33557 40.498540000000005, -3.33571 40.49868, -3.3357500000000004 40.498720000000006, -3.33578 40.49879000000001, -3.3357900000000002 40.498810000000006, -3.33578 40.498850000000004, -3.33578 40.498850000000004, -3.33577 40.49888, -3.3357300000000003 40.49891, -3.3353800000000002 40.499120000000005, -3.3349300000000004 40.4994, -3.3343100000000003 40.499770000000005, -3.3343100000000003 40.499770000000005, -3.3341600000000002 40.49964000000001, -3.33327 40.500170000000004, -3.33327 40.500170000000004, -3.3316000000000003 40.501160000000006, -3.3316000000000003 40.501160000000006, -3.3313 40.50133)', 4326)
DECLARE @g4 geography = geography::STGeomFromText('LINESTRING(-3.3313 40.50133, -3.3304300000000002 40.501850000000005, -3.3292100000000002 40.50258, -3.3291000000000004 40.50263, -3.3291000000000004 40.50263, -3.3295200000000005 40.503040000000006, -3.3295200000000005 40.50305, -3.3295200000000005 40.50307, -3.32953 40.503080000000004, -3.32954 40.5031, -3.3295600000000003 40.50311000000001, -3.3295700000000003 40.50312, -3.3295800000000004 40.50312, -3.3296 40.503130000000006, -3.32961 40.503130000000006, -3.33027 40.50377, -3.33027 40.50377, -3.33027 40.503780000000006, -3.3302600000000004 40.503800000000005, -3.33027 40.503820000000005, -3.33027 40.50383, -3.33027 40.503840000000004, -3.33028 40.50386, -3.33029 40.503870000000006, -3.3303100000000003 40.503890000000005, -3.3303200000000004 40.503890000000005, -3.3303300000000004 40.5039, -3.33034 40.5039, -3.33036 40.5039, -3.3303800000000003 40.5039, -3.3303900000000004 40.5039, -3.3304000000000004 40.503890000000005, -3.33041 40.50388, -3.33042 40.503870000000006, -3.3304300000000002 40.50386, -3.3304400000000003 40.50383, -3.3304500000000003 40.503820000000005, -3.3304500000000003 40.503800000000005, -3.3311400000000004 40.503400000000006, -3.3311400000000004 40.503400000000006, -3.33116 40.503420000000005, -3.3312000000000004 40.503440000000005, -3.33123 40.50345, -3.3312700000000004 40.50345, -3.3313200000000003 40.50345, -3.3313500000000004 40.503440000000005, -3.3313900000000003 40.503420000000005, -3.3318600000000002 40.50381, -3.3319300000000003 40.50388, -3.3320200000000004 40.503960000000006, -3.33211 40.50403, -3.3322300000000004 40.50413, -3.3322700000000003 40.50417, -3.3322900000000004 40.504180000000005, -3.33239 40.504270000000005, -3.3326900000000003 40.504490000000004, -3.33313 40.50482, -3.33313 40.50482, -3.33312 40.50477, -3.33306 40.50470000000001, -3.3330300000000004 40.50466, -3.3329700000000004 40.5046, -3.33292 40.50452000000001, -3.3328800000000003 40.504380000000005, -3.33287 40.50424, -3.33287 40.50408, -3.3329100000000005 40.50395, -3.3329400000000002 40.50385, -3.3329700000000004 40.503800000000005, -3.33298 40.503780000000006, -3.3330200000000003 40.503690000000006, -3.3331500000000003 40.503530000000005, -3.33341 40.50336, -3.3350100000000004 40.50235, -3.3354600000000003 40.50207, -3.3358100000000004 40.501920000000005, -3.33604 40.50186, -3.33645 40.50177, -3.33651 40.501760000000004, -3.3371700000000004 40.501630000000006, -3.3373500000000002 40.50159, -3.33754 40.501540000000006, -3.3377200000000004 40.50148, -3.3378400000000003 40.501430000000006, -3.33788 40.50141, -3.33793 40.501380000000005, -3.33801 40.50133, -3.3381200000000004 40.50126, -3.33829 40.50113, -3.3383800000000003 40.50103, -3.33842 40.500980000000005, -3.33854 40.500820000000004, -3.3386500000000003 40.50065, -3.3387900000000003 40.50041, -3.3387900000000003 40.50041, -3.3389300000000004 40.50023, -3.3391800000000002 40.4998, -3.3392500000000002 40.49967, -3.3393100000000002 40.499590000000005, -3.3393900000000003 40.499480000000005, -3.3395 40.49938, -3.3398700000000003 40.499120000000005, -3.3398700000000003 40.499120000000005, -3.3400100000000003 40.499030000000005, -3.3406800000000003 40.49857, -3.34154 40.498000000000005, -3.3416200000000002 40.49795, -3.3417000000000003 40.497890000000005, -3.34174 40.49786, -3.3417700000000003 40.497870000000006, -3.3418300000000003 40.49788, -3.3418900000000002 40.497870000000006, -3.3419100000000004 40.49786, -3.34193 40.497840000000004, -3.34195 40.49781, -3.3419700000000003 40.49777, -3.3419700000000003 40.49772, -3.3429800000000003 40.49709, -3.3438200000000004 40.496550000000006, -3.3448100000000003 40.49591, -3.3449500000000003 40.49582, -3.3452200000000003 40.49564, -3.3459200000000004 40.49519, -3.3461600000000002 40.495050000000006, -3.34641 40.494890000000005, -3.3475 40.494170000000004, -3.3476100000000004 40.4941, -3.3476100000000004 40.4941, -3.34812 40.493770000000005, -3.34824 40.493700000000004, -3.34845 40.4936, -3.34845 40.4936, -3.34846 40.493610000000004, -3.3484800000000003 40.49362, -3.34852 40.49363, -3.3485600000000004 40.493640000000006, -3.34859 40.493640000000006, -3.3486300000000004 40.493640000000006, -3.3486700000000002 40.49363, -3.3489600000000004 40.493880000000004, -3.35002 40.49486, -3.35021 40.495070000000005, -3.3507200000000003 40.49562, -3.3507000000000002 40.495630000000006, -3.35068 40.495650000000005, -3.3506700000000005 40.495670000000004, -3.3506600000000004 40.49570000000001, -3.3506600000000004 40.495720000000006, -3.3506600000000004 40.495740000000005, -3.3506700000000005 40.495760000000004, -3.35068 40.49579000000001, -3.3507000000000002 40.4958, -3.3507200000000003 40.49582, -3.35075 40.495830000000005, -3.3507700000000002 40.49584, -3.3508000000000004 40.495850000000004, -3.35083 40.495850000000004, -3.3508600000000004 40.495850000000004, -3.35089 40.49584, -3.3509200000000003 40.495830000000005, -3.3509900000000003 40.495920000000005, -3.35115 40.496080000000006, -3.35124 40.496190000000006, -3.35142 40.496320000000004, -3.3515900000000003 40.496430000000004, -3.35185 40.496570000000005, -3.3524700000000003 40.496770000000005, -3.3527000000000004 40.4968, -3.3527000000000004 40.4968, -3.3534200000000003 40.496950000000005, -3.35393 40.49705, -3.3540500000000004 40.497080000000004, -3.3540500000000004 40.497080000000004, -3.3540400000000003 40.49709, -3.3540300000000003 40.497110000000006, -3.3540300000000003 40.49712, -3.3540300000000003 40.49714, -3.3540400000000003 40.497150000000005, -3.3540500000000004 40.49716, -3.3540600000000005 40.49718, -3.35407 40.49719, -3.3540900000000002 40.49720000000001, -3.3541100000000003 40.49720000000001, -3.35413 40.49721, -3.35415 40.49721, -3.3541700000000003 40.49721, -3.3541900000000004 40.49720000000001, -3.35421 40.49720000000001, -3.35427 40.49723, -3.3543300000000004 40.497260000000004, -3.3543700000000003 40.49728, -3.3544300000000002 40.49729000000001, -3.35447 40.49729000000001, -3.3545200000000004 40.49729000000001, -3.3545900000000004 40.49728, -3.3546500000000003 40.497260000000004, -3.3547100000000003 40.49723, -3.3547700000000002 40.49720000000001, -3.35482 40.497170000000004, -3.35482 40.497170000000004, -3.3548600000000004 40.49721, -3.3549200000000003 40.49723, -3.3549800000000003 40.497240000000005, -3.3550400000000002 40.497220000000006, -3.35509 40.49719, -3.3551200000000003 40.497150000000005, -3.3556100000000004 40.49712, -3.3563300000000002 40.497060000000005, -3.3569400000000002 40.49698, -3.3579600000000003 40.49674, -3.3589300000000004 40.49653, -3.3592000000000004 40.49647, -3.3596100000000004 40.496370000000006, -3.3598800000000004 40.49631, -3.3601500000000004 40.49624, -3.36052 40.49613, -3.3608300000000004 40.496050000000004, -3.3608300000000004 40.496050000000004, -3.36085 40.49606, -3.3608800000000003 40.49606, -3.3609000000000004 40.49606, -3.36093 40.49606, -3.3609500000000003 40.496050000000004, -3.3609600000000004 40.49604, -3.3609700000000004 40.49602, -3.36098 40.496, -3.36099 40.49598, -3.36098 40.495940000000004, -3.3609700000000004 40.495920000000005, -3.3609500000000003 40.495900000000006, -3.36093 40.49589, -3.3609000000000004 40.49588000000001, -3.3608700000000002 40.49588000000001, -3.36085 40.49589, -3.36079 40.495760000000004, -3.36058 40.49531, -3.3605400000000003 40.495200000000004)', 4326)
DECLARE @g5 geography = geography::STGeomFromText('LINESTRING(-3.3605400000000003 40.495200000000004, -3.36058 40.49531, -3.36079 40.495760000000004, -3.36085 40.49589, -3.36085 40.49589, -3.3608300000000004 40.495900000000006, -3.3608100000000003 40.495920000000005, -3.3608000000000002 40.49595, -3.3604300000000004 40.49604, -3.3601400000000003 40.496100000000005, -3.35991 40.49616, -3.35964 40.496230000000004, -3.35936 40.496280000000006, -3.3590500000000003 40.496340000000004, -3.3588500000000003 40.49638, -3.3566800000000003 40.496880000000004, -3.35509 40.497020000000006, -3.35509 40.497020000000006, -3.3550400000000002 40.496990000000004, -3.3549800000000003 40.49698, -3.3549200000000003 40.49698, -3.3548600000000004 40.497, -3.35482 40.497040000000005, -3.3548000000000004 40.497080000000004, -3.3547200000000003 40.497130000000006, -3.3546600000000004 40.49716, -3.35461 40.49719, -3.35456 40.49721, -3.3545100000000003 40.49721, -3.3544600000000004 40.497220000000006, -3.3544500000000003 40.497220000000006, -3.3543900000000004 40.49723, -3.3542500000000004 40.49716, -3.3542500000000004 40.49716, -3.3542600000000004 40.497130000000006, -3.3542600000000004 40.4971, -3.3542600000000004 40.49709, -3.3542500000000004 40.497080000000004, -3.3542400000000003 40.497060000000005, -3.35422 40.49705, -3.3542 40.497040000000005, -3.3541900000000004 40.497040000000005, -3.3541700000000003 40.49703, -3.35415 40.49703, -3.35413 40.49703, -3.3541100000000003 40.497040000000005, -3.3540900000000002 40.497040000000005, -3.35407 40.49705, -3.3540600000000005 40.497060000000005, -3.3540500000000004 40.497080000000004, -3.35393 40.49705, -3.3534200000000003 40.496950000000005, -3.3527000000000004 40.4968, -3.3527000000000004 40.4968, -3.3524700000000003 40.496770000000005, -3.35185 40.496570000000005, -3.3515900000000003 40.496430000000004, -3.35142 40.496320000000004, -3.35124 40.496190000000006, -3.35115 40.496080000000006, -3.3509900000000003 40.495920000000005, -3.3509200000000003 40.495830000000005, -3.3509400000000004 40.49582, -3.35096 40.4958, -3.3509800000000003 40.49578, -3.3509900000000003 40.495760000000004, -3.3510000000000004 40.495740000000005, -3.3510000000000004 40.495720000000006, -3.3510000000000004 40.49570000000001, -3.3509900000000003 40.495670000000004, -3.3509800000000003 40.495650000000005, -3.35096 40.495630000000006, -3.3509400000000004 40.49562, -3.3509200000000003 40.4956, -3.35089 40.4956, -3.3508600000000004 40.49559, -3.35083 40.49559, -3.3508000000000004 40.49559, -3.3507700000000002 40.4956, -3.3507400000000005 40.495610000000006, -3.3507200000000003 40.49562, -3.35021 40.495070000000005, -3.35002 40.49486, -3.3489600000000004 40.493880000000004, -3.3486700000000002 40.49363, -3.3486700000000002 40.49363, -3.34871 40.49362, -3.3487400000000002 40.4936, -3.3487700000000004 40.49358, -3.34879 40.49356, -3.3488 40.49353, -3.3488100000000003 40.493500000000004, -3.3488200000000003 40.49347, -3.3488100000000003 40.49344000000001, -3.3488 40.493410000000004, -3.3488 40.4934, -3.3490400000000004 40.493230000000004, -3.34952 40.492940000000004, -3.3495500000000002 40.492920000000005, -3.3498 40.492760000000004, -3.34986 40.492670000000004, -3.34986 40.492670000000004, -3.3505300000000004 40.492230000000006, -3.3508000000000004 40.492050000000006, -3.3512800000000005 40.491760000000006, -3.35137 40.491710000000005, -3.3515300000000003 40.491620000000005, -3.35203 40.4913)', 4326)
declare @g6 geography = geography::STGeomFromText('MultiLineString((-3.3513800000000002 40.49083, -3.3511300000000004 40.49065, -3.3511300000000004 40.49065, -3.35076 40.49078, -3.34947 40.49137, -3.34905 40.49156, -3.3486800000000003 40.491730000000004, -3.3470400000000002 40.49251, -3.3470400000000002 40.49251, -3.3469900000000003 40.492450000000005, -3.34594 40.49123, -3.3452300000000003 40.49034, -3.3451400000000002 40.490230000000004, -3.3450800000000002 40.49015, -3.3450100000000002 40.49007, -3.34498 40.49002, -3.34498 40.49002, -3.345 40.490010000000005, -3.3450100000000002 40.49, -3.3450200000000003 40.48998, -3.3450300000000004 40.48997000000001, -3.3450400000000004 40.48995, -3.3450400000000004 40.48993, -3.3450400000000004 40.489920000000005, -3.3450300000000004 40.489900000000006, -3.3450200000000003 40.48988000000001, -3.3450100000000002 40.48987, -3.34499 40.48986, -3.34498 40.489850000000004, -3.3449500000000003 40.48984, -3.34493 40.48984, -3.3449100000000005 40.489830000000005, -3.3448900000000003 40.48984, -3.3448700000000002 40.48984, -3.3448400000000005 40.489850000000004, -3.3448300000000004 40.48986, -3.3448100000000003 40.48987, -3.3448 40.48988000000001, -3.34479 40.489900000000006, -3.34478 40.489920000000005, -3.34478 40.48993, -3.34478 40.48995, -3.34479 40.48997000000001, -3.3448 40.48998, -3.3448100000000003 40.49, -3.34342 40.49056, -3.3433500000000005 40.490590000000004, -3.3432700000000004 40.49063, -3.34317 40.49069, -3.3430400000000002 40.490790000000004, -3.3427100000000003 40.491020000000006, -3.3423700000000003 40.491240000000005, -3.3409600000000003 40.492270000000005, -3.34037 40.492700000000006, -3.3401600000000004 40.49282, -3.3399500000000004 40.49298, -3.3394800000000004 40.49325, -3.3392600000000003 40.49338, -3.3390700000000004 40.493500000000004, -3.3389300000000004 40.4936, -3.3388600000000004 40.493660000000005, -3.3387700000000002 40.493770000000005, -3.3386700000000004 40.493970000000004, -3.33863 40.49412, -3.3386000000000004 40.49466, -3.33855 40.49486, -3.33849 40.49504, -3.3384000000000005 40.495290000000004, -3.33828 40.495520000000006, -3.3381600000000002 40.49573, -3.3380300000000002 40.49597, -3.3378900000000002 40.49624, -3.3378900000000002 40.49624, -3.3377800000000004 40.49636, -3.33761 40.496500000000005, -3.3374200000000002 40.496640000000006, -3.3371600000000003 40.49685, -3.3369500000000003 40.497020000000006, -3.33637 40.49743, -3.3362700000000003 40.497490000000006, -3.3362200000000004 40.497550000000004, -3.3357900000000002 40.49775, -3.3353200000000003 40.497980000000005, -3.3350800000000005 40.498110000000004, -3.33496 40.49817, -3.3349300000000004 40.498200000000004, -3.3349300000000004 40.49823000000001, -3.3349400000000004 40.498250000000006, -3.3349400000000004 40.498250000000006, -3.33495 40.49826, -3.33496 40.49828, -3.3349800000000002 40.498290000000004, -3.3350100000000004 40.498290000000004, -3.3350500000000003 40.498290000000004, -3.33517 40.498290000000004, -3.33531 40.49833, -3.33543 40.49841, -3.33557 40.498540000000005, -3.33571 40.49868, -3.3357500000000004 40.498720000000006, -3.33578 40.49879000000001, -3.3357900000000002 40.498810000000006, -3.33578 40.498850000000004, -3.33578 40.498850000000004, -3.33577 40.49888, -3.3357300000000003 40.49891, -3.3353800000000002 40.499120000000005, -3.3349300000000004 40.4994, -3.3343100000000003 40.499770000000005, -3.3343100000000003 40.499770000000005, -3.3341600000000002 40.49964000000001, -3.33327 40.500170000000004, -3.33327 40.500170000000004, -3.3316000000000003 40.501160000000006, -3.3316000000000003 40.501160000000006, -3.3313 40.50133),(-3.3313 40.50133, -3.3304300000000002 40.501850000000005, -3.3292100000000002 40.50258, -3.3291000000000004 40.50263, -3.3291000000000004 40.50263, -3.3295200000000005 40.503040000000006, -3.3295200000000005 40.50305, -3.3295200000000005 40.50307, -3.32953 40.503080000000004, -3.32954 40.5031, -3.3295600000000003 40.50311000000001, -3.3295700000000003 40.50312, -3.3295800000000004 40.50312, -3.3296 40.503130000000006, -3.32961 40.503130000000006, -3.33027 40.50377, -3.33027 40.50377, -3.33027 40.503780000000006, -3.3302600000000004 40.503800000000005, -3.33027 40.503820000000005, -3.33027 40.50383, -3.33027 40.503840000000004, -3.33028 40.50386, -3.33029 40.503870000000006, -3.3303100000000003 40.503890000000005, -3.3303200000000004 40.503890000000005, -3.3303300000000004 40.5039, -3.33034 40.5039, -3.33036 40.5039, -3.3303800000000003 40.5039, -3.3303900000000004 40.5039, -3.3304000000000004 40.503890000000005, -3.33041 40.50388, -3.33042 40.503870000000006, -3.3304300000000002 40.50386, -3.3304400000000003 40.50383, -3.3304500000000003 40.503820000000005, -3.3304500000000003 40.503800000000005, -3.3311400000000004 40.503400000000006, -3.3311400000000004 40.503400000000006, -3.33116 40.503420000000005, -3.3312000000000004 40.503440000000005, -3.33123 40.50345, -3.3312700000000004 40.50345, -3.3313200000000003 40.50345, -3.3313500000000004 40.503440000000005, -3.3313900000000003 40.503420000000005, -3.3318600000000002 40.50381, -3.3319300000000003 40.50388, -3.3320200000000004 40.503960000000006, -3.33211 40.50403, -3.3322300000000004 40.50413, -3.3322700000000003 40.50417, -3.3322900000000004 40.504180000000005, -3.33239 40.504270000000005, -3.3326900000000003 40.504490000000004, -3.33313 40.50482, -3.33313 40.50482, -3.33312 40.50477, -3.33306 40.50470000000001, -3.3330300000000004 40.50466, -3.3329700000000004 40.5046, -3.33292 40.50452000000001, -3.3328800000000003 40.504380000000005, -3.33287 40.50424, -3.33287 40.50408, -3.3329100000000005 40.50395, -3.3329400000000002 40.50385, -3.3329700000000004 40.503800000000005, -3.33298 40.503780000000006, -3.3330200000000003 40.503690000000006, -3.3331500000000003 40.503530000000005, -3.33341 40.50336, -3.3350100000000004 40.50235, -3.3354600000000003 40.50207, -3.3358100000000004 40.501920000000005, -3.33604 40.50186, -3.33645 40.50177, -3.33651 40.501760000000004, -3.3371700000000004 40.501630000000006, -3.3373500000000002 40.50159, -3.33754 40.501540000000006, -3.3377200000000004 40.50148, -3.3378400000000003 40.501430000000006, -3.33788 40.50141, -3.33793 40.501380000000005, -3.33801 40.50133, -3.3381200000000004 40.50126, -3.33829 40.50113, -3.3383800000000003 40.50103, -3.33842 40.500980000000005, -3.33854 40.500820000000004, -3.3386500000000003 40.50065, -3.3387900000000003 40.50041, -3.3387900000000003 40.50041, -3.3389300000000004 40.50023, -3.3391800000000002 40.4998, -3.3392500000000002 40.49967, -3.3393100000000002 40.499590000000005, -3.3393900000000003 40.499480000000005, -3.3395 40.49938, -3.3398700000000003 40.499120000000005, -3.3398700000000003 40.499120000000005, -3.3400100000000003 40.499030000000005, -3.3406800000000003 40.49857, -3.34154 40.498000000000005, -3.3416200000000002 40.49795, -3.3417000000000003 40.497890000000005, -3.34174 40.49786, -3.3417700000000003 40.497870000000006, -3.3418300000000003 40.49788, -3.3418900000000002 40.497870000000006, -3.3419100000000004 40.49786, -3.34193 40.497840000000004, -3.34195 40.49781, -3.3419700000000003 40.49777, -3.3419700000000003 40.49772, -3.3429800000000003 40.49709, -3.3438200000000004 40.496550000000006, -3.3448100000000003 40.49591, -3.3449500000000003 40.49582, -3.3452200000000003 40.49564, -3.3459200000000004 40.49519, -3.3461600000000002 40.495050000000006, -3.34641 40.494890000000005, -3.3475 40.494170000000004, -3.3476100000000004 40.4941, -3.3476100000000004 40.4941, -3.34812 40.493770000000005, -3.34824 40.493700000000004, -3.34845 40.4936, -3.34845 40.4936, -3.34846 40.493610000000004, -3.3484800000000003 40.49362, -3.34852 40.49363, -3.3485600000000004 40.493640000000006, -3.34859 40.493640000000006, -3.3486300000000004 40.493640000000006, -3.3486700000000002 40.49363, -3.3489600000000004 40.493880000000004, -3.35002 40.49486, -3.35021 40.495070000000005, -3.3507200000000003 40.49562, -3.3507000000000002 40.495630000000006, -3.35068 40.495650000000005, -3.3506700000000005 40.495670000000004, -3.3506600000000004 40.49570000000001, -3.3506600000000004 40.495720000000006, -3.3506600000000004 40.495740000000005, -3.3506700000000005 40.495760000000004, -3.35068 40.49579000000001, -3.3507000000000002 40.4958, -3.3507200000000003 40.49582, -3.35075 40.495830000000005, -3.3507700000000002 40.49584, -3.3508000000000004 40.495850000000004, -3.35083 40.495850000000004, -3.3508600000000004 40.495850000000004, -3.35089 40.49584, -3.3509200000000003 40.495830000000005, -3.3509900000000003 40.495920000000005, -3.35115 40.496080000000006, -3.35124 40.496190000000006, -3.35142 40.496320000000004, -3.3515900000000003 40.496430000000004, -3.35185 40.496570000000005, -3.3524700000000003 40.496770000000005, -3.3527000000000004 40.4968, -3.3527000000000004 40.4968, -3.3534200000000003 40.496950000000005, -3.35393 40.49705, -3.3540500000000004 40.497080000000004, -3.3540500000000004 40.497080000000004, -3.3540400000000003 40.49709, -3.3540300000000003 40.497110000000006, -3.3540300000000003 40.49712, -3.3540300000000003 40.49714, -3.3540400000000003 40.497150000000005, -3.3540500000000004 40.49716, -3.3540600000000005 40.49718, -3.35407 40.49719, -3.3540900000000002 40.49720000000001, -3.3541100000000003 40.49720000000001, -3.35413 40.49721, -3.35415 40.49721, -3.3541700000000003 40.49721, -3.3541900000000004 40.49720000000001, -3.35421 40.49720000000001, -3.35427 40.49723, -3.3543300000000004 40.497260000000004, -3.3543700000000003 40.49728, -3.3544300000000002 40.49729000000001, -3.35447 40.49729000000001, -3.3545200000000004 40.49729000000001, -3.3545900000000004 40.49728, -3.3546500000000003 40.497260000000004, -3.3547100000000003 40.49723, -3.3547700000000002 40.49720000000001, -3.35482 40.497170000000004, -3.35482 40.497170000000004, -3.3548600000000004 40.49721, -3.3549200000000003 40.49723, -3.3549800000000003 40.497240000000005, -3.3550400000000002 40.497220000000006, -3.35509 40.49719, -3.3551200000000003 40.497150000000005, -3.3556100000000004 40.49712, -3.3563300000000002 40.497060000000005, -3.3569400000000002 40.49698, -3.3579600000000003 40.49674, -3.3589300000000004 40.49653, -3.3592000000000004 40.49647, -3.3596100000000004 40.496370000000006, -3.3598800000000004 40.49631, -3.3601500000000004 40.49624, -3.36052 40.49613, -3.3608300000000004 40.496050000000004, -3.3608300000000004 40.496050000000004, -3.36085 40.49606, -3.3608800000000003 40.49606, -3.3609000000000004 40.49606, -3.36093 40.49606, -3.3609500000000003 40.496050000000004, -3.3609600000000004 40.49604, -3.3609700000000004 40.49602, -3.36098 40.496, -3.36099 40.49598, -3.36098 40.495940000000004, -3.3609700000000004 40.495920000000005, -3.3609500000000003 40.495900000000006, -3.36093 40.49589, -3.3609000000000004 40.49588000000001, -3.3608700000000002 40.49588000000001, -3.36085 40.49589, -3.36079 40.495760000000004, -3.36058 40.49531, -3.3605400000000003 40.495200000000004),(-3.3605400000000003 40.495200000000004, -3.36058 40.49531, -3.36079 40.495760000000004, -3.36085 40.49589, -3.36085 40.49589, -3.3608300000000004 40.495900000000006, -3.3608100000000003 40.495920000000005, -3.3608000000000002 40.49595, -3.3604300000000004 40.49604, -3.3601400000000003 40.496100000000005, -3.35991 40.49616, -3.35964 40.496230000000004, -3.35936 40.496280000000006, -3.3590500000000003 40.496340000000004, -3.3588500000000003 40.49638, -3.3566800000000003 40.496880000000004, -3.35509 40.497020000000006, -3.35509 40.497020000000006, -3.3550400000000002 40.496990000000004, -3.3549800000000003 40.49698, -3.3549200000000003 40.49698, -3.3548600000000004 40.497, -3.35482 40.497040000000005, -3.3548000000000004 40.497080000000004, -3.3547200000000003 40.497130000000006, -3.3546600000000004 40.49716, -3.35461 40.49719, -3.35456 40.49721, -3.3545100000000003 40.49721, -3.3544600000000004 40.497220000000006, -3.3544500000000003 40.497220000000006, -3.3543900000000004 40.49723, -3.3542500000000004 40.49716, -3.3542500000000004 40.49716, -3.3542600000000004 40.497130000000006, -3.3542600000000004 40.4971, -3.3542600000000004 40.49709, -3.3542500000000004 40.497080000000004, -3.3542400000000003 40.497060000000005, -3.35422 40.49705, -3.3542 40.497040000000005, -3.3541900000000004 40.497040000000005, -3.3541700000000003 40.49703, -3.35415 40.49703, -3.35413 40.49703, -3.3541100000000003 40.497040000000005, -3.3540900000000002 40.497040000000005, -3.35407 40.49705, -3.3540600000000005 40.497060000000005, -3.3540500000000004 40.497080000000004, -3.35393 40.49705, -3.3534200000000003 40.496950000000005, -3.3527000000000004 40.4968, -3.3527000000000004 40.4968, -3.3524700000000003 40.496770000000005, -3.35185 40.496570000000005, -3.3515900000000003 40.496430000000004, -3.35142 40.496320000000004, -3.35124 40.496190000000006, -3.35115 40.496080000000006, -3.3509900000000003 40.495920000000005, -3.3509200000000003 40.495830000000005, -3.3509400000000004 40.49582, -3.35096 40.4958, -3.3509800000000003 40.49578, -3.3509900000000003 40.495760000000004, -3.3510000000000004 40.495740000000005, -3.3510000000000004 40.495720000000006, -3.3510000000000004 40.49570000000001, -3.3509900000000003 40.495670000000004, -3.3509800000000003 40.495650000000005, -3.35096 40.495630000000006, -3.3509400000000004 40.49562, -3.3509200000000003 40.4956, -3.35089 40.4956, -3.3508600000000004 40.49559, -3.35083 40.49559, -3.3508000000000004 40.49559, -3.3507700000000002 40.4956, -3.3507400000000005 40.495610000000006, -3.3507200000000003 40.49562, -3.35021 40.495070000000005, -3.35002 40.49486, -3.3489600000000004 40.493880000000004, -3.3486700000000002 40.49363, -3.3486700000000002 40.49363, -3.34871 40.49362, -3.3487400000000002 40.4936, -3.3487700000000004 40.49358, -3.34879 40.49356, -3.3488 40.49353, -3.3488100000000003 40.493500000000004, -3.3488200000000003 40.49347, -3.3488100000000003 40.49344000000001, -3.3488 40.493410000000004, -3.3488 40.4934, -3.3490400000000004 40.493230000000004, -3.34952 40.492940000000004, -3.3495500000000002 40.492920000000005, -3.3498 40.492760000000004, -3.34986 40.492670000000004, -3.34986 40.492670000000004, -3.3505300000000004 40.492230000000006, -3.3508000000000004 40.492050000000006, -3.3512800000000005 40.491760000000006, -3.35137 40.491710000000005, -3.3515300000000003 40.491620000000005, -3.35203 40.4913))', 4326)
thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我又看了一遍msdn。你是对的。2.组成 MultiLineString 实例的两个 LineString 实例不能在一定间隔内重叠
因此,问题的解决方案可能是将这些数据存储为多点,但如果如果我们选择这个选项,我们就会遇到 STDistance 的问题。如果保存为多线串或多点,结果会有所不同。
解决方案是使用几何集合!
再次感谢您的帮助
I read again the msdn. You are right.2.No two LineString instances comprising the MultiLineString instance may overlap over an interval
So may be the solution to the problem is store this data as multipoint, but if we choose this option, we'll have a problem with STDistance. The result is different if you save as multilinestring or multipoint.
The solution is use a GEOMETRY COLLECTION!
Thanks again for your help
错误出在 G6 行的某处。您定义的第二个和第三个线串的某些内容失败 - 可能两者都有一个重叠的共同段,这是不允许的。
The error's somewhere in your G6 line. Something about the 2nd and 3rd linestrings you're defining fails - possibly both have a segment in common that overlaps, which is not permitted.