[gdal-dev] Creating shape file from csv with double quotes in attribute

Paolo Corti pcorti at gmail.com
Fri Sep 10 13:37:49 EDT 2010


> Hi,
> I have a query on creating shapefile from csv. I am not sure if this is the correct forum for it. Thought I should try it anyway.
> I have a csv file consisting of lat/lon and an attribute with double quotes like this:
>     "<a href="http://data.nodc.noaa.gov/thredds/dodsC/gtspp/atlantic/2010/07/9670278.nc.html" target="_blank">Data URL</a>"
>
> When I create the shape file from this file using a vrt file, the shape file has this value for the attribute:
>   <a href=http://data.nodc.noaa.gov/thredds/dodsC/gtspp/atlantic/2010/07/9670278.nc
>
> As you can see, the double quotes are gone and the attribute is truncated. How do I overcome this problem? Any help is appreciated.
>
>

Because shapefile has a limit of 255 characters for string field.
In your case you may use a service like tinyurl as a workaround
Best regards
Paolo


More information about the gdal-dev mailing list