congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Stereographic.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
ucar.unidata.geoloc.projection.Stereographic
constructor

Best Java code snippets using ucar.unidata.geoloc.projection.Stereographic.<init> (Showing top 20 results out of 315)

origin: Unidata/thredds

/**
 * Construct a Stereographic Projection using latitude of true scale and calculating scale factor.
 * <p> Since the scale factor at lat = k = 2*k0/(1+sin(lat))  [Snyder,Working Manual p157]
 * then to make scale = 1 at lat, set k0 = (1+sin(lat))/2
 *
 * @param latt    tangent point of projection, also origin of projection coord system
 * @param lont    tangent point of projection, also origin of projection coord system
 * @param latTrue latitude of true scale in degrees north; latitude where scale factor = 1.0
 * @return Stereographic projection
 */
static public Stereographic factory(double latt, double lont, double latTrue) {
 double scale = (1.0 + Math.sin(Math.toRadians(latTrue))) / 2.0;
 return new Stereographic(latt, lont, scale);
}
origin: edu.ucar/cdm

/**
 * Construct a Stereographic Projection using latitude of true scale and calculating scale factor.
 * <p> Since the scale factor at lat = k = 2*k0/(1+sin(lat))  [Snyder,Working Manual p157]
 * then to make scale = 1 at lat, set k0 = (1+sin(lat))/2
 *
 * @param latt    tangent point of projection, also origin of projection coord system
 * @param lont    tangent point of projection, also origin of projection coord system
 * @param latTrue latitude of true scale in degrees north; latitude where scale factor = 1.0
 * @return Stereographic projection
 */
static public Stereographic factory(double latt, double lont, double latTrue) {
 double scale = (1.0 + Math.sin(Math.toRadians(latTrue))) / 2.0;
 return new Stereographic(latt, lont, scale);
}
origin: edu.ucar/unidataCommon

/**
 * Construct a Stereographic Projection using latitude of true scale and calculating scale factor.
 * <p> Since the scale factor at lat = k = 2*k0/(1+sin(lat))  [Snyder,Working Manual p157]
 * then to make scale = 1 at lat, set k0 = (1+sin(lat))/2
 *
 * @param latt    tangent point of projection, also origin of projection coord system
 * @param lont    tangent point of projection, also origin of projection coord system
 * @param latTrue latitude of true scale in degrees north; latitude where scale factor = 1.0
 * @return Stereographic projection
 */
static public Stereographic factory(double latt, double lont, double latTrue) {
 double scale = (1.0 + Math.sin(Math.toRadians(latTrue))) / 2.0;
 return new Stereographic(latt, lont, scale);
}
origin: edu.ucar/netcdf

/**
 * Construct a Stereographic Projection using latitude of true scale and calculating scale factor.
 * <p> Since the scale factor at lat = k = 2*k0/(1+sin(lat))  [Snyder,Working Manual p157]
 * then to make scale = 1 at lat, set k0 = (1+sin(lat))/2
 *
 * @param latt    tangent point of projection, also origin of projection coord system
 * @param lont    tangent point of projection, also origin of projection coord system
 * @param latTrue latitude of true scale in degrees north; latitude where scale factor = 1.0
 * @return Stereographic projection
 */
static public Stereographic factory(double latt, double lont, double latTrue) {
 double scale = (1.0 + Math.sin(Math.toRadians(latTrue))) / 2.0;
 return new Stereographic(latt, lont, scale);
}
origin: opengeospatial/geoapi

  @Override protected Stereographic createProjection(final ParameterValueGroup p) {
    if (p == null) return new Stereographic();
    return new Stereographic(value(p, CF.LATITUDE_OF_PROJECTION_ORIGIN),
                 value(p, CF.LONGITUDE_OF_PROJECTION_ORIGIN),
                 value(p, CF.SCALE_FACTOR_AT_PROJECTION_ORIGIN),
                 value(p, CF.FALSE_EASTING)  / KILOMETRE,
                 value(p, CF.FALSE_NORTHING) / KILOMETRE,
                 earthRadius(p)              / KILOMETRE);
  }
}
origin: edu.ucar/cdm

