In the latest version of msSQLSpatial, locales where instead of a dot a comma is used as decimal seperator cause geometry construction to fail
The trick is to enhance the geometry construction functions with a temporary change of the culture in use: (Here is an example)
'First, store the CurrentCulture so it can be reset after the routine is done
Dim originalCulture As System.Globalization.CultureInfo
originalCulture = CultureInfo.CurrentCulture
'msSQLSpatial needs the locale to be set to US so the . and , are interpreted correctly
Thread.CurrentThread.CurrentCulture = New CultureInfo("en-US", True)
'Do the things you have to do here..................................
'Reset the CurrentCulture
Thread.CurrentThread.CurrentCulture = originalCulture
The trick is to enhance the geometry construction functions with a temporary change of the culture in use: (Here is an example)
'First, store the CurrentCulture so it can be reset after the routine is done
Dim originalCulture As System.Globalization.CultureInfo
originalCulture = CultureInfo.CurrentCulture
'msSQLSpatial needs the locale to be set to US so the . and , are interpreted correctly
Thread.CurrentThread.CurrentCulture = New CultureInfo("en-US", True)
'Do the things you have to do here..................................
'Reset the CurrentCulture
Thread.CurrentThread.CurrentCulture = originalCulture