ogr and gdal sample improvements