1

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? I work with data that expires after a certain time. So as time elapses records become removed from a view such that at some points in time there will be no data that satisfies the view. When that happens everything goes downhill.

  • is this also versioned (I would gather)? – Brad Nesom Nov 4 '13 at 23:01
  • no versioning involved – VBAHole Nov 5 '13 at 14:52
3

It can't be ArcSDE that's getting "stupid", because ArcSDE isn't involved in your use case.

Similarly, ArcGIS is being told, "Here's a query with rows, parse it for metadata on the fly." Parsing the metadata associated with return columns is a bit of work, but with a bit of delayed initialization, it can be made to work (I'd even deem it a cool feature). Then all rows are removed. Now the late initialization never happens, and an error results.

Your solution is to use ArcSDE. Register the view with ArcSDE, so it can preserve the metadata on the geometry column. This is the only way to "remember" the geometry of a query that may return no rows.

  • I thought we were supposed to be moving away from sde command line? Isn't it going to be gone in a few releases? isn't it a separate extra install now? Also, why can't sde determine the geometry metadata from the spatial table that is the root of my view? – VBAHole Nov 5 '13 at 14:50
  • It's very difficult to engineer a UI for every possible situation. The ArcSDE command line still exists because there are still use cases which only it can address. As stated in the answer, ArcSDE is not involved in your query (yet). Still, there never was any capability of ArcSDE to reverse-engineer query plans from a result set -- The ArcSDE API has always required that the query cursor know exactly which table hosts the geometry column (and that that table was registered with SDE). – Vince Nov 5 '13 at 16:52
  • ArcSDE is directly involved in my query - the base table is registered with ArcSDE, the base table is a feature class. Whatever deficiencies that are present in the current paradigm need to be fixed before the command line is defecated - which is supposed to be very soon. – VBAHole Nov 5 '13 at 20:14
1

Using ArcMap, import the view when it has data in it and create a layer file or map document. The layer should maintain all the metadata about feature type and spatial reference. You should also be able to import an empty view into ArcMap, then manually set the spatial reference and geometry type.

Publishing to ArcGIS Server should use the information in the layer or map document. Can you be a bit more specific on the 'stupid' behavior? I've only seen the behavior that you describe when I try to preview an empty view in ArcCatalog.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.