private CoordinateTransform makeSTProjection(NetcdfDataset ds) {
 double latt = findAttributeDouble(ds, "PROJ_ALPHA");
 if (Double.isNaN(latt))
  latt = findAttributeDouble(ds, "P_ALP");
 double lont = findAttributeDouble(ds, "PROJ_BETA");
 if (Double.isNaN(lont))
  lont = findAttributeDouble(ds, "P_BET");
 /**
  * Construct a Stereographic Projection.
  * @param latt tangent point of projection, also origin of projecion coord system
  * @param lont tangent point of projection, also origin of projecion coord system
  * @param scale scale factor at tangent point, "normally 1.0 but may be reduced"
  */
 Stereographic st = new Stereographic(latt, lont, 1.0, 0.0, 0.0, earthRadius);
 return new ProjectionCT("StereographicProjection", "FGDC", st);
}
origin: edu.ucar/netcdf

private CoordinateTransform makeSTProjection(NetcdfDataset ds) {
 double latt = findAttributeDouble(ds, "PROJ_ALPHA");
 if (Double.isNaN(latt))
  latt = findAttributeDouble(ds, "P_ALP");
 double lont = findAttributeDouble(ds, "PROJ_BETA");
 if (Double.isNaN(lont))
  lont = findAttributeDouble(ds, "P_BET");
 /**
  * Construct a Stereographic Projection.
  * @param latt tangent point of projection, also origin of projecion coord system
  * @param lont tangent point of projection, also origin of projecion coord system
  * @param scale scale factor at tangent point, "normally 1.0 but may be reduced"
  */
 Stereographic st = new Stereographic(latt, lont, 1.0, 0.0, 0.0, earthRadius);
 return new ProjectionCT("StereographicProjection", "FGDC", st);
}
origin: Unidata/thredds

private CoordinateTransform makeSTProjection(NetcdfDataset ds) {
 double latt = findAttributeDouble(ds, "PROJ_ALPHA");
 if (Double.isNaN(latt))
  latt = findAttributeDouble(ds, "P_ALP");
 double lont = findAttributeDouble(ds, "PROJ_BETA");
 if (Double.isNaN(lont))
  lont = findAttributeDouble(ds, "P_BET");
 /**
  * Construct a Stereographic Projection.
  * @param latt tangent point of projection, also origin of projecion coord system
  * @param lont tangent point of projection, also origin of projecion coord system
  * @param scale scale factor at tangent point, "normally 1.0 but may be reduced"
  */
 Stereographic st = new Stereographic(latt, lont, 1.0, 0.0, 0.0, earthRadius);
 return new ProjectionCT("StereographicProjection", "FGDC", st);
}
origin: edu.ucar/cdm

private CoordinateTransform makePolarStereographicProjection(NetcdfDataset ds) {
 //boolean n_polar = (findAttributeDouble(ds, "P_ALP") == 1.0);
 //double central_meridian = findAttributeDouble(ds, "P_GAM");
 double lon0 = findAttributeDouble(ds, "XCENT");
 double lat0 = findAttributeDouble(ds, "YCENT");
 double latts = findAttributeDouble(ds, "P_BET");
 Stereographic sg = new Stereographic(latts, lat0, lon0, 0.0, 0.0, earthRadius);
 //sg.setCentralMeridian(centeral_meridian);
 return new ProjectionCT("PolarStereographic", "FGDC", sg);
}
origin: edu.ucar/netcdf

private CoordinateTransform makePolarStereographicProjection(NetcdfDataset ds) {
 //boolean n_polar = (findAttributeDouble(ds, "P_ALP") == 1.0);
 //double central_meridian = findAttributeDouble(ds, "P_GAM");
 double lon0 = findAttributeDouble(ds, "XCENT");
 double lat0 = findAttributeDouble(ds, "YCENT");
 double latts = findAttributeDouble(ds, "P_BET");
 Stereographic sg = new Stereographic(latts, lat0, lon0, 0.0, 0.0, earthRadius);
 //sg.setCentralMeridian(centeral_meridian);
 return new ProjectionCT("PolarStereographic", "FGDC", sg);
}
origin: Unidata/thredds

