Skip to main content
Question

SDE reader - don't read geometry


setld_solutions
Contributor
Forum|alt.badge.img+7

Is there a way to tell an SDE reader to forget the spatial?

I can read as SQL Server Non Spatial, but I lose the SDE ST.Area attribute, which I need.

However, I don't need the actual geometry and reading it wastes 30 minutes.

---- Hoping for an "opposite of Geometry Only".

Thanks,

Jake

3 replies

richardatsafe
Safer
Forum|alt.badge.img+10

Hi @setld_solutions,

I think the easiest route is to try using the sqlExecutor to select just the columns you need.

https://knowledge.safe.com/articles/19638/using-the-sqlexecutor-or-sqlcreator-to-issue-comma.html


david_r
Evangelist
  • November 7, 2017

I agree with Richard, you could either use the SQLExecutor or the SQLCreator with the SQL Server non spatial reader. 

If your geometries are stored as sde.st_geometry objects, you can do something like:

SELECT 
  ATTRIBUTE_A, 
  ATTRIBUTE_B, 
  SDE.ST_LENGTH(SHAPE) AS SHAPE_LENGTH
FROM MY_SCHEMA.MY_TABLE

Or if they're stored as SQL Server Spatial geometry objects, it will probably look more like:

SELECT 
  ATTRIBUTE_A, 
  ATTRIBUTE_B, 
  SHAPE.ST_LENGTH() AS SHAPE_LENGTH
FROM MY_SCHEMA.MY_TABLE

setld_solutions
Contributor
Forum|alt.badge.img+7

Thanks guys. I use a lot of SQL Executor - tried it, but could only pull SHAPE. I've tried all syntax variants to pull what shows up as [SHAPE.STArea()] in ArcCatalog, without success. SSMS doesn't show this column (sub of SHAPE). I had hoped that since there is a "Geometry Only" setting, there'd be a "Table Only" setting for an SDE reader. Appreciate your input, but I think I'll go knock something else out now.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings