Dear R users,

I am working a lot with spatial objects from the package sp. I need to write my 
own method for converting a SpatialGrid
to a SpatialPoints object, because the default method as("SpatialGrid", 
"SpatialPoints") returns a SpatialPoints object with
decreasing latitudes. If I write my own method (that creates a SpatialPoints 
object with both longitudes and latitudes increasing)
using setAs, will it overwrite the default method provided by the sp packages? 
Will this result in breaking all other methods in sp
that use as()? If the sp methods always call the as() method from sp, this 
should not be the case. But if they happen to call the method I 
am going to define instead of the one they expect, they might get broken. So, 
what is your opinion about this is? Is there a way to safely
define a coerce method with setAs that only the code written by me uses, so  
that no other code coming from packages is broken?
Thank you very much!

Best regards,
Martin

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to