Quantcast
Channel: MsSqlSpatial Work Item Rss Feed
Viewing all articles
Browse latest Browse all 20

CREATED ISSUE: When decimal seperator is no dot, geometry construction crashes

$
0
0
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

Viewing all articles
Browse latest Browse all 20

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>