AutoCAD Map 3D General

Reply
Contributor
Barry_Wheeler
Posts: 21
Registered: ‎05-02-2011
Message 1 of 14 (327 Views)

SQL Server Spatial - Geometry Types

327 Views, 13 Replies
11-06-2013 06:42 AM

We are testing a SQL Server Spatial Connection that has been built to replace a SDE Connection.

After I log in with the proper credentials I see all of the features available. When I select a feature to bring in and 'Add To Map' it comes in with 3 datatypes visible in the Task Pane, point. line and polygon. If I try to style one (if the data type is really a line for instance) I only get a preview for the line and point but the style dialogue area has a polygon styling option (by default?). The same holds true for a point data type. If I bring in a polygon, it still shows all three data types but I am able to style the polygon.

I looked at the schema and it lists all three data types as available.

We have ESRI users on the same test database and they do not have this problem. A point comes in only as a point, a line comes in only as a line, and a polygon comes in only as a polygon.

 

Anyone else encounter this and have a fix? It's almost if the data source needs to be defined at the server level.

 

See the attachments for visual illustration.

*Expert Elite*
Murph
Posts: 1,930
Registered: ‎11-13-2006
Message 2 of 14 (289 Views)

Re: SQL Server Spatial - Geometry Types

11-06-2013 03:24 PM in reply to: Barry_Wheeler

Unlike an ESRI shp file the SDF format allows mulitpe types in one file by default that's why tou have the pline,point and polygon types listed. You can create a new SDF schmea for each type and set the geometry as you need then do a bulk copy from the orginal if all you want to see is the one type.

Murph
Supportting the troops daily.
Contributor
AlbertKalman5692
Posts: 23
Registered: ‎03-18-2009
Message 3 of 14 (279 Views)

Re: SQL Server Spatial - Geometry Types

11-06-2013 11:35 PM in reply to: Barry_Wheeler

The MS SQL geom can store point,line,polygon type of geometry. As ESRI as Autodesk to limit use only one type of geometry, therefore is need to create the schema in those software. I think in ESRI have some where a schema definition structure and when was create the database the geom type was declared. But because if proprietary to ESRI the Map provider can't read this schema structure (I think).

 

Also, if you choose to create your own schema in Map for MS SQL you can have option to declare type of feature class but in this case Map will create some additional table F_*** in MS SQL.

 

Personally I not use because in practically is not useful. If after some time you want to create a query this not be available without some hacking in database (you need to insert some records  in F_*** table ) but is not very easy.

My opinion (I have a very huge practical experience), if you deselect  "Show in layer list" those type of feature that you are not interest everything will be ok.

 

The user must be carefully when he want to create new feature, unfortunately  he can create all tree type (six) off feature therefore to prevent this we choose to create trigger in database to not permit insert wrong type of feature.

 

The big advantage of this type using MS SQL is the we can create(edit) any time query (view) and this became available.

 

 

 

 

 

Albert Kalman

 

 

 

 

Contributor
maherich
Posts: 25
Registered: ‎09-10-2004
Message 4 of 14 (269 Views)

Re: SQL Server Spatial - Geometry Types

11-07-2013 04:02 AM in reply to: Barry_Wheeler

hi I am not sure if I got you right. But you want to style your layers that are loaded as multigeometry into Map. What you get in style dialog is always polygon styling. If that's the problem, then simply scroll down in the styling dialog. You will find the point and line options there.

Martin

Contributor
Barry_Wheeler
Posts: 21
Registered: ‎05-02-2011
Message 5 of 14 (247 Views)

Re: SQL Server Spatial - Geometry Types

11-07-2013 12:07 PM in reply to: maherich

Thank you for that. I didn't notice it since when we were running our SDE we never had to do that.

That is a temporary solution but I still don't know why all three types are showing up when our ESRI users get the proper type from the same database.

Contributor
Barry_Wheeler
Posts: 21
Registered: ‎05-02-2011
Message 6 of 14 (244 Views)

Re: SQL Server Spatial - Geometry Types

11-07-2013 12:14 PM in reply to: AlbertKalman5692

Thank you Albert and Murph.

This might be a solution but it is one that would have a lot of administration and essentially duplicates a database that has a lot of different datasets. These same datasets get updated either quarterly, semi-annually or annually which means a bulk copy each and every time.

The item I find most curious is why this happens on SQL Server Spatial and not on the SDE we previously had access (until release 2013 came out).

I reiterate that our ESRI usrs do not have to deal with superfluous data types showing up. Why can't either the database (schemas on the server?) or Autodesk make the default data types show as they should.

*Expert Elite*
Murph
Posts: 1,930
Registered: ‎11-13-2006
Message 7 of 14 (239 Views)

Re: SQL Server Spatial - Geometry Types

11-07-2013 03:30 PM in reply to: Barry_Wheeler

Your ESRI users are using an stystem that can only hold one geo type in their database file/table. Where as AutoCAD SDF can hold all three types of geomerty. As to why, think if you're a civil designer using civil3d to design a storm water system, theres pipes, hmanholes and holding pools.  To export to ESRI shp format that's 3 types with at least 3 files each or 9 files not counting the .prj files. With Autodesk's SDF you get the same data/info with just one file. If you need to share that data with others would you want to send one file or 12 files.

Murph
Supportting the troops daily.
*Expert Elite*
Murph
Posts: 1,930
Registered: ‎11-13-2006
Message 8 of 14 (237 Views)

Re: SQL Server Spatial - Geometry Types

11-07-2013 03:32 PM in reply to: Barry_Wheeler

barry_wheeler wrote:

. Why can't either the database (schemas on the server?) or Autodesk make the default data types show as they should.



It can if the user knows how to export/create the data.

Murph
Supportting the troops daily.
Contributor
AlbertKalman5692
Posts: 23
Registered: ‎03-18-2009
Message 9 of 14 (218 Views)

Re: SQL Server Spatial - Geometry Types

11-08-2013 11:41 AM in reply to: Barry_Wheeler

In Map and MS SQL is possible to manage all data as SDE

 

1. Create a data store step1 using FDO enabled schema

2. Create feature class as you need with proper geom type (point)

3. Create feature class as you need with proper geom type (line)

 

 

Contributor
AlbertKalman5692
Posts: 23
Registered: ‎03-18-2009
Message 10 of 14 (211 Views)

Re: SQL Server Spatial - Geometry Types

11-08-2013 11:54 AM in reply to: Barry_Wheeler

4.  In MapSpace I can get only one type of feature class

5. In the MS SQL I have more F_* tables

6. In such a table the geometry type is manege by provider if this type exist.

 

I'm very sure also SDE have the same structure the problem is when we connect to MS SQL the Map provider recognize only Autodesk structure schema therefore we see all tree type geometry the SDE structure.

 

If you choose to use MS SQL Server  in the same way as SDE I think is need to rebuild the database structure for Map provider,  but I did not understand well what you want to do "bulk copy each and every time".  There are some others options or tricks but is important to know what we want or the work flow.

 

 

 

Albert Kalman

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community