public void saveToProperties(Properties properties){
  properties.setProperty("ProjectionInfo.Projected",Boolean.toString(projected));
  properties.setProperty("ProjectionInfo.TiePoint",StringUtil.doubleArrayToString(tiePoint));
  properties.setProperty("ProjectionInfo.Scale",StringUtil.doubleArrayToString(scale));
  if (globe == null) {
    globe=LayerFactory.defaultGlobe;
  }
  properties.setProperty("ProjectionInfo.Globe",globe);
  properties.setProperty("ProjectionInfo.RasterWidth",Integer.toString(rasterWidth));
  properties.setProperty("ProjectionInfo.RasterLength",Integer.toString(rasterLength));
  properties.setProperty("ProjectionInfo.ProjLinearUnits",projLinearUnits);
  if (datumCode > 0) {
    properties.setProperty("ProjectionInfo.DatumCode",Integer.toString(datumCode));
  }
  if (ellipsoidCode > 0) {
    properties.setProperty("ProjectionInfo.EllipsoidCode",Integer.toString(ellipsoidCode));
  }
  if (!Double.isNaN(semiMajorAxis)) {
    properties.setProperty("ProjectionInfo.SemiMajorAxis",Double.toString(semiMajorAxis));
  }
  if (!Double.isNaN(semiMinorAxis)) {
    properties.setProperty("ProjectionInfo.SemiMinorAxis",Double.toString(semiMinorAxis));
  }
  if (!Double.isNaN(inverseFlattening)) {
    properties.setProperty("ProjectionInfo.InverseFlattening",Double.toString(inverseFlattening));
  }
  if (!Double.isNaN(gcsPrimeMeridianLon)) {
    properties.setProperty("ProjectionInfo.GCSPrimeMeridianLon",Double.toString(gcsPrimeMeridianLon));
  }
  if (projCode > 0) {
    properties.setProperty("ProjectionInfo.ProjectionCode",Integer.toString(projCode));
  }
  if (pcsCode > 0) {
    properties.setProperty("ProjectionInfo.ProjectionCoordinateSystemCode",Integer.toString(pcsCode));
  }
  if (coordTransformCode > 0) {
    properties.setProperty("ProjectionInfo.CoordTransformCode",Integer.toString(coordTransformCode));
  }
  if (!Double.isNaN(stdParallel1)) {
    properties.setProperty("ProjectionInfo.StdParallel1",Double.toString(stdParallel1));
  }
  if (!Double.isNaN(stdParallel2)) {
    properties.setProperty("ProjectionInfo.StdParallel2",Double.toString(stdParallel2));
  }
  if (!Double.isNaN(naturalOriginLon)) {
    properties.setProperty("ProjectionInfo.NaturalOriginLon",Double.toString(naturalOriginLon));
  }
  if (!Double.isNaN(naturalOriginLat)) {
    properties.setProperty("ProjectionInfo.NaturalOriginLat",Double.toString(naturalOriginLat));
  }
  if (!Double.isNaN(falseOriginLon)) {
    properties.setProperty("ProjectionInfo.FalseOriginLon",Double.toString(falseOriginLon));
  }
  if (!Double.isNaN(falseOriginLat)) {
    properties.setProperty("ProjectionInfo.FalseOriginLat",Double.toString(falseOriginLat));
  }
  if (!Double.isNaN(falseEasting)) {
    properties.setProperty("ProjectionInfo.FalseEasting",Double.toString(falseEasting));
  }
  if (!Double.isNaN(falseNorthing)) {
    properties.setProperty("ProjectionInfo.FalseNorthing",Double.toString(falseNorthing));
  }
  if (!Double.isNaN(centerEasting)) {
    properties.setProperty("ProjectionInfo.CenterEasting",Double.toString(centerEasting));
  }
  if (!Double.isNaN(centerNorthing)) {
    properties.setProperty("ProjectionInfo.CenterNorthing",Double.toString(centerNorthing));
  }
  if (!Double.isNaN(centerLon)) {
    properties.setProperty("ProjectionInfo.CenterLon",Double.toString(centerLon));
  }
  if (!Double.isNaN(centerLat)) {
    properties.setProperty("ProjectionInfo.CenterLat",Double.toString(centerLat));
  }
  if (!Double.isNaN(scaleAtNaturalOrigin)) {
    properties.setProperty("ProjectionInfo.ScaleAtNaturalOrigin",Double.toString(scaleAtNaturalOrigin));
  }
  if (!Double.isNaN(scaleAtCenter)) {
    properties.setProperty("ProjectionInfo.ScaleAtCenter",Double.toString(scaleAtCenter));
  }
  if (!Double.isNaN(azimuth)) {
    properties.setProperty("ProjectionInfo.Azimuth",Double.toString(azimuth));
  }
  if (!Double.isNaN(straightVertPoleLon)) {
    properties.setProperty("ProjectionInfo.StraightVertPoleLon",Double.toString(straightVertPoleLon));
  }
  if (gcsCitation != null) {
    properties.setProperty("ProjectionInfo.GCSCitation",gcsCitation);
  }
  if (pcsCitation != null) {
    properties.setProperty("ProjectionInfo.PCSCitation",pcsCitation);
  }
}

