Lets say I just wanted to turn WKT to GeoJSON on the command line I could do this:
/opt/gdal-custom/bin/ogr2ogr -f CSV /vsistdout/ foo.sqlite \ -dialect sqlite \ -sql "SELECT AsGeoJSON(GeomFromText('POLYGON ((-94.1748 26.90248,-94.1748 27.60567,-93.07617 27.60567,-93.07617 26.90248,-94.1748 26.90248))', 4326)) AS wktIntersection"
However I don't actually need the sqlite file. Is there some sort of null datasource I could use? I tried replacing foo.sqlite with /dev/null and /vsimemory/. Its just a minor annoyance.