Here is the issue I am seeing. I can create a spatial view and it renders fine in catalog and ags. But if i modify the sql OR if a situation arises that makes my view devoid of records then all of the sudden sde and ags get really 'stupid' and have no clue what my geometry type or coord sys are for that view.Am i to believe that a spatial view MUST always have at least one record in it?
Is it too much to ask for the metadata to be gathered from the only spatial column present in the base table?
The answer we are getting now is to use the command line tool to create the views and make sure they are registered with sde. Apparently with the new style views the geometry metadata is gathered on the fly from the first record in the table. That makes sense to me. But what about when there are no records? Seems like a better system would have been to get the metadata from the only spatial column in the view - the one in the base table - which is a feature class. A feature class can be empty and sde/ags still knows it is a feature class.
One could argue that the collection of metadata on the (potential) first record in a view as opposed to the true metadata in the (singleton) spatial column of the base table that was the progenitor of said view is synonymous with proprietary software manufacturer laziness.
In your particular use, registration of the existing view is necessary (it is not possible for a query cursor to mine the database query plan to extract the information you expect it to have), but that only requires 'sdelayer -o register', not recreation of the existing views (be sure to use 'sdelayer-o describe_long' to extract the SRID of the base table for the -R flag in the register options).
Hopefully, there will be a ArcPy tool that will register views with geodatabase metadata once that which was once ArcSDE is gone.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.