I have a 6mb KML file I am using with the Leaflet API/Ominvore plugin. It is just a centerline of a long distance trail. What would be the best way to make it smaller? Reduce complexity etc.
You can do this via the command line with OGR:
ogr2ogr -f KML output.kml input.kml -simplify 0.0001
The simplify parameter is in the units of whatever the units are for the input file. For example, if you are working in decimal degrees, 0.0001 degrees works out to around 10 m (depending on where you are on the Earth). The simplification tosses out verticies closer together than the 0.0001 decimal degree (~10 m) threshold.
I used this site: https://labs.easyblog.it/maps/gpx-simplify-optimizer/ Worked well. Zoomed out pretty far so the accuracy wasnt too important.