Package org.geotools.referencing.operation.projection

Examples of org.geotools.referencing.operation.projection.MapProjection$CheckPoint


    // looking for the parameters
    String name = method.getName().getCode();
    name = name.trim();
    name = name.replace(' ', '_');
    final MathTransform mt = conversion.getMathTransform();
    final MapProjection projTransf;
    if (!(mt instanceof ConcatenatedTransform))
      projTransf = (MapProjection) mt;
    else {
      final ConcatenatedTransform tr = (ConcatenatedTransform) mt;
      final MathTransform m1 = tr.transform1, m2 = tr.transform2;
View Full Code Here


* @source $URL$
*/
public class PolarStereographicHandlerFactory implements ProjectionHandlerFactory {

    public ProjectionHandler getHandler(ReferencedEnvelope renderingEnvelope, CoordinateReferenceSystem sourceCrs, boolean wrap, int maxWraps) throws FactoryException {
        MapProjection mapProjection = CRS.getMapProjection(renderingEnvelope
                .getCoordinateReferenceSystem());
        if (renderingEnvelope != null && mapProjection instanceof PolarStereographic) {
            boolean north;
            // variant B uses standard_parallel
            ParameterValue<?> stdParallel = null;
            try {
                stdParallel = mapProjection.getParameterValues().parameter(
                        AbstractProvider.STANDARD_PARALLEL_1.getName().getCode());
            } catch (ParameterNotFoundException e) {
                // ignore
            }
            if(stdParallel != null) {
                north = stdParallel.doubleValue() > 0;
            } else {
                // variant A uses latitude of origin
                ParameterValue<?> latOrigin = null;
                try {
                    latOrigin = mapProjection.getParameterValues().parameter(
                            AbstractProvider.LATITUDE_OF_ORIGIN.getName().getCode());
                } catch (ParameterNotFoundException e) {
                    // ignore
                }
                if(latOrigin != null) {
View Full Code Here

* @source $URL$
*/
public class TransverseMercatorHandlerFactory implements ProjectionHandlerFactory {

    public ProjectionHandler getHandler(ReferencedEnvelope renderingEnvelope, CoordinateReferenceSystem sourceCrs, boolean wrap, int maxWraps) throws FactoryException {
        MapProjection mapProjection = CRS.getMapProjection(renderingEnvelope
                .getCoordinateReferenceSystem());
        if (renderingEnvelope != null && mapProjection instanceof TransverseMercator) {
            double centralMeridian = mapProjection.getParameterValues().parameter(
                    AbstractProvider.CENTRAL_MERIDIAN.getName().getCode()).doubleValue();

            ReferencedEnvelope validArea = new ReferencedEnvelope(centralMeridian - 45,
                    centralMeridian + 45, -90, 90, DefaultGeographicCRS.WGS84);

View Full Code Here

    public ProjectionHandler getHandler(ReferencedEnvelope renderingEnvelope,
            CoordinateReferenceSystem sourceCrs, boolean wrap, int maxWraps) throws FactoryException {
        if(renderingEnvelope == null) {
            return null;
        }
        MapProjection mapProjection = CRS.getMapProjection(renderingEnvelope
                .getCoordinateReferenceSystem());
        if (mapProjection instanceof LambertAzimuthalEqualArea) {
            ParameterValueGroup params = mapProjection.getParameterValues();
            double latitudeOfCenter = params.parameter(
                    LambertAzimuthalEqualArea.Provider.LATITUDE_OF_CENTRE.getName().getCode()).doubleValue();
            double longitudeOfCenter = params.parameter(
                    LambertAzimuthalEqualArea.Provider.LONGITUDE_OF_CENTRE.getName().getCode()).doubleValue();
           
View Full Code Here

    private static final ReferencedEnvelope VALID_AREA = new ReferencedEnvelope(-Double.MAX_VALUE,
            Double.MAX_VALUE, -85, 85,
            DefaultGeographicCRS.WGS84);

    public ProjectionHandler getHandler(ReferencedEnvelope renderingEnvelope, CoordinateReferenceSystem sourceCrs, boolean wrap, int maxWraps) throws FactoryException {
        MapProjection mapProjection = CRS.getMapProjection(renderingEnvelope
                .getCoordinateReferenceSystem());
        if (renderingEnvelope != null && mapProjection instanceof Mercator) {
            ProjectionHandler handler;
            double centralMeridian = mapProjection.getParameterValues()
                    .parameter(AbstractProvider.CENTRAL_MERIDIAN.getName().getCode()).doubleValue();
            if(wrap && maxWraps > 0) {
                handler = new WrappingProjectionHandler(renderingEnvelope, VALID_AREA, sourceCrs,
                        centralMeridian, maxWraps);
            } else {
View Full Code Here

    // looking for the parameters
    String name = method.getName().getCode();
    name = name.trim();
    name = name.replace(' ', '_');
    final MathTransform mt = conversion.getMathTransform();
    final MapProjection projTransf;
    if (!(mt instanceof ConcatenatedTransform))
      projTransf = (MapProjection) mt;
    else {
      final ConcatenatedTransform tr = (ConcatenatedTransform) mt;
      final MathTransform m1 = tr.transform1, m2 = tr.transform2;
View Full Code Here

    public ProjectionHandler getHandler(ReferencedEnvelope renderingEnvelope, CoordinateReferenceSystem sourceCrs, boolean wrap, int maxWraps) throws FactoryException {
        if(renderingEnvelope == null) {
            return null;
        }
           
        MapProjection mapProjection = CRS.getMapProjection(renderingEnvelope
                .getCoordinateReferenceSystem());
        if(mapProjection instanceof LambertConformal || mapProjection instanceof EquidistantConic) {
            ParameterValueGroup params = mapProjection.getParameterValues();
            double centralMeridian = params.parameter(
                    AbstractProvider.CENTRAL_MERIDIAN.getName().getCode()).doubleValue();
            double minLat , maxLat;

            double latitudeOrigin;
View Full Code Here

    private static MapProjection unrollProjection(MathTransform mt) {
        if(mt instanceof MapProjection) {
            return (MapProjection) mt;
        } else if(mt instanceof ConcatenatedTransform) {
            ConcatenatedTransform ct = (ConcatenatedTransform) mt;
            MapProjection result = unrollProjection(ct.transform1);
            if(result == null) {
                result = unrollProjection(ct.transform2);
            }
            return result;
        } else {
View Full Code Here

        final CoordinateReferenceSystem targetCRS = operation.getTargetCRS();
        if (targetCRS == null) {
            return transformed;
        }
        GeneralEnvelope generalEnvelope = toGeneralEnvelope(envelope);
        MapProjection sourceProjection = CRS.getMapProjection(sourceCRS);
        if (sourceProjection instanceof PolarStereographic) {
            PolarStereographic ps = (PolarStereographic) sourceProjection;
            ParameterValue<?> fe = ps.getParameterValues().parameter(
                    MapProjection.AbstractProvider.FALSE_EASTING.getName().getCode());
            double originX = fe.doubleValue();
View Full Code Here

            return first;
        }

        // special case for crs that do wrap, we have to roll one of the coverages
        CoordinateReferenceSystem crs = first.getCoordinateReferenceSystem2D();
        MapProjection mapProjection = CRS.getMapProjection(crs);
        if (crs instanceof GeographicCRS || mapProjection instanceof Mercator) {
            double offset;
            if (crs instanceof GeographicCRS) {
                offset = 360;
            } else {
View Full Code Here

TOP

Related Classes of org.geotools.referencing.operation.projection.MapProjection$CheckPoint

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.