public void saveToProperties ( Properties properties ) { properties . setProperty ( "ProjectionInfo.Projected" , Boolean . toString ( projected ) ) ; properties . setProperty ( "ProjectionInfo.TiePoint" , StringUtil . doubleArrayToString ( tiePoint ) ) ; properties . setProperty ( "ProjectionInfo.Scale" , StringUtil . doubleArrayToString ( scale ) ) ; if ( globe == null ) { globe = LayerFactory . defaultGlobe ; } properties . setProperty ( "ProjectionInfo.Globe" , globe ) ; properties . setProperty ( "ProjectionInfo.RasterWidth" , Integer . toString ( rasterWidth ) ) ; properties . setProperty ( "ProjectionInfo.RasterLength" , Integer . toString ( rasterLength ) ) ; properties . setProperty ( "ProjectionInfo.ProjLinearUnits" , projLinearUnits ) ; if ( datumCode > 0 ) { properties . setProperty ( "ProjectionInfo.DatumCode" , Integer . toString ( datumCode ) ) ; } if ( ellipsoidCode > 0 ) { properties . setProperty ( "ProjectionInfo.EllipsoidCode" , Integer . toString ( ellipsoidCode ) ) ; } if ( ! Double . isNaN ( semiMajorAxis ) ) { properties . setProperty ( "ProjectionInfo.SemiMajorAxis" , Double . toString ( semiMajorAxis ) ) ; } if ( ! Double . isNaN ( semiMinorAxis ) ) { properties . setProperty ( "ProjectionInfo.SemiMinorAxis" , Double . toString ( semiMinorAxis ) ) ; } if ( ! Double . isNaN ( inverseFlattening ) ) { properties . setProperty ( "ProjectionInfo.InverseFlattening" , Double . toString ( inverseFlattening ) ) ; } if ( ! Double . isNaN ( gcsPrimeMeridianLon ) ) { properties . setProperty ( "ProjectionInfo.GCSPrimeMeridianLon" , Double . toString ( gcsPrimeMeridianLon ) ) ; } if ( projCode > 0 ) { properties . setProperty ( "ProjectionInfo.ProjectionCode" , Integer . toString ( projCode ) ) ; } if ( pcsCode > 0 ) { properties . setProperty ( "ProjectionInfo.ProjectionCoordinateSystemCode" , Integer . toString ( pcsCode ) ) ; } if ( coordTransformCode > 0 ) { properties . setProperty ( "ProjectionInfo.CoordTransformCode" , Integer . toString ( coordTransformCode ) ) ; } if ( ! Double . isNaN ( stdParallel1 ) ) { properties . setProperty ( "ProjectionInfo.StdParallel1" , Double . toString ( stdParallel1 ) ) ; } if ( ! Double . isNaN ( stdParallel2 ) ) { properties . setProperty ( "ProjectionInfo.StdParallel2" , Double . toString ( stdParallel2 ) ) ; } if ( ! Double . isNaN ( naturalOriginLon ) ) { properties . setProperty ( "ProjectionInfo.NaturalOriginLon" , Double . toString ( naturalOriginLon ) ) ; } if ( ! Double . isNaN ( naturalOriginLat ) ) { properties . setProperty ( "ProjectionInfo.NaturalOriginLat" , Double . toString ( naturalOriginLat ) ) ; } if ( ! Double . isNaN ( falseOriginLon ) ) { properties . setProperty ( "ProjectionInfo.FalseOriginLon" , Double . toString ( falseOriginLon ) ) ; } if ( ! Double . isNaN ( falseOriginLat ) ) { properties . setProperty ( "ProjectionInfo.FalseOriginLat" , Double . toString ( falseOriginLat ) ) ; } if ( ! Double . isNaN ( falseEasting ) ) { properties . setProperty ( "ProjectionInfo.FalseEasting" , Double . toString ( falseEasting ) ) ; } if ( ! Double . isNaN ( falseNorthing ) ) { properties . setProperty ( "ProjectionInfo.FalseNorthing" , Double . toString ( falseNorthing ) ) ; } if ( ! Double . isNaN ( centerEasting ) ) { properties . setProperty ( "ProjectionInfo.CenterEasting" , Double . toString ( centerEasting ) ) ; } if ( ! Double . isNaN ( centerNorthing ) ) { properties . setProperty ( "ProjectionInfo.CenterNorthing" , Double . toString ( centerNorthing ) ) ; } if ( ! Double . isNaN ( centerLon ) ) { properties . setProperty ( "ProjectionInfo.CenterLon" , Double . toString ( centerLon ) ) ; } if ( ! Double . isNaN ( centerLat ) ) { properties . setProperty ( "ProjectionInfo.CenterLat" , Double . toString ( centerLat ) ) ; } if ( ! Double . isNaN ( scaleAtNaturalOrigin ) ) { properties . setProperty ( "ProjectionInfo.ScaleAtNaturalOrigin" , Double . toString ( scaleAtNaturalOrigin ) ) ; } if ( ! Double . isNaN ( scaleAtCenter ) ) { properties . setProperty ( "ProjectionInfo.ScaleAtCenter" , Double . toString ( scaleAtCenter ) ) ; } if ( ! Double . isNaN ( azimuth ) ) { properties . setProperty ( "ProjectionInfo.Azimuth" , Double . toString ( azimuth ) ) ; } if ( ! Double . isNaN ( straightVertPoleLon ) ) { properties . setProperty ( "ProjectionInfo.StraightVertPoleLon" , Double . toString ( straightVertPoleLon ) ) ; } if ( gcsCitation != null ) { properties . setProperty ( "ProjectionInfo.GCSCitation" , gcsCitation ) ; } if ( pcsCitation != null ) { properties . setProperty ( "ProjectionInfo.PCSCitation" , pcsCitation ) ; } }
save contents to a properties object .
