I think you can also use the SEPARATOR layer creation option, per
http://www.gdal.org/ogr/drv_csv.html? 

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> [email protected]
> Sent: Wednesday, 18 November 2009 13:41
> To: Clay, Bruce
> Cc: [email protected]; [email protected]
> Subject: Re: [gdal-dev] tab delimited to shapefile
> 
> 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.
> Inactive hide details for "Clay, Bruce" 
> <[email protected]>"Clay, Bruce" <[email protected]>
> 
> 
> 
> 
>                               "Clay, Bruce" <[email protected]> 
>                               Sent by: 
> [email protected] 
> 
>                               11/18/2009 11:09 AM
> 
> 
> 
> To
> 
> <[email protected]>    
> 
> 
> cc
> 
>       
> 
> 
> Subject
> 
> [gdal-dev] tab delimited to 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 
> 
> 
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to