[gdal-dev] How clean a shapefile using ogrinfo
Antonio Falciano
afalciano at yahoo.it
Fri Aug 12 08:21:27 PDT 2016
Il 12/08/2016 17:12, Andrea Peri ha scritto:
> Hi,
> I need to clean a shapefile before export in it from a DB table.
>
> The option "-overwrite" of ogr2ogr is not feasible for me because
> AFAIK from the docs
> the overwrite option will
> "delete the shapefile and recreate it".
> Instead I need do not recreate it to maintain the original structure of dbf.
>
> So I try to delete the shapefile using this ogrinfo tools,
> but using this sintax
>
> ogrinfo -al -sql "delete from myshape" myshape.shp
>
> I have an errore and seem is not accepted by ogrinfo.
>
> I'm wrong something in the sintax or ogrinfo do not allow the delete
> of a shapefile ?
Andrea,
if you want to delete the shapefile only:
ogrinfo myshape.shp -sql "DROP TABLE myshape"
should be enough.
ciao
Antonio
--
Antonio Falciano
http://www.linkedin.com/in/antoniofalciano
More information about the gdal-dev
mailing list