private CoordinateTransform makePolarStereographicProjection(NetcdfDataset ds) {
 //boolean n_polar = (findAttributeDouble(ds, "P_ALP") == 1.0);
 //double central_meridian = findAttributeDouble(ds, "P_GAM");
 double lon0 = findAttributeDouble(ds, "XCENT");
 double lat0 = findAttributeDouble(ds, "YCENT");
 double latts = findAttributeDouble(ds, "P_BET");
 Stereographic sg = new Stereographic(latts, lat0, lon0, 0.0, 0.0, earthRadius);
 //sg.setCentralMeridian(centeral_meridian);
 return new ProjectionCT("PolarStereographic", "FGDC", sg);
}
origin: edu.ucar/unidataCommon

/**
 * copy constructor - avoid clone !!
 */
public ProjectionImpl constructCopy() {
 return new Stereographic(getTangentLat(), getTangentLon(), getScale(), getFalseEasting(), getFalseNorthing());
}
origin: Unidata/thredds

@Test
public void testStereo() {
 testProjection(new Stereographic());
 Stereographic p = new Stereographic();
 Stereographic p2 = (Stereographic) p.constructCopy();
 assert p.equals(p2);
}
origin: Unidata/thredds

public GdsHorizCoordSys makeHorizCoordSys() {
 boolean northPole = (projCenterFlag & 128) == 0;
 double latOrigin = northPole ? 90.0 : -90.0;
 // Why the scale factor?. according to GRIB docs:
 // "Grid lengths are in units of meters, at the 60 degree latitude circle nearest to the pole"
 // since the scale factor at 60 degrees = k = 2*k0/(1+sin(60))  [Snyder,Working Manual p157]
 // then to make scale = 1 at 60 degrees, k0 = (1+sin(60))/2 = .933
 double scale;
 if (Double.isNaN(lad)) { // LOOK ??
  scale = 0.9330127018922193;
 } else {
  scale = (1.0 + Math.sin(Math.toRadians( Math.abs(lad)))) / 2;
 }
 ProjectionImpl proj;
 Earth earth = getEarth();
 if (earth.isSpherical()) {
  proj = new Stereographic(latOrigin, lov, scale);
 } else {
  proj = new ucar.unidata.geoloc.projection.proj4.StereographicAzimuthalProjection(latOrigin, lov, scale, lad, 0.0, 0.0, earth);
 }
 ProjectionPointImpl start = (ProjectionPointImpl) proj.latLonToProj(new LatLonPointImpl(la1, lo1));
 return new GdsHorizCoordSys(getNameShort(), template, 0, scanMode, proj, start.getX(), getDx(), start.getY(), getDy(), getNx(), getNy(), null);
}
origin: edu.ucar/cdm

@Override
public ProjectionImpl constructCopy() {
 ProjectionImpl result =  new Stereographic(getTangentLat(), getTangentLon(), getScale(), getFalseEasting(), getFalseNorthing(), getEarthRadius());
 result.setDefaultMapArea(defaultMapArea);
 result.setName(name);
 return result;
}
origin: edu.ucar/netcdf

@Override
public ProjectionImpl constructCopy() {
 ProjectionImpl result =  new Stereographic(getTangentLat(), getTangentLon(), getScale(), getFalseEasting(), getFalseNorthing(), getEarthRadius());
 result.setDefaultMapArea(defaultMapArea);
 result.setName(name);
 return result;
}
origin: Unidata/thredds

@Override
public ProjectionImpl constructCopy() {
 ProjectionImpl result =  new Stereographic(getTangentLat(), getTangentLon(), getScale(), getFalseEasting(), getFalseNorthing(), getEarthRadius());
 result.setDefaultMapArea(defaultMapArea);
 result.setName(name);
 return result;
}
origin: edu.ucar/cdm

