I just updated to the latest build of the Desktop version and the following Polygon definition (from SQL server 2008) now generates an invalid format error, whereas it didn’t yesterday with the older code.
The code being executed is:
PolygonShape polyShape = new PolygonShape(wkt);
Where wtk = “POLYGON ((-74.579968 39.368085, -74.57997 39.367546, -74.579968999999991 39.367514, -74.579955 39.367484999999995, -74.579838 39.367000000000004, -74.579616 39.366386999999996, -74.579379 39.365829, -74.57915 39.365221, -74.578744 39.36459, -74.57821899999999 39.363907999999995, -74.577775 39.363402, -74.577463 39.363068999999996, -74.57723399999999 39.362791, -74.576955 39.362216, -74.57685 39.361796999999996, -74.576833 39.36156, -74.576944 39.361303, -74.576998 39.361132999999995, -74.577018999999993 39.361078, -74.577114999999992 39.360926, -74.577224 39.360800000000005, -74.57727 39.360755999999995, -74.577306 39.360731, -74.577359 39.360684, -74.577621 39.360557, -74.57777999999999 39.360382, -74.577893 39.360337, -74.577991 39.360305, -74.578211 39.360258, -74.578261 39.360248, -74.578598 39.359932, -74.578847 39.359521, -74.578941 39.358846, -74.578822 39.358284999999995, -74.578734 39.357709, -74.578712 39.357562, -74.57867 39.357287, -74.578589999999991 39.356823, -74.57853999999999 39.356576, -74.57841599999999 39.356117, -74.578634 39.355754999999995, -74.579101 39.355394, -74.579242999999991 39.355304, -74.579444 39.355177, -74.579972 39.35496, -74.579968 39.354780999999996, -74.579973 39.354501, -74.579943 39.353801, -74.58009 39.353274, -74.580128 39.353144, -74.58016099999999 39.353029, -74.580249999999992 39.352969, -74.580598 39.352744, -74.580666999999991 39.35257, -74.580876 39.352066, -74.581189 39.351822, -74.581502 39.351599, -74.581561999999991 39.351557, -74.581998 39.351364, -74.582168 39.351259, -74.582309 39.351171, -74.582371999999992 39.350905999999995, -74.582276 39.350722, -74.581847 39.349897999999996, -74.582053 39.349609, -74.582342 39.349216, -74.58290199999999 39.349005, -74.583517 39.348819999999996, -74.583867 39.348715999999996, -74.584582 39.348451, -74.585111 39.347871999999995, -74.585112 39.347697, -74.585112 39.34751, -74.58502 39.347287, -74.584944 39.347100000000005, -74.584864 39.346906, -74.584716 39.346475999999996, -74.584616 39.346182, -74.584865 39.345506, -74.58513099999999 39.345254, -74.58540099999999 39.345103, -74.585529 39.345003999999996, -74.585573 39.344912, -74.585985 39.344733999999995, -74.586519 39.344553999999995, -74.586700999999991 39.344493, -74.587167 39.344059, -74.587271 39.343654, -74.587417 39.343094, -74.587574 39.342841, -74.587659 39.342707999999995, -74.588009 39.342152999999996, -74.588476 39.341646, -74.588383999999991 39.340728999999996, -74.588557 39.339656, -74.588572 39.339569999999995, -74.58865 39.339524999999995, -74.589109999999991 39.339262999999995, -74.589163 39.339231999999996, -74.590064 39.339185, -74.590717 39.339475, -74.591416999999993 39.339901, -74.591437 39.339911, -74.591843 39.340002, -74.592084 39.340055, -74.592613 39.339862, -74.592986 39.339138, -74.59306 39.338943, -74.593267 39.33839, -74.593547 39.338052, -74.594045 39.338004, -74.594498 39.337952, -74.595113 39.337880999999996, -74.595288 39.33786, -74.595578 39.337773999999996, -74.595941 39.337666999999996, -74.596057 39.337429, -74.596128 39.337281, -74.596054999999993 39.336768, -74.59601099999999 39.336487, -74.596017 39.336414, -74.596103 39.336079999999995, -74.596052 39.336023, -74.595849 39.335806999999996, -74.595263 39.335164, -74.594775 39.334627, -74.594624 39.334415, -74.594453 39.334249, -74.593723 39.333467999999996, -74.593008 39.332677, -74.592873 39.332541, -74.592795 39.332451999999996, -74.592545 39.332195, -74.592405 39.33208, -74.592385 39.332059, -74.592105 39.331885, -74.591898 39.331776999999995, -74.591065 39.331368, -74.590344 39.331011, -74.590175 39.330923999999996, -74.589891 39.330779, -74.589488 39.330574, -74.589235 39.330452, -74.58876 39.330202, -74.587721 39.329679, -74.587107 39.329363, -74.587018 39.329322, -74.584598 39.328122, -74.58492 39.327712999999996, -74.58491699999999 39.327669, -74.584751 39.327580999999995, -74.583728 39.32707, -74.583427 39.326924999999996, -74.581937 39.326206, -74.581616 39.326051, -74.581323 39.325885, -74.581279 39.32586, -74.580933 39.326209, -74.580773999999991 39.326361, -74.580604999999991 39.326287, -74.577804 39.325243, -74.57670499999999 39.324821, -74.576675999999992 39.324807, -74.576644 39.324794, -74.57593 39.324531, -74.573242999999991 39.323119999999996, -74.573349 39.323080999999995, -74.573433999999992 39.32302, -74.573538 39.322827, -74.573613999999992 39.322784999999996, -74.57333899999999 39.322649, -74.57318699999999 39.322587999999996, -74.573225 39.322548, -74.573287999999991 39.322404999999996, -74.573252 39.322355, -74.573195 39.322312, -74.573082 39.322317999999996, -74.573032 39.322202, -74.572904 39.32217, -74.57289 39.322043, -74.573009 39.321988, -74.573135999999991 39.321965999999996, -74.573128 39.321861, -74.573072 39.321822999999995, -74.57305 39.321762, -74.573022 39.321708, -74.573028 39.321636, -74.57307 39.321515, -74.573105 39.321453999999996, -74.573133 39.321416, -74.573132 39.321239999999996, -74.573039999999992 39.321228999999995, -74.572926999999993 39.321245999999995, -74.57282699999999 39.321219, -74.572791999999993 39.321186, -74.572735 39.32112, -74.572727 39.321016, -74.572734 39.320955999999995, -74.572734 39.32089, -74.572705 39.320785, -74.572662 39.320707999999996, -74.572589999999991 39.320648, -74.572526 39.320615, -74.572456 39.320599, -74.57239899999999 39.320611, -74.572313999999992 39.320611, -74.572313999999992 39.32055, -74.572299 39.320473, -74.572334 39.320418, -74.572305 39.320358, -74.572256 39.320319999999995, -74.572248 39.320276, -74.572262 39.320209999999996, -74.572318 39.320127, -74.572367 39.320043999999996, -74.572451 39.319939, -74.572543 39.319873, -74.572578 39.31984, -74.572507 39.319784999999996, -74.572329 39.319665, -74.572301 39.319593999999995, -74.572121 39.319586, -74.571930999999992 39.319559, -74.571697 39.319441, -74.571514 39.319404, -74.571287 39.319403, -74.571068 39.319447, -74.570883 39.319519, -74.570184 39.319949, -74.569971999999993 39.320155, -74.56952 39.320792999999995, -74.56942 39.321017999999995, -74.569279999999992 39.321216, -74.569257 39.321107999999995, -74.569047 39.321346999999996, -74.56805 39.320358999999996, -74.567292999999992 39.319564, -74.567072 39.31944, -74.566870999999992 39.319575, -74.566261 39.319964, -74.565874 39.32024, -74.565437 39.32051, -74.56492 39.320845999999996, -74.564647999999991 39.32103, -74.564439 39.321186999999995, -74.56423 39.321355, -74.564106 39.321524, -74.563881999999992 39.321757999999996, -74.563535 39.322134, -74.56304 39.322793999999995, -74.562816 39.323105, -74.56257699999999 39.323371, -74.562253 39.32394, -74.56222 39.324182, -74.562181 39.324385, -74.562142999999992 39.324532999999995, -74.562159999999992 39.324725, -74.56226 39.325023, -74.562480999999991 39.325334, -74.562626999999992 39.325478, -74.562806999999992 39.325672999999995, -74.563017 39.325818, -74.563234999999992 39.325887, -74.563537 39.326028, -74.56394 39.326071, -74.564548 39.32611, -74.565 39.326142999999995, -74.565446 39.326159, -74.565907 39.326169, -74.566330999999991 39.326191, -74.5667 39.326195, -74.567044 39.326276, -74.567326 39.32635, -74.567615 39.326457999999995, -74.567922 39.326687, -74.568218 39.327090999999996, -74.56839 39.327368, -74.568514 39.327557, -74.56853799999999 39.327728, -74.568624 39.328041999999996, -74.56862 39.328295, -74.56872 39.328582, -74.568743 39.328852, -74.568801999999991 39.329105, -74.568908999999991 39.32942, -74.569028 39.329834, -74.56913999999999 39.329972999999995, -74.569255 39.330221, -74.56930899999999 39.330359, -74.569254 39.330639, -74.569194 39.330798, -74.569092 39.330912999999995, -74.568991 39.330994, -74.56882 39.331085, -74.568747 39.331116, -74.568654999999993 39.331154999999995, -74.568399 39.331257, -74.568108 39.331292, -74.567853 39.331278, -74.567635 39.331226, -74.567522 39.33117, -74.567206 39.331061999999996, -74.566783 39.330968999999996, -74.566445 39.330872, -74.565936999999991 39.330762, -74.565384 39.330767, -74.56496 39.330757, -74.564576 39.330813, -74.564405 39.330898999999995, -74.56409699999999 39.331072, -74.563859999999991 39.331218, -74.56363 39.331379999999996, -74.563436 39.331537, -74.56324699999999 39.331744, -74.56283599999999 39.332158, -74.562632999999991 39.332375, -74.562480999999991 39.332577, -74.562249999999992 39.332806, -74.562054 39.333012, -74.561802 39.333234999999995, -74.56152 39.333523, -74.561128 39.334008999999995, -74.560996 39.334222, -74.560966 39.334342, -74.560941 39.334523, -74.560931 39.334683, -74.560948 39.334886, -74.56093 39.335083999999995, -74.560887999999991 39.335346, -74.560796 39.33577, -74.560728 39.335989999999995, -74.560602 39.336252, -74.5605 39.336427, -74.560311 39.336672, -74.56003299999999 39.337131, -74.559823 39.337365, -74.559468999999993 39.337702, -74.559165 39.338046, -74.558861999999991 39.338345, -74.558724 39.33846, -74.55858099999999 39.338578, -74.558320999999992 39.338823, -74.557953 39.339132, -74.55760699999999 39.339431, -74.557248 39.339690999999995, -74.55689 39.339934, -74.556473 39.340226, -74.555447 39.340886, -74.554931 39.34121, -74.554385 39.341533999999996, -74.55306 39.342321999999996, -74.552557999999991 39.342636, -74.552005999999992 39.342932, -74.551627 39.343153, -74.551375999999991 39.343326, -74.550917 39.343585, -74.550373 39.343900000000005, -74.549571 39.343996, -74.548603 39.344698, -74.54606 39.346515, -74.546075 39.346562999999996, -74.546092 39.346601, -74.545796 39.346666, -74.54552799999999 39.346689, -74.545358 39.346771, -74.545041 39.346886999999995, -74.54422799999999 39.346983, -74.543669999999992 39.347242, -74.543416 39.34722, -74.543382999999992 39.347227, -74.543398 39.347549, -74.543482 39.349287, -74.543444999999991 39.349447999999995, -74.543528 39.349674, -74.543542 39.349782, -74.543585999999991 39.349807999999996, -74.543720999999991 39.349965999999995, -74.543888 39.350089, -74.544141 39.350224, -74.544344999999993 39.350319999999996, -74.544472 39.350398999999996, -74.544589 39.350471, -74.544722999999991 39.350614, -74.544806999999992 39.35084, -74.544912 39.350893, -74.547254999999993 39.352151, -74.548510999999991 39.352792, -74.549680999999993 39.353404999999995, -74.550339999999991 39.353786, -74.550663 39.353911, -74.553763 39.355517, -74.553973 39.355626, -74.554932999999991 39.356016, -74.555309 39.355999, -74.557154 39.356742, -74.560259 39.358047, -74.559865 39.358377, -74.559827 39.358412, -74.559975 39.358692999999995, -74.56206499999999 39.359637, -74.562168 39.359682, -74.562198999999993 39.359697, -74.562294999999992 39.359744, -74.5642 39.360485, -74.565975999999992 39.361174999999996, -74.566073 39.361270999999995, -74.567016 39.361584, -74.567591999999991 39.361768999999995, -74.567797 39.361428, -74.567821999999992 39.361373, -74.567973 39.361433, -74.568152 39.361501, -74.56862 39.361689, -74.568068 39.36231, -74.567948 39.362531, -74.567647999999991 39.363001, -74.567534999999992 39.363051999999996, -74.567543 39.363133999999995, -74.567304 39.363417, -74.570874 39.364861, -74.57218499999999 39.365376, -74.572814999999991 39.365629999999996, -74.574970999999991 39.366462, -74.57583 39.366800999999995, -74.576093 39.366901, -74.577091 39.367303, -74.577321 39.367402, -74.578397999999993 39.367824999999996, -74.578689 39.367945999999996, -74.579107 39.368161, -74.579054 39.368151, -74.57888 39.36815, -74.579016 39.368245, -74.579094 39.368227, -74.579163999999992 39.368165, -74.57929399999999 39.368173, -74.579764 39.368195, -74.579968 39.368204, -74.580013 39.368206, -74.579968 39.368085))”;
Any ideas what’s wrong with this polygon?
It was derived from a call to a geography field in SQL Server 2008:
Select geographyfield.STAsText() from locations.
Thanks.
bob