daily pastebin goal
9%
SHARE
TWEET

Untitled

a guest Jan 20th, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PROJECTION LAMBERT
  2. UNITS METERS
  3. DATUM GDA94 SEVEN /* GDA94 SPHEROID GRS80 PARAMETERS
  4. -28 00 00 /* 1st standard parallel
  5. -36 00 00 /* 2nd standard parallel
  6. 135 00 00 /* Central meridian
  7. -32 00 00 /* Latitude of projections origin
  8. 1000000 /* False easting (meters)
  9. 2000000 /* False northin (meters)
  10. END
  11.    
  12. # Projection for accident coordinates (EPSG:3112)
  13. proj <- "+proj=lcc +lat_1=-28 +lat_2=-36 +lat_0=-32 +lon_0=135 +init=epsg:3112 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
  14.  
  15. # Code spatial points
  16. points <- proj4::project(accidents[, c("ACCLOC_X", "ACCLOC_Y")], proj = proj, inverse = TRUE)
  17. accidents$longitude <- points$x
  18. accidents$latitude <- points$y
  19. names(accidents)[names(accidents) == "longitude"] <- "LONG"
  20. names(accidents)[names(accidents) == "latitude"] <- "LAT
RAW Paste Data
Top