-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in proj4string ... Geographical CRS given to non-conformant data #1
Comments
Hello! Thank you very much for posting this issue! I'm having the same problem, but unfortunately I'm not having the same results as you. I'm having the same error:
After applying your solution:
Any ideas what can this be? |
Hi. It is quite a while since I last looked at this, so my memory of the details is really vague. Have you tried looking at the actual values in the coordinates of Other than that, I don't think I have much advice I can offer. Hope that helps you track the problem down. Good luck Geoff |
Hi Geoff, Thank you very much for your reply! I understand that it has been a while, so don't worry. In the end, I had some problems with the polygons of Cheers and thanks, Vanessa |
Hi Vanessa,
Glad you managed to get it running. Cartograms are pretty neat when you get them working J
Cheers
Geoff
From: Vanessa Pena [mailto:[email protected]]
Sent: 30 March, 2017 11:18 AM
To: chrisbrunsdon/getcartr
Cc: Geoff99; Author
Subject: Re: [chrisbrunsdon/getcartr] Error in proj4string ... Geographical CRS given to non-conformant data (#1)
Hi Geoff,
Thank you very much for your reply! I understand that it has been a while, so don't worry. In the end, I had some problems with the polygons of cont so after I made it a valid SpatialPolygonsDataFrame, quick.carto worked :)
Cheers and thanks,
Vanessa
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#1 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AH9DBt1bSgrkm3S5wNQuFc99GbMSGKwhks5rqvSggaJpZM4FjJn1> . <https://github.com/notifications/beacon/AH9DBt64Y9prmC_J9aoNPZZP6Lt2NGS8ks5rqvSggaJpZM4FjJn1.gif>
|
Hi there
First --- thanks for a really neat package.
I encountered a problem while running a variant of an example from http://vietletruc.com/tag/cartogram/. (on a Windows machine)
quick.carto
fails with the following message.If I look at the
world
object which is a SpatialPolygonsDataFrame I find that it uses (as I expected) a longlat projection. And both the latitude and longitude values are all "legal".However if I overwrite the proj4string, and then try
quick.carto
again, everything is fine.I suspect (but have no evidence) that somewhere in the internals of
quick.carto
a new expanded copy of the SpatialPolygonsDataFrame is made including the surrounding "sea" as described in the Gastner Newman paper. And that the copy simply uses the same proj4string / CRS as the map being morphed. And that when the longlat values are expanded, they exceed the legal values for longitudes and latitudes. Or perhaps simply that at some stage during the morphing process the (warped) long lat values for the cartogram exceed the legal values for longitude and latitude. Hence this error message, which I think comes from a validity check during the creation of a (copy of) SpatialPolygonsDataFrame, when the CRS is longlat .If I am correct, wiping out the proj4string / CRS in the way I have above is actually the correct thing to do I think --- since after morphing it would be fair to say that the coordinate reference system of the warped map is no longer any type of longitude latitude projection (nor indeed any other projection likely to be known to standard geography and supported in the CRS / proj4 universe).
Not sure what to do, but maybe this issue will help others who may experience a similar problem.
Once again, really like the package, thanks.
Geoff
The text was updated successfully, but these errors were encountered: