Хотя вам нужно перевести на свои замены ...
Ignore "MULTIPOLYGON"s and split on ")), ((" and handle each as you would a polygon.
Но самый простой и быстрый метод, который я использовал для этого (в основном JS):
get the geography.STAsText() from sql into some functional language
foreach multi
replace "MULTIPOLYGON" with "" (nothing)
split on ")), (("
foreach poly
replace "POLYGON" with ""
split on "), ("
foreach coordset
replace "[((]" and "[))]" with ""
split on ","
foreach point
trim and split on " "
lat = coord[1]
lng = coord[0]