[R-sig-Geo] Changing projection

Jonathan Callahan jonathan at mazamascience.com
Sat Jul 11 19:16:39 CEST 2015


The MazamaSpatialUtils package has a number of scripts that convert
shapefiles into SpatialPolygonsDataFrames. It also contains a
convertLayer() function that does precisely what you are describing with
the following lines:

  # Load the shapefiles
  data_projected <- rgdal::readOGR(dsn=dsn, layer=layerName,
stringsAsFactors=FALSE)

  # Reproject to standard projection
  SPDF <- sp::spTransform(data_projected, sp::CRS("+proj=longlat
+ellps=GRS80 +datum=NAD83 +no_defs"))

Alternatively, you could use the package's convertGADM() function to
automatically create a shape file of Austria in the package "standard
projection" with:

convertGADM(countryCode='AT', admLevel=1)
loadSpatialData('GADM_AT_1')

Or, if you want Austrian provinces:

convertGADM(countryCode='AT', admLevel=2)
loadSpatialData('GADM_AT_2')


Viel Glück mit Österreichischer Kartenherstellung!

Jon

On Sat, Jul 11, 2015 at 5:19 AM, Erich Subscriptions <
erich.subs at neuwirth.priv.at> wrote:

> I forgot:
> I was told the projection is
> MGI Austria Lambert.
>
>
> > On Jul 11, 2015, at 13:53, Erich Subscriptions <
> erich.subs at neuwirth.priv.at> wrote:
> >
> >
> > I got hold of a map of Austria as shp file.
> > The projection is
> > MGI Austria Lambert.
> > I need to convert this to standard lon/lat.
> > What is the easiest way to do this within R?
> >
> > _______________________________________________
> > R-sig-Geo mailing list
> > R-sig-Geo at r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



-- 
Jonathan Callahan, PhD
Mazama Science
206-708-5028
mazamascience.com

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list