Sorry ... my mistake ... the rectangle is slightly rotated ... here is the
difference.
Arnaud
2013/6/26 Arnaud Mosnier
> Hi,
>
> Maybe I made an error somewhere, but I can't find where !
> There is differences when I calculated the area of a rectangular polygon
> and the value calculated by the function Polygon.
>
> Sorry for the large precision numbers, but I tested if it was due to a
> rounding error.
>
> Hope you can enlighten me.
>
> Thanks.
>
> Arnaud
>
> ##########################################
>
> Sr1 = Polygon(cbind(c(526253.713768354034983, 526248.093571954057552,
> 526458.286270954064094 , 526463.906467354041524,
> 526253.713768354034983),
> c(5242206.17401464004070,5242528.15709813963622,5242531.82599973957986,
> 5242209.84291623998433, 5242206.17401464004070)))
>
> # Area indicated in Sr1 = 67699.11
>
> Width <- abs(526253.713768354034983 - 526463.906467354041524)
> Length <- abs(5242206.17401464004070 - 5242528.15709813963622)
>
> Width * Length
>
> # Area calculated (rectangular area) = 67678.49
>
>
>
[[alternative HTML version deleted]]