Maybe (and probably) this is stupid question, but I am totaly new to FME and geometry conversion.

I need to transform WKB field from SQLServer to GML geometry using FME software.

How can I do this?

  • is WKB as WKB in SQL or as geometry, if geometry just add sql spatial reader and it just works. Or if it is as WKB use STGeomFromWKB (assuming 2008 r2+ version of ms sql) to convert it to geometry and use normal sql spatial reader Jul 3, 2014 at 12:58
  • @simplexio varbinary SQLServer field needs to be transformed to gml geometry. I'll try as you said.
    – Aleksandar
    Jul 3, 2014 at 13:02

1 Answer 1


MS SQL server Create new table or add new column. Use STGeomFromWKB to convert WKB to Geometry , then in FME do following.

Add "MS SQL spatial reader" , point it to correct table ( You can do this with SQLExecute too , that eliminates need for table containing geometry type and you can just use something like SELECT STGeomFRomWKB(wkb) as geom , id from xxx ... ) and continue to use FME

  • When fne read new table, the geometry field is gone. It doesnt see it.
    – Aleksandar
    Jul 3, 2014 at 13:22
  • Done, it was my mistake. It doesnt write it in gml I want, but it works somehow. Thanks! P.S. I wanna vote up, but Im short with reps :-/
    – Aleksandar
    Jul 3, 2014 at 13:51
  • now you need to select GML writer in FME and write data to there. Jul 4, 2014 at 6:30
  • I know that part, but my problem was that I didnt know that he transforms GEOMETRY field autimaticaly. Tnx
    – Aleksandar
    Jul 4, 2014 at 6:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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