I will do a pull request as you suggest. However, I want to add a couple more
projections (providers) before I do (e.g. "EPSG:3410" NSIDC EASE-Grid Global).
As for testing, I generated an equal area grid using the Berhmann projection.
Then, I converted the grid cells (polygons) to
USA_Contiguous_Albers_Equal_Area_Conic projection (ESRI 102003). The
transformed grid cells are very close to being equal area.
Next, I want to try EPSG:4326. I want transform the Berhmann grid to WGS84 and
confirm whether the polygons with geographic coordinates are equal area.
Unfortunately, when I call getArea() on an individual cell, JTS is returning
the area in degrees. Instead of degrees, I would like to get the area in
meters. Is that possible? Obviously meters/degree changes as you move toward
the poles but I would still expect so utility to compute the area of a polygon
on the WGS84 ellipsoid in meters. Is there anything like that in GeoTools?
Thanks,Peter
From: Andrea Aime <andrea.a...@geo-solutions.it>
To: Peter Borissow <peter.boris...@yahoo.com>
Cc: Geotools-Devel list <geotools-devel@lists.sourceforge.net>
Sent: Sunday, March 29, 2015 10:13 AM
Subject: Re: [Geotools-devel] Cylindrical Equal Area Projection
On Sun, Mar 29, 2015 at 2:39 PM, Peter Borissow <peter.boris...@yahoo.com>
wrote:
I have attached a first cut of the CylindricalEqualArea projection.
You will need to add 2 lines to the
org.geotools.referencing.operation.MathTransformProvider for it to work:
org.geotools.referencing.operation.projection.CylindricalEqualArea$Provider
org.geotools.referencing.operation.projection.CylindricalEqualArea$BehrmannProvider
Hi Peter,normally we ask for a pull request to be made, could you create one?
There are instructions
here:http://docs.geotools.org/latest/developer/procedures/contribute.html#code-contributions
I don't know how to test it.
You have to write a script test, see the two commits I've linked for
examples.It's basically just getting some reference results from cs2cs and
build the script file that contains them, with tolerances.
Visually it looks ok. I used the following code which generated a map that
looks a lot like
this:http://mathworld.wolfram.com/BehrmannCylindricalEqual-AreaProjection.html
CoordinateReferenceSystem crs = CRS.decode("EPSG:54017");
MapContent map = new MapContent();
MapViewport vp = map.getViewport();
vp.setCoordinateReferenceSystem(crs);
map.addLayer(getPoliticalBoundaries());
map.addLayer(getGraticules());
I used code from Proj4j[1] which is almost identical to Proj4[2].
The only thing I'm not sure about is the "trueScaleLatitude" variable in the
constructor. In proj4, this maps to "tlat_ts". I have no idea what the
equivalent is in GeoTools.
I don't know what that is either. CheersAndrea
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel