On Thu, 18 Mar 2010, Michael Denslow wrote:

Dear r-sig-geo,

I am in a bit of a bind. I am trying to write a shape file using writeOGR() in rgdal. I just realized that I may have too many characters in the cells as they are getting cut off when the shape file is created. The cells are unchanged in the SpatialPointsDataFrame. But when I inspect the .dbf they are all truncated. The cells that are cut off contain literature citations, so some are very long (hundreds of characters). Is there a solution to this problem? This shape file is being imported into Geoserver so I am some what limited as to the formats that I can use.

The OGR driver truncates (I think to 254 characters), so use writeSpatialShape() in maptools instead, passing your large number through the max_nchar= argument. Please read the details in ?write.dbf - field widths above 254 are not portable.

Roger


Any advice?

Thanks in advance,
Michael




--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: roger.biv...@nhh.no

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to