Hi Nihat, Sorry for the delay in responding to you. You can find the code for our implementation of AlbersEqualArea here: https://github.com/Unidata/thredds/blob/master/cdm/src/main/java/ucar/unidata/geoloc/projection/AlbersEqualArea.java It's based on "Map Projections Used by the U.S. Geological Survey". See https://pubs.usgs.gov/bul/1532/report.pdf Does that help? If you can identify a bug in a reproducible manner, we'd be happy to fix it. Cheers, Christian > Hi > > I am reading Fire related data set that is defined on a projection field > as defined in the comment section in the code snippet below. I used > ucar.unidata.geoloc.projection.AlbersEqualArea to project my latlon > points onto this field to see where my points lie in different fire > zones. In closer inspection, I realized that my points are about > 30km north from where they are supposed to be over California. If > I project fire data onto latlon plane, I see the same issue but > this time polygons are displaced by about 30km southward. I was > thinking maybe earth radius was defined a little bit different > but explicit definition of earth radius is still giving me the same > problem. > > What do you think I am missing here? I couldn't locate the source > code to see what exactly going on. I saw a version of the source code at > > https://github.com/orbisgis/cts/blob/master/src/main/java/org/cts/op/projection/AlbersEqualArea.java > > but this seemed a bit different version than what I use. > > Any help is greatly appreciated. > > Thanks > > nc > > import ucar.unidata.geoloc.LatLonPoint; > import ucar.unidata.geoloc.LatLonPointImpl; > import ucar.unidata.geoloc.ProjectionPoint; > import ucar.unidata.geoloc.ProjectionPointImpl; > import ucar.unidata.geoloc.projection.AlbersEqualArea; > import ucar.unidata.geoloc.projection.proj4.AlbersEqualAreaEllipse; > > public class TestProj { > > public static void main(String[] arg) { > /* > PROJCS["NAD_1983_Albers",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983", > SPHEROID["GRS_1980",6378137.0,298.257222101]], > PRIMEM["Greenwich",0.0], > UNIT["Degree",0.0174532925199433]], > PROJECTION["Albers"],PARAMETER["False_Easting",0.0],PARAMETER[ > False_Northing",-4000000.0], > PARAMETER["Central_Meridian",-120.0], > PARAMETER["Standard_Parallel_1",34.0], > PARAMETER["Standard_Parallel_2",40.5], > PARAMETER["Latitude_Of_Origin",0.0], > UNIT["Meter",1.0]] > > */ > > double radius = 6378137d; > double False_Easting = 0.0; > double False_Northing = -4000000.0d; > double Standard_Parallel_1 = 34.0; > double Standard_Parallel_2 = 40.5; > double Latitude_Of_Origin = 0.0; > double Central_Meridian = -120; > AlbersEqualArea prj = new AlbersEqualArea(Latitude_Of_Origin, > Central_Meridian, Standard_Parallel_1, > Standard_Parallel_2,False_Easting,False_Northing,radius); > LatLonPoint ptl = new LatLonPointImpl(37d,-119d ); > > ProjectionPoint pt = prj.latLonToProj(ptl); > > System.out.println(pt.getX() + " " + (pt.getY())); > > Nihat Cubukcu Ticket Details =================== Ticket ID: FQF-323932 Department: Support netCDF Java Priority: High Status: Closed =================== NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.