Select to view content in your preferred language

Using SQL Server 2008 spatial data types and ZM polylines

575
1
04-05-2010 07:12 AM
deleted-user-GQE1M5NT-OOh
Deactivated User
I am attempting to use SQL to create features in my featureclasses. I have been very successful with 2D points and polylines and can insert features at will via SQL. However, with 3D points and lines, its proving more challenging. Something like so:

use GeometryTesting
go
insert into ZMPOINTS (OBJECTID, SHAPE)
values (1, geometry::STGeomFromText
  ('POINT(1703722.03 12853873.58 1175.94 1176)', 8))


...isn't liked by SDE. The record goes in:

SELECT TOP 1000 [OBJECTID]
      ,[SHAPE].AsTextZM() as c
  FROM [GeometryTesting].[dbo].[ZMPOINTS]


OBJECTID c
1         POINT (1703722.03 12853873.58 1175.94 1176)


And as far as the SQL Server geometry type and the base table is concerned, there are Z and M values for the point. When I add the FC to ArcMap, the features do not show up, BUT I can select the feature and zoom to it. Unselect it, and nothing is there. Also, I can export the FC to a shp and the features then show up just fine. It's almost like the FC is just busted.

Like I said, with 2D points and polylines, this all works great, there is something going on with the 3D and m-value FCs though. Has anyone had any experience working with ZM points/polylines with the SQL Server geometry datatype and ArcGIS/SDE?

Any thoughts greatly appreciated. Thanks.

chad
0 Kudos
1 Reply
deleted-user-GQE1M5NT-OOh
Deactivated User
OK, to answer my own question...someone in another email forum suggested I rebuild my spatial reference, which ultimately fixed my issue. Rebuild using Toolbox tools, NOT a rebuild all in SQL Server.
0 Kudos