Package org.osgeo.proj4j.datum

Examples of org.osgeo.proj4j.datum.Datum


    // if ellipsoid was WGS84, return that datum
    if (ellipsoid == Ellipsoid.WGS84)
      return Datum.WGS84;
   
    // otherwise, return a custom datum with the specified ellipsoid
    return new Datum("User", datumTransform, getEllipsoid(), "User-defined");
  }
View Full Code Here


     *
     * @return a geographic CoordinateReferenceSystem based on the datum of this CRS
     */
    public CoordinateReferenceSystem createGeographic()
    {
        Datum datum = getDatum();
        Projection geoProj = new LongLatProjection();
        geoProj.setEllipsoid(getProjection().getEllipsoid());
        geoProj.setUnits(Units.DEGREES);
        geoProj.initialize();
        return new CoordinateReferenceSystem("GEO-" + datum.getCode(), null, datum, geoProj);
    }
View Full Code Here

    Map params = createParameterMap(args);
    Proj4Keyword.checkUnsupported(params.keySet());
    DatumParameters datumParam = new DatumParameters();
    parseDatum(params, datumParam);
    parseEllipsoid(params, datumParam);
    Datum datum = datumParam.getDatum();
    Ellipsoid ellipsoid = datum.getEllipsoid();
    // TODO: this makes a difference - why?
    // which is better?
//    Ellipsoid ellipsoid = datumParam.getEllipsoid();
    Projection proj = parseProjection(params, ellipsoid);
    return new CoordinateReferenceSystem(name, args, datum, proj);
View Full Code Here

     datumParam.setDatumTransform(datumConvParams);
   }

   String code = (String) params.get(Proj4Keyword.datum);
   if (code != null) {
     Datum datum = registry.getDatum(code);
     if (datum == null)
       throw new InvalidValueException("Unknown datum: " + code);
     datumParam.setDatum(datum);
   }
  
View Full Code Here

TOP

Related Classes of org.osgeo.proj4j.datum.Datum

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.