Examples of ProjectedCRS


Examples of org.opengis.referencing.crs.ProjectedCRS

            return (ProjectedCRS) crs;
        }
        if (crs instanceof CompoundCRS) {
            final CompoundCRS cp = (CompoundCRS) crs;
            for (final CoordinateReferenceSystem c : cp.getCoordinateReferenceSystems()) {
                final ProjectedCRS candidate = getProjectedCRS(c);
                if (candidate != null) {
                    return candidate;
                }
            }
        }
View Full Code Here

Examples of org.opengis.referencing.crs.ProjectedCRS

     * be found.
     * @param crs The coordinate reference system, or {@code null}.
     * @return The {@link MapProjection}, or {@code null} if none.
     */
    public static MapProjection getMapProjection(final CoordinateReferenceSystem crs) {
        ProjectedCRS projectedCRS = CRS.getProjectedCRS(crs);
        if(projectedCRS == null)
            return null;
       
        Projection conversion = projectedCRS.getConversionFromBase();
        MathTransform mt = conversion.getMathTransform();
        return unrollProjection(mt);
    }
View Full Code Here

Examples of org.opengis.referencing.crs.ProjectedCRS

     */
    static boolean isXYOriented(CoordinateReferenceSystem crs) {
        CoordinateSystem cs = null;

        if (crs instanceof ProjectedCRS) {
            ProjectedCRS pcrs = (ProjectedCRS) crs;
            cs = pcrs.getBaseCRS().getCoordinateSystem();
        } else if (crs instanceof GeographicCRS) {
            cs = crs.getCoordinateSystem();
        } else {
            return true;
        }
View Full Code Here

Examples of org.opengis.referencing.crs.ProjectedCRS

    return crs;
  }

  public ProjectedCRS createProjectedCRS(String code) throws FactoryException {
    final String key = toKey(code);
    ProjectedCRS crs = (ProjectedCRS) cache.get(key);
    if (crs == null) {
      try {
        cache.writeLock(key);
        crs = (ProjectedCRS) cache.peek(key);
        if (crs == null) {
View Full Code Here

Examples of org.opengis.referencing.crs.ProjectedCRS

    return crs;
  }

  public ProjectedCRS createProjectedCRS(String code) throws FactoryException {
    final String key = toKey(code);
    ProjectedCRS crs = (ProjectedCRS) cache.get(key);
    if (crs == null) {
      try {
        cache.writeLock(key);
        crs = (ProjectedCRS) cache.peek(key);
        if (crs == null) {
View Full Code Here

Examples of org.opengis.referencing.crs.ProjectedCRS

    try {
      if (!tempCode.startsWith("EPSG") && !tempCode.startsWith("epsg")) {
        projCode.insert(0, "EPSG:");
      }
      // it is an EPSG crs let's create it.
      final ProjectedCRS pcrs = (ProjectedCRS) CRS.decode(projCode
          .toString(), true);
      // //
      //
      // We have nothing to do with the unit of measure
      //
      // //
      if (linearUnit == null
          || linearUnit.equals(pcrs.getCoordinateSystem().getAxis(0)
              .getUnit()))
        return pcrs;
      // //
      //
      // Creating anew projected CRS
      //
      // //
      return new DefaultProjectedCRS(
                                        java.util.Collections.singletonMap("name",
                                        DefaultEllipsoidalCS.getName(pcrs,
          new CitationImpl("EPSG"))), pcrs.getConversionFromBase()
          .getMethod(), (GeographicCRS) pcrs.getBaseCRS(), pcrs
          .getConversionFromBase().getMathTransform(),
          createProjectedCS(linearUnit));
    } catch (FactoryException fe) {
      final IOException ex = new GeoTiffException(metadata, fe
          .getLocalizedMessage(), fe);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.