I have a dataset of LineStrings in a postgis enabled database and would like to automatically split any feature longer than a certain threshold (say 1 mile). I am aware of the Split Feature tool in QGIS but since my dataset contains potentially millions of lines, I need an automatic solution.
Is there a pre-existing function or something that can help me with this? I could write a Python script to go through each feature, and if its length > threshold then split at location X. But I am not sure how to actually split the line and maintain all other attributes
I can use ArcGIS if necessary but would strongly prefer to use open source tools