0

I would like to plot a map with a Mercator projection with a file .shp in R.

Here my commands,

a=readShapeSpatial("map.shp", CRS("+proj=longlat + +ellps=GRS80"))
map=spTransform(a, CRS=CRS("+proj=merc +ellps=GRS80"))

And I have the error message:

non finite transformation detected:
 [,1] [,2] [,3] [,4]
Error in .spTransform_Polygon(input[[i]], to_args = to_args, from_args = from_args,  : 

  failure in Polygons 8 Polygon 113 points 

In addition: Warning message:

In .spTransform_Polygon(input[[i]], to_args = to_args, from_args = from_args,  :
2 projected point(s) not finite

i would appreciate any help, Thanks

scott_lotus
  • 3,171
  • 22
  • 51
  • 69
  • 1
    Welcome to SO. Where is that shape file? – lukeA Nov 23 '15 at 08:48
  • Please make your example reproducible, probably your coordinates are not correct. Also see this [SO question](http://stackoverflow.com/questions/14880294/non-finite-transformation-detected-in-sptransform-in-rgdal-r-package) and [another one](http://stackoverflow.com/questions/14880294/non-finite-transformation-detected-in-sptransform-in-rgdal-r-package), and [this final link](https://stat.ethz.ch/pipermail/r-sig-geo/2011-November/013443.html) to R-help. I found these by googling for `non finite transformation detected`. – Paul Hiemstra Nov 23 '15 at 08:48

0 Answers0