Jun 10, 2007 at 2:30 PM
Hi all, I am new to sql spatial so I need some help. I downloaded the sqlspatial zip file and deployed the library using the msscmd.
I opened the sql server management studio and created a new table. Am I supposed to see new data types ?? Because I did not see any .. Did I something wrong ? Please help .

Jun 17, 2007 at 11:14 PM
Don't expect to see new data types. MsSqlSpatial uses varbinary fields and special functions to deal with them.

To add geometry columns there is a stored procedure:
EXECUTE ST.AddGeometryColumn <schema_name>, <table_name>, <column_name>, <srid>, <type>
Where <srid> is a value registered in ST.SPATIAL_REF_SYS table or -1 (none), and <type> is either POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, GEOMETRYCOLLECTION or GEOMETRY (the latter allows any geometry type).

For example:
EXECUTE ST.AddGeometryColumn 'dbo', 'polygons', 'the_polygon', -1, 'POLYGON'
To properly drop the column:
EXECUTE ST.DropGeometryColumn 'dbo', 'polygons', 'the_polygon'

Best regards,
Ricardo Stuven.
Jun 20, 2007 at 8:27 AM
Thank you very much for your reply !

In my opinion there should me a better documentation.

Jun 20, 2007 at 6:01 PM
I agree, I'm trying to improve that. Check out the new Tutorials page.

Best regards,
Ricardo Stuven.