Convert Lat/Long Fields to SDE spatial view and keep it up-to-date

3307
7
06-06-2010 10:56 PM
GISAnalyst
New Contributor III
Dear All

I have one Oracle table containing Lat/Long seperate fields, and this table is updated (new inserts) daily, and i need to convert these coordinate daynamically to points. and as far as i want these locations to be shown all the times and up-to-date , i want to create an SDE spatial view (as far as its a view and will reflect the up-to-date state of the records).

My proplem is when using the sdetable -o create_view command , i have to add a shape field in order to convert it to spatial view? in my case the coordinates is exists on two columns (lat/long) and not on shapefield?is there anyway that support the idea i just raised?

I know that i can use the Add even theme or convert xy tools available and schedule them based on time interval, but i need something more dynamic.

I hope someone have solution for that (Unfortunatly i am not a programer and i know that this also can be accomplished using webservice (if someone familiar on creating a service that deal with this scenario i wwill appreciate it)

All the best
0 Kudos
7 Replies
VinceAngelo
Esri Esteemed Contributor
A spatial view requires an existing geometry column; you can't build one on the fly as a
part of view creation.

This task should be fairly easy to accomplish if you're using a modern ArcSDE (one with
ST_GEOMETRY), but if you're not a programmer you're going to need a SQL person to
assist you, since writing the trigger to autopopulate the geometry column can be tricky.

- V
0 Kudos
GISAnalyst
New Contributor III
Dear Vangelo

Thanks for response , do you have any links or similar triggers that i can look at or see.
the layers inside SDE is by default configuerd to use ST_Geometry as Geometry type (as far as it becomes the default geometry storage type (i am using 9.3.1 SDE release))

If you assisst me on writing such a trigger  i will appreciate it , or even if you have any idea about creating a service that do this process.

Thanks a lot in advance
0 Kudos
VinceAngelo
Esri Esteemed Contributor
It looks like the search engine issues are closer to being resolved, since a search from
http://support.esri.com on "st_geometry trigger" turned up this in the first page.  You'll
also need to maintain the objectid appropriately (I recommend a USER-set registered
column, but then it can't participate in advanced geodatabase functionality).

- V
0 Kudos
GISAnalyst
New Contributor III
Dear Vangelo

Creating the trigger is working fine and its filling the information as requierd, the proplem just raised is when creating a spatial view (view contains the shape filed (created in the table), this view is shown as table not as layer within arccatalogu?! plus it appears as not regesiterd with the geodatabase, and when trying to register it a message appears talkes about missing states?!

the purpose at the end is showing these locations dynamically as point layer (without droping the layer everytime and add it again based on the coordinates fields)

could you advise?!

Thanks
0 Kudos
VinceAngelo
Esri Esteemed Contributor
If you placed the geometry in the table with the lat/lon columns, why do you
need a view?

A properly constructed view should be visible to ArcGIS as a simple feature class.
What does 'sdetable -o describe' report on each of the tables and the view, what
does 'sdetable -o describe' report on the the geometry table and view, and what
command did you use to create the view?

ArcGIS does not permit the registration of views. 

- V
0 Kudos
GISAnalyst
New Contributor III
I need the spatial view to allow end users to see this information as a point layer inside the geodatabase dynamically instead of converting  the lat/long values to points each time they need to use this point layer.

The comman i had used is sdetable -o create_view (and i included the shape field i had added to the table).
0 Kudos
VinceAngelo
Esri Esteemed Contributor
No, you don't need a view to accomplish this.  All you need is a geometry column on the
table being updated (which can be accessed directly).  Your previous post indicated you've
already done this.  If you can't access the geometry column directly, it's unlikely that a
view will function as desired.

If you want my help with view construction, you'll need to provide the 'sdetable' output I
requested and the exact 'sdetable -o create_view' command (without password), so I can
understand how you've configured your solution.  The output from 'sdelayer -o describe_long'
on the table with the geometry column and the view is also necessary (sorry for the typo).
I can't recommend changes without understanding what you have done so far.

- V
0 Kudos