You can use proj.4 java bindings like GeoAPI and Proj4j. If you are familar with threads, process programming and piped streaming you can use a direct OS call whith your common proj.4 params.
Proj4j looks like this and have a look in Martin Davis unit test repository :
package org.osgeo.proj4j;
import junit.textui.TestRunner;
/**
* Tests from the PROJ4 testvarious file.
*
* @author Martin Davis
*
*/
public class Proj4VariousTest extends BaseCoordinateTransformTest
{
public static void main(String args[]) {
TestRunner.run(Proj4VariousTest.class);
}
public Proj4VariousTest(String name) { super(name); }
public void testRawEllipse()
{
checkTransform(
"+proj=latlong +ellps=clrk66", p("79d58'00.000W 37d02'00.000N"),
"+proj=latlong +ellps=bessel", p("79d58'W 37d2'N"), 0.01 );
checkTransform(
"+proj=latlong +ellps=clrk66", p("79d58'00.000\"W 36d58'00.000\"N"),
"+proj=latlong +ellps=bessel", p("79d58'W 36d58'N"), 0.01 );
}
public void testNAD27toRawEllipse()
{
checkTransform(
"+proj=latlong +datum=NAD27", p("79d00'00.000\"W 35d00'00.000\"N"),
"+proj=latlong +ellps=bessel", p("79dW 35dN"), 0.01 );
}
public void test3ParamApproxSameEllipsoid()
{
checkTransform(
"+proj=latlong +ellps=bessel +towgs84=5,0,0", p("0d00'00.000W 0d00'00.000N"),
"+proj=latlong +ellps=bessel +towgs84=1,0,0", p("0dE 0dN 4.000"), 1e-5 );
checkTransform(
"+proj=latlong +ellps=bessel +towgs84=5,0,0", p("79d00'00.000W 45d00'00.000N 0.0"),
"+proj=latlong +ellps=bessel +towgs84=1,0,0", p("78d59'59.821W 44d59'59.983N 0.540"), 1e-5 );
}
public void test3ParamToRawSameEllipsoid()
{
checkTransform(
"+proj=latlong +ellps=bessel +towgs84=5,0,0", p("0d00'00.000W 0d00'00.000N"),
"+proj=latlong +ellps=bessel", p("0dE 0dN 4.000"), 1e-5 );
}
public void FAIL_test3ParamToRawSameEllipsoid2()
{
// fails - not sure why, possibly missing towgs not handled in same way as PROJ4?
checkTransform(
"+proj=latlong +ellps=bessel +towgs84=5,0,0", p("79d00'00.000W 45d00'00.000N 0.0"),
"+proj=latlong +ellps=bessel", p("79dW 45dN 0.000"), 1e-5 );
}
public void testStere()
{
checkTransform(
"+proj=latlong +datum=WGS84", p("105 40"),
"+proj=stere +lat_0=90 +lon_0=0 +lat_ts=70 +datum=WGS84", p("5577808.93 1494569.40 0.00"), 1e-2 );
}
public void testStereWithout_lat_ts()
{
checkTransform(
"+proj=latlong +datum=WGS84", p("20 45"),
"+proj=stere +lat_0=40 +lon_0=10 +datum=WGS84", p("789468.08 602385.33 0.00"), 1e-2 );
}
public void testSTS()
{
checkTransform(
"+proj=latlong +datum=WGS84", p("4.897000 52.371000"),
"+proj=kav5 +ellps=WGS84 +units=m", p("383646.09 5997047.89"), 1e-2 );
checkTransform(
"+proj=kav5 +ellps=WGS84 +units=m", p("383646.088858 5997047.888175"),
"+proj=latlong +datum=WGS84", p("4d53'49.2E 52d22'15.6N"),
1e-5 );
}
// disabled - gamma param not implemented
public void XXX_testRSOBorneo()
{
checkTransform(
"+proj=latlong +a=6377298.556 +rf=300.8017", p("116d2'11.12630 5d54'19.90183"),
"+proj=omerc +a=6377298.556 +rf=300.8017 +lat_0=4 +lonc=115 +alpha=53d18'56.9537 +gamma=53d7'48.3685 +k_0=0.99984 +x_0=590476.87 +y_0=442857.65",
p("704570.40 653979.68"), 1e-2 );
}
public void FAIL_testPconic()
{
checkTransform(
"+proj=latlong +datum=WGS84", p("-70.4 -23.65"),
"+proj=pconic +units=m +lat_1=20n +lat_2=60n +lon_0=60W +datum=WGS84", p("-2240096.40 -6940342.15"),
1e-2 );
// Known failure case
checkTransform(
"+proj=pconic +units=m +lat_1=20n +lat_2=60n +lon_0=60W +datum=WGS84", p("-2240096.40 -6940342.15"),
"+proj=latlong +datum=WGS84", p("-70.4 -23.65"),
1e-2 );
}
}
Best Answer
Sightings constitute a (non-random) sample of some process or population. Accordingly, interpolation (especially) IDW is not a good idea: it solves a different problem altogether.
Consider making a density map. When doing so, it's probably better to favor equal-area projections over conformal projections (because changes of area bias the density, whereas non-conformality does not, even though it might change the qualitative appearance of the map).
There are many equal-area projections of the world. (Unfortunately, popular projections, including Mercator, Transverse Mercator, and Stereographic, are not among them.) Most of them are cylindrical. This is nice in one way--lines of latitude and longitude form an orthogonal grid on the map--but it's bad near the poles, because the scale distortion is all focused in one (vertical) direction where it can become extreme.
These considerations suggest a compromise: just about any projection suitable for a largish area (like a large country), when shifted to the center of the North Atlantic, would likely do a good job, simply because its overall relative distortion should be limited. For instance, the Albers equal-area conic projection is popular for the conterminous US. Changing its central meridian to -30 degrees, its reference parallel to 55 degrees north, and its standard parallels to 45 and 65 degrees, re-points it at the North Atlantic:
The Tissot indicatrices show how little distortion actually occurs within this region: scale errors are less than 1.5% in any direction throughout; that's much more accuracy than needed for interpolation or kernel density estimates.
In contrast--to see what really has been accomplished by this choice compared to others that might suggest themselves--consider the Mercator projection:
The huge discrepancies between the inner and outer circles of the Tissot indicatrices testify to the large changes in scale from south to north in this map. In effect, any interpolation or density calculation based on these map coordinates would use neighborhoods near the top that are approximately half the size of the neighborhoods near the bottom (in reality, not on the map). That's appreciable distortion; there's no sense introducing it into the calculations when it's simple enough to choose a better projection.