Selon Alexandre Gacon <alexandre.gacon+g...@gmail.com>: > Hi, > > We use currently GDAL/OGR C++ API to execute complicated requests on a > postgis database. Apparently, GDAL executes the request also to find the > spatial reference of the result. Is it possible to bypass this behavior and > thus to avoid the execution of our request ?
I suppose you are talking about a layer returned by ExecuteSQL() ? Ok, I see indeed in OGRPGResultLayer::OGRPGResultLayer(...) the request that does the getsrid(). I agree that it might be indeed not desirable. I don't see an obvious way to disable that. Well, perhaps if you remove the getsrid() function from your PostGIS DB, the request might fail at the beginning, but I'm not even sure (and it might have side effect if you depend on it for other uses) Would you mind opening a ticket in GDAL Trac about this ? At the very least, the current code could be moved to an implementation of GetSpatialRef(), so it is not triggered systematically. > > -- > Alexandre Gacon > _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev