Bruce,
      If you're on a linux system with perl:

perl -pi -e 's/\t/,/g' filename

is a perl one-liner that should replace all of the tabs with commas in the
file, working on the file in place.  I've used similar commands on text
files up to 379 GB in size, although it does take a while for files that
size.

It does alter the file in place, which can be dangerous.  It's best to test
on a sample of the file :

head filename> testfile  ( take the first 10 lines of the file and write it
to a separate file)
 perl -pi -e 's/\t/,/' testfile

If the testfile works fine, use it on the main file.


Doug


Doug Newcomb
USFWS
Raleigh, NC
919-856-4520 ext. 14 [email protected]
---------------------------------------------------------------------------------------------------------

The opinions I express are my own and are not representative of the
official policy of the U.S.Fish and Wildlife Service or Dept. of the
Interior.   Life is too short for undocumented, proprietary data formats.


                                                                       
             "Clay, Bruce"                                             
             <[email protected]>                                          
             Sent by:                                                   To
             gdal-dev-bounces@         <[email protected]>      
             lists.osgeo.org                                            cc
                                                                       
                                                                   Subject
             11/18/2009 11:09          [gdal-dev] tab delimited to     
             AM                        shapefile                       
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       




Is there any way to use ogr2ogr to convert tab-delimited data such as the
geoname dot org files into shapefiles short of converting all tabs to
commas?

I created a VRT file that works with CSV files but I can not find any way
to convert tab-delimited data.

Bruce





This message and any enclosures are intended only for the addressee.
Please
notify the sender by email if you are not the intended recipient.  If you
are
not the intended recipient, you may not use, copy, disclose, or distribute
this
message or its contents or enclosures to any other person and any such
actions
may be unlawful.  Ball reserves the right to monitor and review all
messages
and enclosures sent to or from this email address.
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

<<inline: graycol.gif>>

<<inline: pic00292.gif>>

<<inline: ecblank.gif>>

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to