[R-sig-Geo] Center of mass of a SpatialPointsDataFrame object - Which projection?

Michael Sumner mdsumner at gmail.com
Mon Jun 11 02:13:59 CEST 2012


These are guides about the broader family of projections that I think are good:

http://www.geo.hunter.cuny.edu/~jochen/gtech201/lectures/lec6concepts/map%20coordinate%20systems/how%20to%20choose%20a%20projection.htm

http://www.georeference.org/doc/guide_to_selecting_map_projections.htm

http://msdn.microsoft.com/en-us/library/cc749633(v=sql.100).aspx



On Mon, Jun 11, 2012 at 9:58 AM, Michael Sumner <mdsumner at gmail.com> wrote:
> Don't use UTM for anything with a longitude extent greater than about 6
> degrees, this is the basis of a UTM zone. I think it's a poor choice in
> general unless you need to work with a local authority using it. Mercator is
> for straight line compass trajectories and the need for that is not as great
> as it once was. UTM reflects a time where that property was very important
> for navigation, then an easy to calculate projection was tipped on its side
> to work for for small local regions in a narrow longitudinal band.  Choose a
> local equal area projection, such Lambert Azimuthal Equal Area "laea", they
> are easy to define with PROJ.4 and easy to transform from/to anyway as long
> as you record the details.
>
> Cheers, Mike
>
>
> On Monday, June 11, 2012, PCB wrote:
>>
>> Yes, in this case I have one set of observations per year, so Time is
>> discreet.
>>
>> I did look at the Spatial Task View, but could not understand all that I
>> read...
>> I am using the gstat package, looks like it has all the features I want,
>> but
>> I still need to find out how to calculate the distances if I am using a
>> lon-lat CRS. Anyway, I will try a go at using UTM, and will get back to
>> the
>> Spatial Task View. I am looking at an area between -5 and -25 Degrees,
>> with
>> a longitudinal extent of about 15 degrees longitude
>> Since we are at this, is gstat the most appropriate package for doing
>> this?
>> or should I be trying one of the others? I am trying to work also with the
>> "raster" package, for doing the cropping, but your mail suggests I could
>> do
>> it using gstat. I will find out how to do it there.
>> Thanks a lot
>>
>> .
>> Barry Rowlingson wrote
>> >
>> > On Thu, Jun 7, 2012 at 2:10 PM, PCB <pedrocontebarros@> wrote:
>> >
>> >> I have a dataset that represents measurements of fish density at a
>> >> number
>> >> of
>> >> sampling locations at sea, in several different occasions (the sampling
>> >> locations are not always the same), stored as a a list of
>> >> SpatialPointsDataFrame objects.
>> >
>> >  So your data is:
>> >
>> >  Lat, Long, Time, Mass
>> >
>> >> I want to calculate the center of mass of each distribution, to
>> >> describe
>> >> whether there is a trend in the overall distribution of the fish.
>> >
>> >  What do you mean by 'each distribution'? Your second sentence makes
>> > me think that Time is discreet, or can be grouped into discreet
>> > 'Occasions'.
>> >
>> >> I have three main questions:
>> >> a) Should I use the original points for calculating the centre of mass,
>> >> or
>> >> should I interpolate them first to a grid? I assume doing it on the
>> >> original
>> >> points will make the result dependent on the location of these points,
>> >> that
>> >> is really not linked to the underlying fish distribution
>> >
>> >  Your data are samples from an underlying distribution of mass, so you
>> > want to do something like Kriging to get an interpolated surface over
>> > a grid.
>> >
>> >> b) Should I reproject the data before calculating the center of mass
>> >> (they
>> >> are in lon-lat). If so, which projection should I use?
>> >
>> >  If the Kriging package you use (and there's about 4 in R - gstat,
>> > geoR, et al - read the Spatial Task View) can work out distances from
>> > lat-long on the sphere (or ellipsoid) then you don't need to. However
>> > computing distances from lat-long can be slower than from x-y
>> > cartesian coords.. so...
>> >
>> >  If your data are over a relatively small area then convert to a
>> > cartesian coordinate system in metres for units and then all the
>> > Kriging packages will work, and they'll compute distances using
>> > Pythagoras.
>> >
>> >  Now, which projection? Depends on the region you have data for. UTM
>> > is a fairly safe bet, unless you're close to the poles, in which case
>> > I think there must be polar projections. Check
>> > www.spatialreference.org and see what turns up.
>> >
>> >
>> >> c) A rectangular grid will include many locations on land, where no
>> >> fish
>> >> could have been recorded anyway. How do I get a grid I can use to
>> >> meaningfully calculate the center of mass?
>> >
>> >  I think most of the Kriging packages can mask the output region by a
>> > polygon, or you can mask raster objects with rasters or clip them to
>> > polygons.
>> >
>> >> Thanks for your time, and any pointers will be highly appreciated.
>> >
>> >  The Spatial Task View is the place to start!
>> >
>> > Barry
>> >
>> > _______________________________________________
>> > R-sig-Geo mailing list
>> > R-sig-Geo@
>> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>> >
>>
>>
>> --
>> View this message in context:
>> http://r-sig-geo.2731867.n2.nabble.com/Center-of-mass-of-a-SpatialPointsDataFrame-object-Which-projection-tp7580128p7580149.html
>> Sent from the R-sig-geo mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>
>
> --
> Michael Sumner
> Hobart, Australia
> e-mail: mdsumner at gmail.com



-- 
Michael Sumner
Hobart, Australia
e-mail: mdsumner at gmail.com



More information about the R-sig-Geo mailing list