Please provide a self contained example (at least for the R code) with data
for a simple polygon, and the answers you get.

For example (from ?areaPolygon)

p <- rbind(c(-180,-20), c(-140,55), c(10, 0), c(-140,-60), c(-180,-20))

library(geosphere)
areaPolygon(p)
[1] 2.12582e+14

etc.

Robert

On Thu, Oct 25, 2012 at 9:54 AM, c.gutierrez <c74gutierrez@gmail.com> wrote:

> I am getting two different sets of values when I try to calculate the
> polygon
> area in Matlab vs. R. In Matlab, I used areaint (with the reference
> ellipsoid set to WGS84). In R, I tried both geosphere::areaPolygon on
> lat-lon or splancs::areapl on grid-converted Euclidean coordinates. The R
> results agree with each other, but not with the Matlab calculation. The two
> sets are on average 25% different (Matlab lower). What am I missing?
>
> [This is cross-posted on stackoverflow
>
> http://stackoverflow.com/questions/13038602/areaint-in-matlab-vs-areapolygon-or-areapl-in-r#comment17718262_13038602
> <
> http://stackoverflow.com/questions/13038602/areaint-in-matlab-vs-areapolygon-or-areapl-in-r#comment17718262_13038602
> >
> ]
>
>
>
> --
> View this message in context:
> http://r-sig-geo.2731867.n2.nabble.com/areaint-in-Matlab-vs-areaPolygon-or-areapl-in-R-tp7581399.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]

