I will be using gdal/ogr for a new project. I want a lean but fully functional app, so will not be using other implementations such as mapserver, because they have extraneous co
You can use the Symfony Process-Component, avoiding plain exec commands.
It has a great syntax and is very easy to use.
http://symfony.com/doc/current/components/process.html
$process = new Process('ls -lsa');
$process->run();
// executes after the command finishes
if (!$process->isSuccessful()) {
throw new ProcessFailedException($process);
}
echo $process->getOutput();
I wound up using the exec functions, mostly because there was no time to get into swig or php extension development, which were the preferred methods for me, personally. // here is a small sample snippet of it's usage, hopefully it will come in handy for someone else
public function convertToNewFormat($format)
{
return(
exec('ogr2ogr -f '
.$format
.' '.self::setNewFileLocation()
.' '.self::setOldFileLocation()));
}