Question

Can FME Break a Large KML into many Small Ones?


Hello! I have a very large kml (~100MB) published by Land Information New Zealand with thousands of tracks included in it. What I am looking to do, is to break that up into individual kml or gpx files. Is this something FME can do?


4 replies

Badge +2

Hi,

Theoritically YES but I have not tried

Hi,

Theoritically YES but I have not tried

Any idea how I would go about trying? If anyone wants to try themselves I have the file here (hope I am not breaking any rules):

https://drive.google.com/file/d/0B8qU98tH2w4cblBrVEdhSGNMU3M/view?usp=sharing

Userlevel 1
Badge +12

@ajmburke, how do want the data broken up (based on fields, coordinates, as indivduals)? Haven't looked at the data you have supplied, but are these "tracks and walkways" from LINZ data service (LDS)? If so, its probably easier to hit the LDS WFS service and create the kml straight through that, rather than double handling.

 

Userlevel 1
Badge +12

topo50tokml.fmw

Here is a workbench that reads the LDS layer (tracks from topo50) and creates a KML file for each feature based on its ID (I am sampling it down to 10 for this example). Now, I don't suggest you use ids, as you will have 77,000 files, but this shows you how to "fanout" a dataset.

Not FME related, but LDS allows a few options for getting data, so this just uses a WFS query to get the data rather than requiring manual input to get the data. So all you need to do is pass in an you LINZ data service API code, which you just create by going to "APIs & webservices", under your username within LDS.

Reply