Package org.geotools.referencing.operation

Examples of org.geotools.referencing.operation.DefiningConversion


                MathTransform mt = projection.getMathTransform();
                mt = mtFactory.createConcatenatedTransform(
                     mtFactory.createConcatenatedTransform(
                     mtFactory.createAffineTransform(prepend), mt),
                     mtFactory.createAffineTransform(append));
                projection = new DefiningConversion(AbstractCS.getProperties(projection),
                                                    projection.getMethod(), mt);
            }
            return crsFactory.createProjectedCRS(crsName, base3D, projection, targetCS);
        }
        // Should never happen.
View Full Code Here


                 */
                final CoordinateOperation operation;
                if (isConversion && (sourceCRS==null || targetCRS==null)) {
                    // Note: we usually can't resolve sourceCRS and targetCRS because there
                    // is many of them for the same coordinate operation (projection) code.
                    operation = new DefiningConversion(properties, method, parameters);
                } else if (isConcatenated) {
                    /*
                     * Concatenated operation: we need to close the current result set, because
                     * we are going to invoke this method recursively in the following lines.
                     *
 
View Full Code Here

      // //
      //
      // Creating a new projected CRS replacing the CS unit
      //
      // //
      final Conversion conversionFromBase=new DefiningConversion(
              pcrs.getConversionFromBase().getName().getCode(),
              pcrs.getConversionFromBase().getParameterValues());
      return new DefaultProjectedCRS(
              java.util.Collections.singletonMap("name",DefaultEllipsoidalCS.getName(pcrs,new CitationImpl("EPSG"))),
              conversionFromBase,
View Full Code Here

                  // create math transform
                  transform = mtFactory.createParameterizedTransform(parameters);
                       
                       
      // create the conversion from base, aka the projection transform
      conversionFromBase= new DefiningConversion(
              Collections.singletonMap("name", cleanName(projectionName)),
              new DefaultOperationMethod(transform),
              transform);
    } else {
        // create the conversion from EPSG code
View Full Code Here

    parameters.parameter("central_meridian").setValue(-111.0);
    parameters.parameter("latitude_of_origin").setValue(0.0);
    parameters.parameter("scale_factor").setValue(0.9996);
    parameters.parameter("false_easting").setValue(500000.0);
    parameters.parameter("false_northing").setValue(0.0);
    Conversion conversion = new DefiningConversion("Transverse_Mercator", parameters);
   
    Map<String, ?> properties = Collections.singletonMap("name", "WGS 84 / UTM Zone 12N");
    ProjectedCRS projCRS = crsFactory.createProjectedCRS(properties, geoCRS, conversion, cartCS);
    // createCRSByHand1 end
   
View Full Code Here

                 */
                final CoordinateOperation operation;
                if (isConversion && (sourceCRS==null || targetCRS==null)) {
                    // Note: we usually can't resolve sourceCRS and targetCRS because there
                    // is many of them for the same coordinate operation (projection) code.
                    operation = new DefiningConversion(properties, method, parameters);
                } else if (isConcatenated) {
                    /*
                     * Concatenated operation: we need to close the current result set, because
                     * we are going to invoke this method recursively in the following lines.
                     *
 
View Full Code Here

        final String classification = getClassification();
        final ParameterValueGroup parameters;
        parameters = factories.getMathTransformFactory().getDefaultParameters(classification);
        setProjectionParameters(parameters, code);
        final String name = getName();
        final DefiningConversion conversion = new DefiningConversion(name, parameters);
        return factories.getCRSFactory().createProjectedCRS(
                Collections.singletonMap(IdentifiedObject.NAME_KEY, name),
                DefaultGeographicCRS.WGS84, conversion, DefaultCartesianCS.PROJECTED);
    }
View Full Code Here

            }
            final Map<String,?> properties = getProperties(crs);
            final ReferencingFactoryContainer factories = getFactoryContainer(true);
            final CRSFactory crsFactory = factories.getCRSFactory();
            Conversion fromBase = derivedCRS.getConversionFromBase();
            fromBase = new DefiningConversion(getProperties(fromBase),
                    fromBase.getMethod(), fromBase.getParameterValues());
            if (crs instanceof ProjectedCRS) {
                modified = crsFactory.createProjectedCRS(properties,
                        (GeographicCRS) baseCRS, fromBase, (CartesianCS) cs);
            } else {
View Full Code Here

                // Those default values are part of WKT specification.
                axis0 = createAxis(null, "X", AxisDirection.EAST,  linearUnit);
                axis1 = createAxis(null, "Y", AxisDirection.NORTH, linearUnit);
            }
            element.close();
            final Conversion conversion = new DefiningConversion(name, projection);
            return crsFactory.createProjectedCRS(properties, geoCRS, conversion,
                    csFactory.createCartesianCS(properties, axis0, axis1));
        } catch (FactoryException exception) {
            throw element.parseFailed(exception, null);
        }
View Full Code Here

                buffer.append(number);
                axis[i] = csFactory.createCoordinateSystemAxis(
                    singletonMap(IdentifiedObject.NAME_KEY, buffer.toString()),
                    number, AxisDirection.OTHER, Unit.ONE);
            }
            final Conversion conversion = new DefiningConversion(
                    singletonMap(IdentifiedObject.NAME_KEY, method.getName().getCode()),
                    method, toBase.inverse());
            final CoordinateSystem cs = new AbstractCS(properties, axis);
            return crsFactory.createDerivedCRS(properties, base, conversion, cs);
        } catch (FactoryException exception) {
View Full Code Here

TOP

Related Classes of org.geotools.referencing.operation.DefiningConversion

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.