[R-sig-Geo] Re-scale coordinates in SpatialPolygonsDataFrame

Roger Bivand Roger.Bivand at nhh.no
Mon Oct 31 17:34:51 CET 2011


On Mon, 31 Oct 2011, tsippel wrote:

> I'm resubmitting this question I sent last week. Not sure if it fell
> between the cracks...but I'd be grateful for suggestions.

Did you look at:

library(sp)
?"recenter-methods"

Roger

>
> On Fri, Oct 28, 2011 at 11:39 AM, tsippel <tsippel at gmail.com> wrote:
>
>> Hi-
>> I'm a bit confused on how to rescale the range of longitudes to 0:360 in
>> an object of class SpatialPolygonsDataFrame created from a shapefile
>> originally scaled from -180:180.
>>
>>> library(maptools)
>>> world.eez<-readShapePoly(fn="C:/.../World_EEZ_v6_1_20110512")
>>> class(world.eez)
>> [1] "SpatialPolygonsDataFrame"
>> attr(,"package")
>> [1] "sp"
>>> bbox(world.eez)
>>          min       max
>> x -180.00000 180.00000
>> y  -78.57036  87.02394
>>
>> All of the data I am plotting on a world map are scaled 0:360 in
>> longitude, and I want to add the world Exclusive Economic Zones (EEZ) to
>> the map. Advice on rescaling the longitudes in my SpatialPolygonsDataFrame
>> to 0:360 would be appreciated!  The complexity of sp classes have me
>> scratching my head at the moment.
>>
>> Thanks,
>>
>> Tim
>>
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Department of Economics, NHH Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list