From: Peter B. <pet...@ya...> - 2015-03-23 10:41:10
|
Hello- I'm sorry if my previous note was unclear. I would like to implement the Cylindrical Equal Area projection: http://www.remotesensing.org/geotiff/proj_list/cylindrical_equal_area.html In doing so, GeoTools would be able to support other equal area projections like NSIDC EASE-Grid Global (EPSG:3410), Behrmann (EPSG:54017), Peters, Gal, etc. I am a geotools novice but would like to contribute. What is the process for adding a new projection? I believe the first step is to implement a class that extends MapProjection. This code looks like a good place to start: http://trac.osgeo.org/proj4j/browser/trunk/src/main/java/org/osgeo/proj4j/proj/CylindricalEqualAreaProjection.java What else needs to be done? Thanks,Peter From: Peter Borissow <pet...@ya...> To: Geotools-gt2-users <geo...@li...> Sent: Thursday, March 19, 2015 7:07 PM Subject: Re: Behrmann Projection Judging by the classes in the org.geotools.referencing.operation.projection package, it doesn't appear that GeoTools supports Cylindrical Equal Area projections: https://github.com/geotools/geotools/tree/master/modules/library/referencing/src/main/java/org/geotools/referencing/operation/projection Any hints on how to implement a Cylindrical Equal Area projection? I have stubbed out a CylindricalEqualArea class that extends MapProjection and assigned it to the org.geotools.referencing.operation.projection package. What else should I do? Is there some way to register the class? Also, I noticed that most of the projections have a static class called "Provider" that extends "AbstractProvider". The Provider class has a ParameterDescriptorGroup with keywords for OGC, ESRI, EPSG, etc. There is also a GEOTOOLS key. For example, the EquidistantCylindrical class has something like this: new NamedIdentifier(Citations.GEOTOOLS, Vocabulary.formatInternational( VocabularyKeys.EQUIDISTANT_CYLINDRICAL_PROJECTION)) I guess I need to add an entry in VocabularyKeys as well? Anything else? Thanks in advance,Peter From: Peter Borissow <pet...@ya...> To: Geotools-gt2-users <geo...@li...> Sent: Thursday, March 19, 2015 1:27 PM Subject: Re: Behrmann Projection Quick update. I tried to hand code the Behrmann projection using a "Cylindrical_Equal_Area" with a standard parallel of 30 degrees: String behrmannWKT = "PROJCS[\"World_Behrmann\"," + "GEOGCS[\"GCS_WGS_1984\"," + "DATUM[\"WGS_1984\"," + "SPHEROID[\"WGS_1984\",6378137,298.257223563]]," + "PRIMEM[\"Greenwich\",0]," + "UNIT[\"Degree\",0.017453292519943295]]," + "PROJECTION[\"Cylindrical_Equal_Area\"]," + "PARAMETER[\"False_Easting\",0]," + "PARAMETER[\"False_Northing\",0]," + "PARAMETER[\"Central_Meridian\",0]," + "PARAMETER[\"Standard_Parallel_1\",30]," + "UNIT[\"Meter\",1]," + "AUTHORITY[\"EPSG\",\"54017\"]]"; CoordinateReferenceSystem crs = CRS.parseWKT(behrmannWKT); Throws: org.opengis.referencing.NoSuchIdentifierException: No transform for classification "Cylindrical_Equal_Area". Does geotools support any Cylindrical Equal Area Projections? http://www.remotesensing.org/geotiff/proj_list/cylindrical_equal_area.html From: Peter Borissow <pet...@ya...> To: Geotools-gt2-users <geo...@li...> Sent: Thursday, March 19, 2015 12:14 PM Subject: Behrmann Projection Hello- I would like to create a map using the Behrmann Equal Area Projection (EPSG:54017). GeoTools doesn't seem to like this projection. When I call CRS.decode("EPSG:54017") I'm getting the following exception: org.opengis.referencing.FactoryException: Error in "PROJECTION": No transform for classification "Behrmann". When I try to pass in a Proj4 style string but I get a different exception. CRS.decode("+proj=cea +lon_0=0 +lat_ts=30 +x_0=0 +y_0=0 +datum=WGS84 +ellps=WGS84 +units=m +no_defs") Throws: org.opengis.referencing.NoSuchAuthorityCodeException: No authority was defined for code "+PROJ=CEA +LON_0=0 +LAT_TS=30 +X_0=0 +Y_0=0 +DATUM=WGS84 +ELLPS=WGS84 +UNITS=M +NO_DEFS". Did you forget "AUTHORITY:NUMBER"? Any suggestions? Thanks,Peter Related links:http://spatialreference.org/ref/esri/54017/http://mathworld.wolfram.com/BehrmannCylindricalEqual-AreaProjection.html http://sourceforge.net/p/geoserver/mailman/message/24472263/ |