Skip to main content
Solved

Creating SDE feature class from SQL view-generated geometry

  • December 2, 2013
  • 1 reply
  • 52 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
View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, 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

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