Skip to content

writeOGR error: problem with GDAL (libgdal1- 1.7.0)

1 message · Roger Bivand

#
On Fri, 23 Jul 2010, Henk Sierdsema wrote:

            
There are no "crashes". What it does depends on the GDAL version and the 
OGR driver chosen:
Loading required package: sp
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.7.2, released 2010/04/23
Path to GDAL shared files: /usr/local/share/gdal
Loaded PROJ.4 runtime: Rel. 4.7.1, 23 September 2009
Path to PROJ.4 shared files: (autodetected)
[1] "NAME"       "COUNTRY"    "POPULATION" "CAPITAL"
[1] "NAME"                       "COUNTRY"
[3] "POPULATION"                 "CAPITAL"
[5] "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Warning message:
In writeOGR(cities, tempdir(), "cities", driver = "ESRI Shapefile") :
         Non-fatal GDAL Error 6: Normalized/laundered field name: 
'ABCDEFGHIJKLMNOPQRSTUVWXYZ' to 'ABCDEFGHIJ'
Source: "/tmp/Rtmp2NjEC9", layer: "cities"
Driver: ESRI Shapefile number of rows 606
Feature type: wkbPoint with 2 dimensions
+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
Number of fields: 5
         name type length typeName
1       NAME    4     80   String
2    COUNTRY    4     80   String
3 POPULATION    2     24     Real
4    CAPITAL    4     80   String
5 ABCDEFGHIJ    2     11     Real

This OGR driver does not permit longer names (as the base DBF III 
unwritten spec. does not either, this is not unexpected); however other 
drivers may:
Source: "/tmp/Rtmp2NjEC9/file66334873", layer: "cities"
Driver: GML number of rows 606
Feature type: wkbPoint with 2 dimensions
NA
Number of fields: 5
                         name type length typeName
1                       NAME    4      0   String
2                    COUNTRY    4      0   String
3                 POPULATION    2     33     Real
4                    CAPITAL    4      0   String
5 ABCDEFGHIJKLMNOPQRSTUVWXYZ    0     16  Integer
Source: "/tmp/Rtmp2NjEC9/file19495cff", layer: "cities"
Driver: MapInfo File number of rows 606
Feature type: wkbPoint with 2 dimensions
+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
Number of fields: 5
                         name type length typeName
1                       NAME    4    254   String
2                    COUNTRY    4    254   String
3                 POPULATION    2      0     Real
4                    CAPITAL    4    254   String
5 ABCDEFGHIJKLMNOPQRSTUVWXYZ    0      0  Integer

OK?

Roger