Package org.opengis.referencing.crs

Examples of org.opengis.referencing.crs.SingleCRS


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


        try {
            CoordinateReferenceSystem crs = getNativeCRS(schema, attributes);
            if(crs != null) {
                Set<RenderingHints.Key> fsHints = source.getSupportedHints();
               
                SingleCRS crs2D = crs == null ? null : CRS.getHorizontalCRS(crs);
                MathTransform mt = buildFullTransform(crs2D, mapCRS, worldToScreenTransform);
                double[] spans = Decimator.computeGeneralizationDistances(mt.inverse(), screenSize, generalizationDistance);
                double distance = spans[0] < spans[1] ? spans[0] : spans[1];
                for (LiteFeatureTypeStyle fts : styles) {
                    if(fts.screenMap != null) {
View Full Code Here

    }

    @Test
    public void testWrappingOn3DCRS() throws Exception {
        CoordinateReferenceSystem crs = CRS.decode("EPSG:4939", true);
        SingleCRS hcrs = CRS.getHorizontalCRS(crs);
        ReferencedEnvelope wgs84Envelope = new ReferencedEnvelope(-190, 60, -90, 45,
                hcrs);
        ProjectionHandler handler = ProjectionHandlerFinder.getHandler(wgs84Envelope, crs, true);

        assertNull(handler.validAreaBounds);
View Full Code Here

        DefaultLinearCS lightCS = new DefaultLinearCS("light", csAxis);
        Map<String, Object> datumProperties = new HashMap<String, Object>();
        datumProperties.put("name", "light");

        EngineeringDatum lightDatum = new DefaultEngineeringDatum(datumProperties);
        SingleCRS lightCRS = new DefaultEngineeringCRS("wave length", lightDatum, lightCS);

        List<Measure<Code, Dimensionless>> keys = CodeMeasure.valueOf(codes);

        DefaultAxis<Code, Dimensionless> axis = new DefaultAxis<Code, Dimensionless>(new NameImpl(
                "Bands"), new SimpleInternationalString("Expressed in wavelengths"), keys,
View Full Code Here

                 * We do not assign WGS84 inconditionnaly to the geographic bounding box, because
                 * it is not defined to be on a particular datum; it is only approximative bounds.
                 * We try to get the GeographicCRS from the user-supplied CRS and fallback on WGS
                 * 84 only if we found none.
                 */
                final SingleCRS     targetCRS = getHorizontalCRS(crs);
                final GeographicCRS sourceCRS = CRSUtilities.getStandardGeographicCRS2D(targetCRS);
                merged.setCoordinateReferenceSystem(sourceCRS);
                try {
                    envelope = transform(envelope, targetCRS);
                } catch (TransformException exception) {
View Full Code Here

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

                        .getDimension()) {
            return getFactory(extraData).bbox(filter.getExpression1(),
                    ReferencedEnvelope.create(filter.getBounds(), defaultCrs));
        } else {
            try {
                SingleCRS horizontalCRS = CRS.getHorizontalCRS(defaultCrs);
                ReferencedEnvelope bounds = ReferencedEnvelope.create(filter.getBounds(),
                        horizontalCRS);
                return getFactory(extraData).bbox(filter.getExpression1(), bounds);
            } catch (Exception e) {
                throw new RuntimeException("Could not decode srs '" + srs + "'", e);
View Full Code Here

    if(crs == null) {
      return mt.doubleValue();
    }
   
    // let's get the target unit
    SingleCRS horizontalCRS = CRS.getHorizontalCRS(crs);
    Unit targetUnit;
    if(horizontalCRS != null) {
      // leap of faith, the first axis is an horizontal one (
      targetUnit = getFirstAxisUnit(horizontalCRS.getCoordinateSystem());
    } else {
      // leap of faith, the first axis is an horizontal one (
      targetUnit = getFirstAxisUnit(crs.getCoordinateSystem());
    }
   
View Full Code Here

TOP

Related Classes of org.opengis.referencing.crs.SingleCRS

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.