PHP GDAL/OGR library usage, which approach is cleaner?

后端 未结 2 987
北恋
北恋 2021-02-10 05:04

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

2条回答
  •  清酒与你
    2021-02-10 05:58

    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()));
    
            }
    

提交回复
热议问题