/** * Set the zone number = [1,60] * * @param newZone _more_ */ public void setZone(int newZone) { convert2latlon = new Utm_To_Gdc_Converter(convert2latlon.getA(), convert2latlon.getF(), newZone, convert2latlon.isNorth()); convert2xy = new Gdc_To_Utm_Converter(convert2latlon.getA(), convert2latlon.getF(), convert2latlon.getZone(), convert2latlon.isNorth()); }
/** * Set the first standard parallel * * @param par the first standard parallel */ public void setParallelOne(double par) { par1 = par; precalculate(); }
/** * Get whether in North or South Hemisphere. * * @return true if north */ public boolean isNorth() { return convert2latlon.isNorth(); }
/** * Constructor with default WGS 84 ellipsoid. * * @param zone the UTM zone number (1-60) * @param isNorth true if the UTM coordinate is in the northern hemisphere */ public UtmProjection(int zone, boolean isNorth) { super("UtmProjection", false); convert2latlon = new Utm_To_Gdc_Converter(zone, isNorth); convert2xy = new Gdc_To_Utm_Converter(zone, isNorth); addParameter(CF.GRID_MAPPING_NAME, GRID_MAPPING_NAME); addParameter(CF.SEMI_MAJOR_AXIS, convert2latlon.getA()); addParameter(CF.INVERSE_FLATTENING, convert2latlon.getF()); addParameter(UTM_ZONE1, zone); }
@Override public ProjectionImpl constructCopy() { LatLonProjection result = new LatLonProjection(getName(), getDefaultMapArea()); result.setDefaultMapArea(defaultMapArea); result.setName(name); result.earth = this.earth; return result; }
/** * Get the zone number = [1,60] * * @return zone number */ public int getZone() { return convert2latlon.getZone(); }
/** * Create a ProjectionImpl from the projection * * @param proj projection * @return a ProjectionImpl representing the projection */ static public ProjectionImpl factory(Projection proj) { if (proj instanceof ProjectionImpl) { return (ProjectionImpl) proj; } return new ProjectionAdapter(proj); }
/** * Constructor. * * @param a the semi-major axis (meters) for the ellipsoid * @param f the inverse flattening for the ellipsoid * @param zone the UTM zone number (1..60) * @param hemisphere_north true if the UTM coordinate is in the northern hemisphere */ public Gdc_To_Utm_Converter(double a, double f, int zone, boolean hemisphere_north) { init(a, f, zone, hemisphere_north); }
/** * Set the origin longitude. * * @param lon the origin longitude. */ public void setOriginLon(double lon) { lon0 = lon; precalculate(); }
/** * Set the height above the earth * @param height height above the earth */ public void setHeight(double height) { H = height; precalculate(); }
/** * Create a String of the parameters. * * @return a String of the parameters */ public String paramsToString() { return toString(); }
/** * Get the parameters as a String * * @return the parameters as a String */ public String paramsToString() { return toString(); }
/** * Create a String of the parameters. * * @return a String of the parameters */ public String paramsToString() { return toString(); }
/** * Create a String of the parameters. * * @return a String of the parameters */ public String paramsToString() { return toString(); }
/** * Create a String of the parameters. * * @return a String of the parameters */ public String paramsToString() { return toString(); }
public LatLonProjection(Earth earth) { this("LatLonProjection"); this.earth = earth; addParameters(); }
/** * Set whether in North or South Hemisphere. * * @param newNorth _more_ */ public void setNorth(boolean newNorth) { convert2latlon = new Utm_To_Gdc_Converter(convert2latlon.getA(), convert2latlon.getF(), convert2latlon.getZone(), newNorth); convert2xy = new Gdc_To_Utm_Converter(convert2latlon.getA(), convert2latlon.getF(), convert2latlon.getZone(), convert2latlon.isNorth()); }
/** * Constructor with default WGS 84 ellipsoid. * * @param zone the UTM zone number (1-60) * @param isNorth true if the UTM coordinate is in the northern hemisphere */ public UtmProjection(int zone, boolean isNorth) { super("UtmProjection", false); convert2latlon = new Utm_To_Gdc_Converter(zone, isNorth); convert2xy = new Gdc_To_Utm_Converter(zone, isNorth); saveParams = new SaveParams(convert2latlon.getA(), 1/convert2latlon.getF(), zone, isNorth); addParameter(CF.GRID_MAPPING_NAME, GRID_MAPPING_NAME); addParameter(CF.SEMI_MAJOR_AXIS, convert2latlon.getA()); addParameter(CF.INVERSE_FLATTENING, convert2latlon.getF()); addParameter(UTM_ZONE1, zone); }
/** * Create a String of the parameters. * * @return a String of the parameters */ public String paramsToString() { return toString(); }