I'm building simple views against an ArcSDE Oracle RAC 10g. My SHAPE columns are of SDO_GEOMETRY datatype. ArcSDE 9.3.1.
I have several point tables, with the following outline:
ID (Guid)
Name (string)
Shape (SHAPE)
I've built a simple view liek this in Oracle!
CREATE OR REPLACE VIEW VW_POINTS AS
SELECT ID, Name, Shape from TABLE_A
UNION ALL
SELECT ID, Name, Shape from TABLE_B
-- etc
The view in Oracle is created just fine. I've registered this view with the command line:
sdetable -o create_view -T POINTS -t VW_POINTS -c Id, Name, SHAPE etc
The ArcSDE view is created again, just fine. I can use ArcObjects to query it, etc. I need now to create a Layer. I've tried the command line tools, sdelayer -o register, but I had no success. It gives me a message, saying that views are not suported.
I will need to do this several times, sometimes using complex syntax for building the view.
What is the problem? How can visualize these spatial views as SDE layers (I don't need to edit them, just view them spatially inside ArcMap)
Thanks for the input!
EDIT
This is a screenshot in ArcMap, for your deligth 😛
ArcMap Screenshot for your happiness:
As requested, here comes the describe_long
// create_view
C:\Users\H>sdetable -o create_view -s server -i port -u user -p pass -T
view_airspace_points -t vw_airspace_points_oracle -c "*"
at this point I altered the view on oracle, including a cast as numeric(38,0) before registration.
// register layer
C:\Users\H>sdelayer -o register -l view_airspace_points,shape -C OBJECTID,USER –
g RTREE -s server -i port -u user -p pass -e p -P HIGH
ArcSDE 9.3.1 for Oracle10g Build 2784 Tue Oct 27 10:51:14 2009
Layer Administration Utility
Layer Description ….:
Table Owner ……….: SIGMAGIS2
Table Name ………..: VIEW_AIRSPACE_POINTS
Spatial Column …….: SHAPE
Layer Id ………….: 1398
SRID ……………..: 79
Minimum Shape Id …..: 1
Offset ……………:
falsex: -180.000000
falsey: -90.000000
System Units ………: 994200.000000
Z Offset…………..: 0.000000
Z Units …………..: 1.000000
Measure Offset …….:
Measure Units ……..:
XY Cluster Tolerance .: 2.0
Spatial Index ……..:
parameter: SPIDX_RTREE
exist: Yes
array form: -2,0,0
Layer Envelope …….:
minx: -180.00000, miny: -90.00000
maxx: 180.00000, maxy: 90.00000
Entities ………….: p
Layer Type ………..: In-Line Spatial Type
Creation Date ……..: 06/28/11 09:28:45
I/O Mode ………….: NORMAL
Autolocking ……….: Enabled
Precision………….: High
User Privileges ……: SELECT, UPDATE, INSERT, DELETE
Coordinate System ….: GEOGCS["Longitude / Latitude [WGS 84]",DATUM["WGS 84",SPHEROID["WGS 84",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Decimal
Degree",0.0174532925199433]]
Layer Configuration ..: DEFAULTS
Best Answer
What you are looking for is a Spatial-View, now the only major issue you will see here is that you need to be careful with the fields you are joining on. This is a pretty nice process, I use it all over the place where I have generalized my DB to talk with thin spatial data.
This should get you well on your way to what you want. The key is getting your fields to map correct. I tend to just do the view with the minimum I need, then use a UI to edit that view once registered in SDE to do my more fine-grain tweaks.