/** * Create a WKS string * * @return WKS string */ public String toWKS() { StringBuilder sbuff = new StringBuilder(); sbuff.append("PROJCS[\"").append(getName()).append("\","); if (true) { sbuff.append("GEOGCS[\"Normal Sphere (r=6371007)\","); sbuff.append("DATUM[\"unknown\","); sbuff.append("SPHEROID[\"sphere\",6371007,0]],"); } else { sbuff.append("GEOGCS[\"WGS 84\","); sbuff.append("DATUM[\"WGS_1984\","); sbuff.append("SPHEROID[\"WGS 84\",6378137,298.257223563],"); sbuff.append("TOWGS84[0,0,0,0,0,0,0]],"); } sbuff.append("PRIMEM[\"Greenwich\",0],"); sbuff.append("UNIT[\"degree\",0.0174532925199433]],"); sbuff.append("PROJECTION[\"Lambert_Conformal_Conic_1SP\"],"); sbuff.append("PARAMETER[\"latitude_of_origin\",").append(getOriginLat()).append("],"); // LOOK assumes getOriginLat = getParellel sbuff.append("PARAMETER[\"central_meridian\",").append(getOriginLon()).append("],"); sbuff.append("PARAMETER[\"scale_factor\",1],"); sbuff.append("PARAMETER[\"false_easting\",").append(falseEasting).append("],"); sbuff.append("PARAMETER[\"false_northing\",").append(falseNorthing).append("],"); return sbuff.toString(); }
/** * Create a WKS string * * @return WKS string */ public String toWKS() { StringBuilder sbuff = new StringBuilder(); sbuff.append("PROJCS[\"").append(getName()).append("\","); if (true) { sbuff.append("GEOGCS[\"Normal Sphere (r=6371007)\","); sbuff.append("DATUM[\"unknown\","); sbuff.append("SPHEROID[\"sphere\",6371007,0]],"); } else { sbuff.append("GEOGCS[\"WGS 84\","); sbuff.append("DATUM[\"WGS_1984\","); sbuff.append("SPHEROID[\"WGS 84\",6378137,298.257223563],"); sbuff.append("TOWGS84[0,0,0,0,0,0,0]],"); } sbuff.append("PRIMEM[\"Greenwich\",0],"); sbuff.append("UNIT[\"degree\",0.0174532925199433]],"); sbuff.append("PROJECTION[\"Lambert_Conformal_Conic_1SP\"],"); sbuff.append("PARAMETER[\"latitude_of_origin\",").append(getOriginLat()).append("],"); // LOOK assumes getOriginLat = getParellel sbuff.append("PARAMETER[\"central_meridian\",").append(getOriginLon()).append("],"); sbuff.append("PARAMETER[\"scale_factor\",1],"); sbuff.append("PARAMETER[\"false_easting\",").append(falseEasting).append("],"); sbuff.append("PARAMETER[\"false_northing\",").append(falseNorthing).append("],"); return sbuff.toString(); }
/** * Create a WKS string * * @return WKS string */ public String toWKS() { StringBuilder sbuff = new StringBuilder(); sbuff.append("PROJCS[\"").append(getName()).append("\","); if (true) { sbuff.append("GEOGCS[\"Normal Sphere (r=6371007)\","); sbuff.append("DATUM[\"unknown\","); sbuff.append("SPHEROID[\"sphere\",6371007,0]],"); } else { sbuff.append("GEOGCS[\"WGS 84\","); sbuff.append("DATUM[\"WGS_1984\","); sbuff.append("SPHEROID[\"WGS 84\",6378137,298.257223563],"); sbuff.append("TOWGS84[0,0,0,0,0,0,0]],"); } sbuff.append("PRIMEM[\"Greenwich\",0],"); sbuff.append("UNIT[\"degree\",0.0174532925199433]],"); sbuff.append("PROJECTION[\"Lambert_Conformal_Conic_1SP\"],"); sbuff.append("PARAMETER[\"latitude_of_origin\",").append(getOriginLat()).append("],"); // LOOK assumes getOriginLat = getParellel sbuff.append("PARAMETER[\"central_meridian\",").append(getOriginLon()).append("],"); sbuff.append("PARAMETER[\"scale_factor\",1],"); sbuff.append("PARAMETER[\"false_easting\",").append(falseEasting).append("],"); sbuff.append("PARAMETER[\"false_northing\",").append(falseNorthing).append("],"); return sbuff.toString(); }
/** * Create a WKS string * * @return WKS string */ public String toWKS() { StringBuilder sbuff = new StringBuilder(); sbuff.append("PROJCS[\"").append(getName()).append("\","); if (true) { sbuff.append("GEOGCS[\"Normal Sphere (r=6371007)\","); sbuff.append("DATUM[\"unknown\","); sbuff.append("SPHEROID[\"sphere\",6371007,0]],"); } else { sbuff.append("GEOGCS[\"WGS 84\","); sbuff.append("DATUM[\"WGS_1984\","); sbuff.append("SPHEROID[\"WGS 84\",6378137,298.257223563],"); sbuff.append("TOWGS84[0,0,0,0,0,0,0]],"); } sbuff.append("PRIMEM[\"Greenwich\",0],"); sbuff.append("UNIT[\"degree\",0.0174532925199433]],"); sbuff.append("PROJECTION[\"Lambert_Conformal_Conic_1SP\"],"); sbuff.append("PARAMETER[\"latitude_of_origin\",").append(getOriginLat()).append("],"); // LOOK assumes getOriginLat = getParellel sbuff.append("PARAMETER[\"central_meridian\",").append(getOriginLon()).append("],"); sbuff.append("PARAMETER[\"scale_factor\",1],"); sbuff.append("PARAMETER[\"false_easting\",").append(falseEasting).append("],"); sbuff.append("PARAMETER[\"false_northing\",").append(falseNorthing).append("],"); return sbuff.toString(); }
/** * Clone this projection. * * @return Clone of this */ public Object clone() { LambertConformal cl = (LambertConformal) super.clone(); cl.origin = new LatLonPointImpl(getOriginLat(), getOriginLon()); return cl; }
/** * Check for equality with the Object in question * * @param proj object to check * @return true if they are equal */ public boolean equals(Object proj) { if (!(proj instanceof LambertConformal)) { return false; } LambertConformal oo = (LambertConformal) proj; return ((this.getParallelOne() == oo.getParallelOne()) && (this.getParallelTwo() == oo.getParallelTwo()) && (this.getOriginLat() == oo.getOriginLat()) && (this.getOriginLon() == oo.getOriginLon()) && this.defaultMapArea.equals(oo.defaultMapArea)); }
public ProjectionImpl constructCopy() { return new LambertConformal(getOriginLat(), getOriginLon(), getParallelOne(), getParallelTwo(), getFalseEasting(), getFalseNorthing()); }
@Override public ProjectionImpl constructCopy() { ProjectionImpl result = new LambertConformal(getOriginLat(), getOriginLon(), getParallelOne(), getParallelTwo(), getFalseEasting(), getFalseNorthing(), earth_radius); result.setDefaultMapArea(defaultMapArea); result.setName(name); return result; }
@Override public ProjectionImpl constructCopy() { ProjectionImpl result = new LambertConformal(getOriginLat(), getOriginLon(), getParallelOne(), getParallelTwo(), getFalseEasting(), getFalseNorthing(), earth_radius); result.setDefaultMapArea(defaultMapArea); result.setName(name); return result; }
@Override public ProjectionImpl constructCopy() { ProjectionImpl result = new LambertConformal(getOriginLat(), getOriginLon(), getParallelOne(), getParallelTwo(), getFalseEasting(), getFalseNorthing(), earth_radius); result.setDefaultMapArea(defaultMapArea); result.setName(name); return result; }
private void addLambertConformalTags(LambertConformal proj, double FalseEasting, double FalseNorthing) { geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GTModelTypeGeoKey, GeoKey.TagValue.ModelType_Projected)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GTRasterTypeGeoKey, GeoKey.TagValue.RasterType_Area)); // define the "geographic Coordinate System" geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GeographicTypeGeoKey, GeoKey.TagValue.GeographicType_WGS_84)); //geotiff.addGeoKey( new GeoKey( GeoKey.Tag.GeogPrimeMeridianGeoKey, GeoKey.TagValue.GeogPrimeMeridian_GREENWICH)); //geotiff.addGeoKey( new GeoKey( GeoKey.Tag.GeogAngularUnitsGeoKey, GeoKey.TagValue.GeogAngularUnits_DEGREE)); // define the "coordinate transformation" geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjectedCSTypeGeoKey, GeoKey.TagValue.ProjectedCSType_UserDefined)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.PCSCitationGeoKey, "Snyder")); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjectionGeoKey, GeoKey.TagValue.ProjectedCSType_UserDefined)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjLinearUnitsGeoKey, GeoKey.TagValue.ProjLinearUnits_METER)); //geotiff.addGeoKey( new GeoKey( GeoKey.Tag.ProjLinearUnitsSizeGeoKey, 1.0)); // units of km // the specifics for lambert conformal geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjCoordTransGeoKey, GeoKey.TagValue.ProjCoordTrans_LambertConfConic_2SP)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjStdParallel1GeoKey, proj.getParallelOne())); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjStdParallel2GeoKey, proj.getParallelTwo())); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjCenterLongGeoKey, proj.getOriginLon())); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjNatOriginLatGeoKey, proj.getOriginLat())); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjNatOriginLongGeoKey, proj.getOriginLon())); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjScaleAtNatOriginGeoKey, 1.0)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjFalseEastingGeoKey, 0.0)); // LOOK why not FalseNorthing ?? geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjFalseNorthingGeoKey, 0.0)); }
private void addLambertConformalTags(LambertConformal proj, double FalseEasting, double FalseNorthing) { geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GTModelTypeGeoKey, GeoKey.TagValue.ModelType_Projected)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GTRasterTypeGeoKey, GeoKey.TagValue.RasterType_Area)); // define the "geographic Coordinate System" geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GeographicTypeGeoKey, GeoKey.TagValue.GeographicType_WGS_84)); //geotiff.addGeoKey( new GeoKey( GeoKey.Tag.GeogPrimeMeridianGeoKey, GeoKey.TagValue.GeogPrimeMeridian_GREENWICH)); //geotiff.addGeoKey( new GeoKey( GeoKey.Tag.GeogAngularUnitsGeoKey, GeoKey.TagValue.GeogAngularUnits_DEGREE)); // define the "coordinate transformation" geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjectedCSTypeGeoKey, GeoKey.TagValue.ProjectedCSType_UserDefined)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.PCSCitationGeoKey, "Snyder")); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjectionGeoKey, GeoKey.TagValue.ProjectedCSType_UserDefined)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjLinearUnitsGeoKey, GeoKey.TagValue.ProjLinearUnits_METER)); //geotiff.addGeoKey( new GeoKey( GeoKey.Tag.ProjLinearUnitsSizeGeoKey, 1.0)); // units of km // the specifics for lambert conformal geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjCoordTransGeoKey, GeoKey.TagValue.ProjCoordTrans_LambertConfConic_2SP)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjStdParallel1GeoKey, proj.getParallelOne())); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjStdParallel2GeoKey, proj.getParallelTwo())); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjCenterLongGeoKey, proj.getOriginLon())); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjNatOriginLatGeoKey, proj.getOriginLat())); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjNatOriginLongGeoKey, proj.getOriginLon())); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjScaleAtNatOriginGeoKey, 1.0)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjFalseEastingGeoKey, 0.0)); // LOOK why not FalseNorthing ?? geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjFalseNorthingGeoKey, 0.0)); }
private void addLambertConformalTags(LambertConformal proj, double FalseEasting, double FalseNorthing) { geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GTModelTypeGeoKey, GeoKey.TagValue.ModelType_Projected)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GTRasterTypeGeoKey, GeoKey.TagValue.RasterType_Area)); // define the "geographic Coordinate System" geotiff.addGeoKey(new GeoKey(GeoKey.Tag.GeographicTypeGeoKey, GeoKey.TagValue.GeographicType_WGS_84)); //geotiff.addGeoKey( new GeoKey( GeoKey.Tag.GeogPrimeMeridianGeoKey, GeoKey.TagValue.GeogPrimeMeridian_GREENWICH)); //geotiff.addGeoKey( new GeoKey( GeoKey.Tag.GeogAngularUnitsGeoKey, GeoKey.TagValue.GeogAngularUnits_DEGREE)); // define the "coordinate transformation" geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjectedCSTypeGeoKey, GeoKey.TagValue.ProjectedCSType_UserDefined)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.PCSCitationGeoKey, "Snyder")); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjectionGeoKey, GeoKey.TagValue.ProjectedCSType_UserDefined)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjLinearUnitsGeoKey, GeoKey.TagValue.ProjLinearUnits_METER)); //geotiff.addGeoKey( new GeoKey( GeoKey.Tag.ProjLinearUnitsSizeGeoKey, 1.0)); // units of km // the specifics for lambert conformal geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjCoordTransGeoKey, GeoKey.TagValue.ProjCoordTrans_LambertConfConic_2SP)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjStdParallel1GeoKey, proj.getParallelOne())); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjStdParallel2GeoKey, proj.getParallelTwo())); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjCenterLongGeoKey, proj.getOriginLon())); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjNatOriginLatGeoKey, proj.getOriginLat())); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjNatOriginLongGeoKey, proj.getOriginLon())); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjScaleAtNatOriginGeoKey, 1.0)); geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjFalseEastingGeoKey, 0.0)); // LOOK why not FalseNorthing ?? geotiff.addGeoKey(new GeoKey(GeoKey.Tag.ProjFalseNorthingGeoKey, 0.0)); }