Select to view content in your preferred language

How to reserve GEOMETRY in a created View in SDE Database

824
5
Jump to solution
04-12-2012 09:02 PM
AlexChen
Occasional Contributor
Hi all,

I have got one point feature class table and a non-spatial plain table both stored in an ArcSDE 10 database with SQL Server 2008 R2.

They share a common field called GEOMETRY_ID. I created a view joining up the GEOMETRY_ID column on both tables and stored it as V_Location in Views.

However, when I tried to view the created View V_Location in ArcCatalog, it only showed as a plain table but not point features that I was expecting. SHAPE was changed to type of "LONG INTEGER" in stead of "GEOMETRY".

Did I do it wrongly? What is the best practise to make a View reserving Geometry of the features?

Thanks

Cheers,
Alex
0 Kudos
1 Solution

Accepted Solutions
VinceAngelo
Esri Esteemed Contributor
Spatial views involving SDEBINARY storage need to be made with the 'sdetable -o create_view' command.
Spatial views involving native or ST_GEOMETRY storage should be made with SQL, then registered with
ArcSDE through 'sdelayer -o register'.  In either case, the resulting view must contain a NOT NULL, unique,
and reproducible SE_INT32_TYPE integer column for the registered rowid (a one-to-many view must join
the rowid from the many side), or ArcGIS will be unable to function correctly.

- V

View solution in original post

0 Kudos
5 Replies
VinceAngelo
Esri Esteemed Contributor
Spatial views involving SDEBINARY storage need to be made with the 'sdetable -o create_view' command.
Spatial views involving native or ST_GEOMETRY storage should be made with SQL, then registered with
ArcSDE through 'sdelayer -o register'.  In either case, the resulting view must contain a NOT NULL, unique,
and reproducible SE_INT32_TYPE integer column for the registered rowid (a one-to-many view must join
the rowid from the many side), or ArcGIS will be unable to function correctly.

- V
0 Kudos
by Anonymous User
Not applicable
Vince, while I've successfully created a spatial view using sdetable command, i was surprised it appears as a fc without having to apply the sdelayer command.  Are you able to explain?  Is it recognising the geometry field in my sv definition?  I suspect why its displaying as a fc, not registering it using sdelayer is resulting in it not being fully enabled as a fc in the gdb?

Thanks

Brad
0 Kudos
VinceAngelo
Esri Esteemed Contributor
The whole purpose of using 'sdetable -o create_view' to to preserve the layer information
so that an additional 'sdelayer' isn't necessary.  Make no mistake -- ArcSDE doesn't have
any knowledge of "feature classes" or other geodatabase entities, but ArcObjects does,
and it presents the "new" "table" as a simple feature class.  Views cannot be versioned,
and therefore cannot participate in feature datasets.

- V
0 Kudos
by Anonymous User
Not applicable
So the following documentation is wrong then:  http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002q000000r5000000

brad
0 Kudos
VinceAngelo
Esri Esteemed Contributor
Not wrong.  Just simplistic.  I strongly discourage the use of 'sdetable -o create_view' for anything
but creation of spatial views on SDEBINARY storage layers.  The best way to work with native
geometry is in SQL (e.g., CREATE VIEW xxx AS SELECT ...), at which point 'sdelayer -o register' is
used to make the result available to ArcSDE.  The main problem with simplistic examples is that the
complixities of real world data reduce their value -- in this case, trying to work both methods into
one example confuses the issue on when you should use each method.

- V
0 Kudos