Coordinate System – Appropriate Mesh or Grid for Latitude, Longitude Data

coordinate systemlatitude longitudemesh

I have a set of military clashes in Ukraine coded with latitude, longitude coordinates. So I want to create 2D bins for the data and then count the number of events that fall inside each bin. Later I can create a variogram and krig the surface to figure out the probability of clashes around the country, given knowledge of previous attacks.

My question was really what is the correct mesh or grid to use for this type of data when the spatial range is about 300-400 miles in the east-west direction and a few hundred miles in the north south direction.

If I want to bin the data in latitude and longitude bins, should I impose a square Cartesian grid over a 2d domain and then count the events that fall into each bin or is it better to apply some sort of bins over the WGS84 elliptical surface, and then count events in the elliptical bins?

I can start with a Cartesian grid for now, but just wondering if there is a better idea that I should incorporate after I get things running.

Best Answer

In an ideal world, you would like a retangular grid covering the territory of Ukraine so that each cell has the same area on the ground. The challenge is that Ukraine covers a wide band in latitude, from about 44.25 to 52.25 degrees, and so the length of one degree of longitude (in ground distance) is different in the north and south the country, and so an equal grid of latitude and longitude will not have quite the same ground area in each cell.

I see 3 options:

  1. Use a simple lat-lon equal graticule and accept/deal with unequal areas. The ground length of 1 degree of longitude is proportional to the cosine of the latitude (converting from degrees to radians if your cosine function requires that). cos(44.25 degrees) = 0.716 and cos(52.25)=0.612. So cells in your graticule in the extreme north will have area 0.612/0.716=85% of those in the south. For a given cell, you could do this more precisely by calculating the cosine of its latitude at the midpoint. (The correction factor will be the same for all cells in the same E-W line).

At this point, you can decide to just accept this ~15% imprecision in your statistics. Or you could weigh the number of points in each bin by the appropriate area correction factor in the probabilistic part of your analysis.

  1. Convert the GPS lat-long coordinates to projected coordinates in an equal-area map projection. You will need to use a GIS system to do this, or do your data processing in a platform that uses the proj library (e.g. various packages in R). Really any equal-area projection will do; one easy fallback is EPSG:3035, the EU's recommended Lambert Azimuthal Equal Area projection for statistical analysis. Then use a square grid in the projected coordiates. Each grid square will now have equal area.

  2. Use a different Ukraine-specific coordinate system. I did a brief search, and understand Ukraine has in recent years been adopting its own set of Transverse Mercator-based coordinate bands for topographic mapping, a coordinate system called UCS-2000. Such systems are not equal-area in general, but scale factors and therefore areas are "pretty close" if you follow the band recommendations, which is why they end up being used for topographic maps and military grid systems. If you have access to the data in such coordinates (or it is important for patriotic or other subjective reasons to use a Ukraine-centric coordinate system), you could explore this further.

Editing to add: There is a 4th, an alternative to 1 based on lat-long but with equal area. The trick is to space your latitude grid unevenly, exactly enough to compensate for the scale distortion.

To do this, transform the latitude coordinate to sin(lat). Do your latitude binning in thse transformed coordinates with an even grid there. The split points between bins transformed back to latitude will be slightly uneven exactly enough to compensate for the cos(latitude) scaling factor so that the area on the ground of each bin will now be equal if the bins are small enough. This is a consequence of the fact that in mathematics, the derivative of cos is -sin.