[gdal-dev] GDAL overrite file error

Carlos Piury dgpiury at gmail.com
Fri Feb 6 01:42:04 PST 2015


Hi, I am trying to create a vector format (i.e. ESRI Shapefile) from laser
file (.las), and it works fine, but when I try to overwrite the file I get
the following error:

ERROR 1: Layer 'output' already exists
terminate called after throwing an instance of 'std::runtime_error'
  what():  output layer creation failed
Aborted (core dumped)

I am using the next code to create the layer:

OGRSFDriverH formatTranslateDriver = OGRGetDriverByName(argFormat->sval[0]);

OGRDataSourceH dataset = OGR_Dr_CreateDataSource(formatTranslateDriver,
argOutput->sval[0], 0);

OGRLayerH layer = OGR_DS_CreateLayer(dataset, layerName.c_str(), 0,
wkbPoint25D, 0);

Any idea about this error?

Thanks.

-- 
Carlos I. Piury

Computer engineer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150206/c29ee33e/attachment.html>


More information about the gdal-dev mailing list