private ProjectionCT makePSProjection() throws NoSuchElementException {
 double lov = navInfo.getDouble( "Lov");
 double la1 = navInfo.getDouble( "La1");
 double lo1 = navInfo.getDouble( "Lo1");
 // Why the scale factor?. accordining to GRID docs:
 // "Grid lengths are in units of meters, at the 60 degree latitude circle nearest to the pole"
 // since the scale factor at 60 degrees = k = 2*k0/(1+sin(60))  [Snyder,Working Manual p157]
 // then to make scale = 1 at 60 degrees, k0 = (1+sin(60))/2 = .933
 Stereographic ps = new Stereographic(90.0, lov, .933);
 // we have to project in order to find the origin
 ProjectionPointImpl start = (ProjectionPointImpl) ps.latLonToProj( new LatLonPointImpl( la1, lo1));
 if (debug) System.out.println("start at proj coord "+start);
 startx = start.getX();
 starty = start.getY();
 nx = navInfo.getInt( "Nx");
 ny = navInfo.getInt( "Ny");
 dx = navInfo.getDouble( "Dx")/1000.0;
 dy = navInfo.getDouble( "Dy")/1000.0;
 return new ProjectionCT(grid_name, "FGDC", ps);
}
origin: Unidata/thredds

private ProjectionCT makePSProjection() throws NoSuchElementException {
 double lov = navInfo.getDouble( "Lov");
 double la1 = navInfo.getDouble( "La1");
 double lo1 = navInfo.getDouble( "Lo1");
 // Why the scale factor?. accordining to GRID docs:
 // "Grid lengths are in units of meters, at the 60 degree latitude circle nearest to the pole"
 // since the scale factor at 60 degrees = k = 2*k0/(1+sin(60))  [Snyder,Working Manual p157]
 // then to make scale = 1 at 60 degrees, k0 = (1+sin(60))/2 = .933
 Stereographic ps = new Stereographic(90.0, lov, .933);
 // we have to project in order to find the origin
 ProjectionPointImpl start = (ProjectionPointImpl) ps.latLonToProj( new LatLonPointImpl( la1, lo1));
 if (debug) System.out.println("start at proj coord "+start);
 startx = start.getX();
 starty = start.getY();
 nx = navInfo.getInt( "Nx");
 ny = navInfo.getInt( "Ny");
 dx = navInfo.getDouble( "Dx")/1000.0;
 dy = navInfo.getDouble( "Dy")/1000.0;
 return new ProjectionCT(grid_name, "FGDC", ps);
}
origin: edu.ucar/netcdf

private ProjectionCT makePSProjection() throws NoSuchElementException {
 double lov = navInfo.getDouble( "Lov");
 double la1 = navInfo.getDouble( "La1");
 double lo1 = navInfo.getDouble( "Lo1");
 // Why the scale factor?. accordining to GRID docs:
 // "Grid lengths are in units of meters, at the 60 degree latitude circle nearest to the pole"
 // since the scale factor at 60 degrees = k = 2*k0/(1+sin(60))  [Snyder,Working Manual p157]
 // then to make scale = 1 at 60 degrees, k0 = (1+sin(60))/2 = .933
 Stereographic ps = new Stereographic(90.0, lov, .933);
 // we have to project in order to find the origin
 ProjectionPointImpl start = (ProjectionPointImpl) ps.latLonToProj( new LatLonPointImpl( la1, lo1));
 if (debug) System.out.println("start at proj coord "+start);
 startx = start.getX();
 starty = start.getY();
 nx = navInfo.getInt( "Nx");
 ny = navInfo.getInt( "Ny");
 dx = navInfo.getDouble( "Dx")/1000.0;
 dy = navInfo.getDouble( "Dy")/1000.0;
 return new ProjectionCT(grid_name, "FGDC", ps);
}
ucar.unidata.geoloc.projectionStereographic<init>

Javadoc

Constructor with default parameters = North Polar

Popular methods of Stereographic

  • addParameter
  • getFalseEasting
    Get the false easting, in km.
  • getFalseNorthing
    Get the false northing, in km.
  • getScale
    Get the scale
  • getScaleFactor
    Calculate polar stereographic scale factor based on the natural latitude and longitude of the origin
  • getTangentLat
    Get the tangent latitude
  • getTangentLon
    Get the tangent longitude
  • precalculate
    precalculate some stuff
  • getEarthRadius
  • latLonToProj
    Convert lat/lon coordinates to projection coordinates.
  • setTangentLon
    Set the tangent longitude
  • toString
  • setTangentLon,
  • toString,
  • constructCopy,
  • equals

Popular in Java

  • Finding current android device location
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • findViewById (Activity)
  • getSharedPreferences (Context)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • JTable (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now