2
votes

I successfully import a polygon shapefile with readOGR, however the information in the .prj file is not being imported.

test class : SpatialPolygonsDataFrame nfeatures : 19407 extent : 35551.4, 1585917, 6318047, 9408727 (xmin, xmax, ymin, ymax) coord. ref. : NA

summary(test) Object of class SpatialPolygonsDataFrame Coordinates: min max x 35551.4 1585917 y 6318047.3 9408727 Is projected: NA proj4string : [NA]

the projection should be utm21n complex zone

1
@SlowLearner: I see no similar post for this user.Benjamin

1 Answers

0
votes

Looks like the issues was the rgdal version.

Edzer: When I replace the .prj file of an arbitrary shapefile with these contents, it gets read well. Have you tried with current R (3.2.4) and rgdal (1.1.7)?
Vinh_Nguyen: Thanks Edzer, upgrading rgdal to 1.1.8 works. Consider this issue close.

http://r-sig-geo.2731867.n2.nabble.com/readOGR-not-reading-in-prj-file-td7589717.html