Skip to main content
Solved

Creating SDE feature class from SQL view-generated geometry

  • December 2, 2013
  • 1 reply
  • 69 views

Forum|alt.badge.img
All,

 

 

I've got a sql view that  joins SQL 2 tables together, one of which contains geometry for address points.

 

 

I want to take that view and write it to an SDE feature class using FME.

 

 

The problem is, when I choose SQL Server Spatial as the reader format, the shape (geometry) column isn't recognized.

 

 

When I chose SQL Server Non-Spatial, the shape column is recognized, but the output SDE feature class doesn't have a recognized spatial reference, and the points don't display at all on the map (ArcMap).

 

 

Is there any advice for trying to accomplish this?

 

 

Using SQL for geometry joins, spatial functions, etc. is what we're planning on doing for generating data for SDE feature classes...

 

 

Many thanks!

 

 

-m

Best answer by david_r

Hi,

 

 

An alternative is to cast the geometry column to WKB using STAsBinary (or, in a pinch, WKT using STAsText) in the view definition and pass it on to FME in a BLOB.

 

 

You can then use the GeometryReplacer on the BLOB value to re-create the geometry inside the workspace.

 

 

David
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

david_r
Celebrity
  • Best Answer
  • December 4, 2013
Hi,

 

 

An alternative is to cast the geometry column to WKB using STAsBinary (or, in a pinch, WKT using STAsText) in the view definition and pass it on to FME in a BLOB.

 

 

You can then use the GeometryReplacer on the BLOB value to re-create the geometry inside the workspace.

 

 

David