Skip to main content
Solved

JSONTemplater polygon geometry

  • April 3, 2019
  • 2 replies
  • 106 views

Forum|alt.badge.img

I am having trouble understanding how to create polygon geometries using the JSONTemplater.

 

I have a JSONTemplater that takes my features and creates a GeoJSON structure that I am using. Below I outline my 2 templates (root and sub ((image 1 & 2))) where I set up the structure. My issue is when it comes to the geometry of the GeoJSON file.

Currently, since I could not figure out how the XQuery geometry functions worked, I tried to incorporate a geometryExtractor that feeds the geometry as an attribute. The problem with this method is that it reads that as a string value, and I cannot figure out how to read it as a literal object.

 

Root template

Sub template

ouput of geometryExtractor

JsonTemplater output

Best answer by takashi

Try using the fme:get-json-attribute function instead.

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.

2 replies

takashi
Celebrity
  • 7843 replies
  • Best Answer
  • April 3, 2019

Try using the fme:get-json-attribute function instead.


Forum|alt.badge.img
  • Author
  • 7 replies
  • April 4, 2019

Try using the fme:get-json-attribute function instead.

Thank you @takashi ! Never fail, you are here to help.