I have a work process which uses an ogr2ogr text command to convert a MapInfo TAB file to a KML file. I'm very pleased with this because it maintains the original symbology (a simple 2 colour system used for lines in MapInfo - implemented as a line style when input, not derived directly from the data).
This command also selects for certain categories of line according to some data fields in the original file.
ogr2ogr -f "KML" OutputFileName.kml InputFileName.TAB -sql "select RNumber from InputFileName where ((RType = 1 or RType = 2) and OStatus >= 3)"
Unfortunately the original file is large, and the KML file therefore is large - too large for the application I'm using it in.
I'd like to do something simple and efficient to allow me to divide the KML file up into geographical regions. If possible this should be something simple enough to describe to others too - although that's not a necessity.
I could, of course, work with a process in MapInfo to extract the lines I want first - or I could do the same with QGIS. I've tried both and hit problems - which I'm sure could be overcome - but I'd like to know if I'm missing something more obvious/simple. For instance does ogr2ogr have the capacity to do this?
As background, I've faced an issue with QGIS which is that bringing the TAB file into the application seems to lose the line colour. I could re-create this based on a data field if necessary, but that adds extra steps (I know that I could use various workspaces/projects to simplify things). I'm also not sure how to ensure that QGIS codes line colour into the KML.
I also find the processes of selecting by geographical area in MapInfo frustrating - I'll be able to solve this if necessary I think, but I end up in a tangle of SQL query issues which so far hasn't given me what I need.