I've been digging further into our "SpatialWare vs. MS/SQL SP4" problem, and
the breakthru came after I issued the following
command:
exec sp_spatial_query 'select HG_AsText(sw_geometry) from myTable'
It reported something along these lines: GEOMETRYCOLLECTION(POINT(719085 6))
The second parameter's supposed to be a UTM Northing value, between 6000000 and
6500000 in Denmark, but it's a factor 1**6 too low.
I then issued this command that mimics the expression I've been using to
spatialize:
select 'ST_POINT(' + CAST(Easting as varchar) + ' , ' + CAST(Northing as
varchar) + ')' from myTable
and right enough, it returns something like this: ST_POINT(719085 ,
6.17943e+006)
The value 6 (siz) returned by HG_AsText matches the second value perfectly -
provided one ignores the "e+006" bit.
I'm wondering whether SpatialWare under MS/SQL SP4 fails to read this part,
rendering the spatializing useless ?
MS/SQL unfortunately seems hard-wired to treat any number beyond 1,000,000 as a
scientific number that needs to be exponentialized,
and apparently so even before SP4. However, why things break now after
installing SP4 is still a mystery to me.
Maybe one of the MapInfo techies will comment on this ? I've cc'ed this mail to
support in case they've failed to reopen the list
after the holidays ;-X
As we're not really interested in submetres, I substituted my creator
expression with the one below, and now it seems to work, but a
proper solution would be very nice, especially since not all are able to or
willing/interested in discarding submeter decimals.
'ST_POINT(' + CAST(CAST(Easting as int) as varchar) + ' , ' +
CAST(CAST(Northing as int) as varchar) + ')'
Best regards/Med venlig hilsen
Lars V. Nielsen
GisPro, Denmark
http://www.gispro.dk/
----- Original Message -----
From: "Lars V. Nielsen (Hvenegaard)" <[EMAIL PROTECTED]>
To: "Ole Gregor" <[EMAIL PROTECTED]>
Cc: "MapInfo-L" <[email protected]>
Sent: Friday, August 05, 2005 11:17 AM
Subject: Re: MI-L Spatialware and SQL server 2000 SP4
Hi Ole,
We've just installed SP4, and there is a serious problem we're trying to
address. We're finding that the below statement that has worked up until SP4
now renders point at 0,0:
UPDATE myTable SET sw_geometry = ' ST_Point('+CAST(Easting as
varchar(25))+','+CAST(Northing as varchar(25))+')'
I've verified that the insert + update trigger is defined on myTable, and
has verified that the sw_geometry values are not null. They're supposedly
valid point object, that render fine but with an invalid placement.
I've extracted the trigger content. It must be somewhere in the shown loop
that the error occur, but I can't determine whether it's the
master..xp_table_trigger (SpW extended sp) or in the UPDATE that errs:
-----
FETCH NEXT FROM spatialtable_iu_cur INTO @spatialtable_iu_key
WHILE (@@FETCH_STATUS = 0)
BEGIN
EXEC master..xp_table_trigger '[MYDB].[dbo].[myTable]', '[sw_member]',
'[sw_geometry]', '[MYDB].[dbo].[myTable#25t19]', @spatialtable_iu_key
UPDATE [MYDB].[dbo].[myTable] SET [sw_geometry] = a.spatialvalue FROM
[MYDB].[dbo].[myTable#25t19] AS a
WHERE [MYDB].[dbo].[myTable].[sw_member] = @spatialtable_iu_key
AND a.keyvalue = @spatialtable_iu_key
DELETE FROM [MYDB].[dbo].[myTable#25t19] WHERE keyvalue =
@spatialtable_iu_key
FETCH NEXT FROM spatialtable_iu_cur INTO @spatialtable_iu_key
END
------
I was prompted to backup the master and msdb databases after the SP4
install, so it may be the changes in the master database that's causing the
problem.
We're running SpW 4.5, but as I remember you're running 4.8, so it doesn't
look like a version dependent problem in SpW.
I would recommend to not install SP4 before this problem has been solved.
Best regards / Med venlig hilsen
Lars V. Nielsen
--------------------------------------------------------
Hvenegaard A/S
Rugaardsvej 55, DK-5000 Odense C
Denmark
http://www.hvenegaard.dk
----- Original Message -----
From: "Ole Gregor" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, August 05, 2005 10:14 AM
Subject: MI-L Spatialware and SQL server 2000 SP4
Hi
I'm running Spatialware on SQL server 2000 on a Win2000 server.
A present with SP3a and we are planning to apply the new SQL server SP4,
but there has been rumors about problems with this new service pack in
combination with Spatialware
Is there any known problems ?
Ole Gregor,
Udviklingskonsulent i Miljø og Teknik
Viborg Amt
(45) 87 27 13 07
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 17392
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 17487