sorting/removing duplicates in GDAL/OGR formats