Skip to main content
Question

Is it possible to convert shapefile to topojson?


Forum|alt.badge.img

Is it possible to convert shape file to topojson? I didn't see this format in options, but perhaps it is possible to customize in a way?

4 replies

danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Evangelist
  • July 17, 2017

Hi @jitkam, is not possible to work with topojson.

Has a link suggested Idea to implement in future Beta version

https://knowledge.safe.com/idea/18867/topojson.html

Thanks,


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • July 18, 2017

There is no easy solution, but you can buildup the topojson using the TopologyBuilder to create the topology, and a JSONTemplater to build up the json as per the specification https://github.com/topojson/topojson-specification/blob/master/README.md.

 

 

The easiest way to get the arc strings is probably to use the geometryExtractor as ESRIJSON and replace the word paths with arcs.

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • July 18, 2017

Alternatively, there is a javascript TopoJSON Server module you may be able to leverage in FME via the JavaScriptCaller. https://github.com/topojson/topojson-server/blob/master/README.md#topology


Forum|alt.badge.img
  • Author
  • July 18, 2017
jdh wrote:

Alternatively, there is a javascript TopoJSON Server module you may be able to leverage in FME via the JavaScriptCaller. https://github.com/topojson/topojson-server/blob/master/README.md#topology

Thank you!

 

 


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