Friday 20 May 2016

coordinate system - Assigning CRS to Lat/Lon in R giving error: "Geographical CRS given to non-conformant data"


I have a list of suburbs in Queensland, Australia along with their lat/longs.



However, when I try to read in the file in R and assign a CRS, R is giving the following error message:



Error in proj4string<-(*tmp*, value = ) : Geographical CRS given to non-conformant data: 153.53332931



Here are relevant lines of the code,


# Loading suburb list 
qs <- read.csv(file = '../data/Australian_Post_Codes_Lat_Lon.csv',
header = TRUE,
stringsAsFactors = FALSE)


suburb <- qs %>%
filter(state == 'QLD') %>%
select(postcode,
suburb,
lat,
lon)

coordinates(suburb) <- c('lat', 'lon')
# Assigning proper Coordinate Reference System (CRS) to Lat/Long.
proj4string(suburb) <- CRS("+init=epsg:4326")


I am using the csv file provided here




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...