[gdal-dev] Deleting fields OGR

Håvard Wahl Kongsgård haavard.kongsgaard at gmail.com
Sat Jan 1 13:58:35 EST 2011


With ogr2ogr is it also possible to deselect("reverse selecting") fields?


> 2011/1/1 Chaitanya kumar CH <chaitanya.ch at gmail.com>
>
> Håvard,
>>
>> You can create a copy of the dataset while skipping the field. For
>> shapefiles you won't have to mention the .shp file. Opening just the .dbf
>> file will be enough.
>> Similar thing can be done using ogr2ogr by specifying the -select option
>> without the specified field's name. http://www.gdal.org/ogr2ogr.html
>>
>> 2011/1/1 Håvard Wahl Kongsgård <haavard.kongsgaard at gmail.com>
>>
>>>  OK; what it the best alternative method in Python etc. to delete
>>> shapefile fields? Using the shapefile functions in R (via python is one
>>> alternative).
>>>
>>> 2011/1/1 Even Rouault <even.rouault at mines-paris.org>
>>>
>>> Le samedi 01 janvier 2011 19:08:23, Håvard Wahl Kongsgård a écrit :
>>>> > Hi, in gdal/ogr is there a function to delete fields(like
>>>> CreateField())?
>>>>
>>>> Not yet, but this has been discussed in
>>>> http://trac.osgeo.org/gdal/ticket/2671
>>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> gdal-dev mailing list
>>> gdal-dev at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>>
>>
>>
>>
>> --
>> Best regards,
>> Chaitanya kumar CH.
>> /tʃaɪθənjə/ /kʊmɑr/
>> +91-9494447584
>> 17.2416N 80.1426E
>>
>
>
>
> --
> Håvard Wahl Kongsgård
> Peace Research Institute Oslo (PRIO)
>
> http://havard.security-review.net/
>
>


-- 
Håvard Wahl Kongsgård
Peace Research Institute Oslo (PRIO)

http://havard.security-review.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110101/29a40000/attachment.html


More information about the gdal-dev mailing list