Package org.apache.sis.io.wkt

Examples of org.apache.sis.io.wkt.Convention.majorVersion()


     * @return {@code "Axis"}.
     */
    @Override
    protected String formatTo(final Formatter formatter) {
        final Convention convention = formatter.getConvention();
        final boolean isWKT1 = convention.majorVersion() == 1;
        final boolean isInternal = (convention == Convention.INTERNAL);
        String name = null;
        if (isWKT1 || isInternal || !omitName(formatter)) {
            name = IdentifiedObjects.getName(this, formatter.getNameAuthority());
            if (name == null) {
View Full Code Here


    protected String formatTo(final Formatter formatter) {
        super.formatTo(formatter);
        final Convention convention = formatter.getConvention();
        if (convention == Convention.INTERNAL) {
            formatter.append(MetadataUtilities.toDate(origin)); // This is an extension compared to ISO 19162.
        } else if (convention.majorVersion() == 1) {
            formatter.setInvalidWKT(this, null);
        }
        return "TimeDatum";
    }
}
View Full Code Here

    protected String formatTo(final Formatter formatter) {
        super.formatTo(formatter);
        final Convention convention = formatter.getConvention();
        if (convention == Convention.INTERNAL) {
            formatter.append(pixelInCell); // This is an extension compared to ISO 19162.
        } else if (convention.majorVersion() == 1) {
            formatter.setInvalidWKT(this, null);
        }
        return "ImageDatum";
    }
}
View Full Code Here

                cs = citation;
                citation  = null;
            }
            if (cs != null) {
                final Convention convention = formatter.getConvention();
                if (convention.majorVersion() == 1) {
                    keyword = "Authority";
                    formatter.append(cs, ElementKind.IDENTIFIER);
                    formatter.append(code, ElementKind.IDENTIFIER);
                } else {
                    keyword = "Id";
View Full Code Here

    @Override
    protected String formatTo(final Formatter formatter) {
        WKTUtilities.appendName(descriptor, formatter, ElementKind.PARAMETER);
        final Unit<?> targetUnit = formatter.toContextualUnit(descriptor.getUnit());
        final Convention convention = formatter.getConvention();
        final boolean isWKT1 = convention.majorVersion() == 1;
        if (isWKT1 && targetUnit != null) {
            double convertedValue;
            try {
                convertedValue = doubleValue(targetUnit);
            } catch (IllegalStateException exception) {
View Full Code Here

     */
    @Override
    protected String formatTo(final Formatter formatter) {
        super.formatTo(formatter);
        final Convention convention = formatter.getConvention();
        final boolean isWKT1 = convention.majorVersion() == 1;
        Unit<Angle> targetUnit = formatter.toContextualUnit(NonSI.DEGREE_ANGLE);
        if (targetUnit == null) {
            targetUnit = NonSI.DEGREE_ANGLE;
        }
        formatter.append(isWKT1 ? getGreenwichLongitude(targetUnit) : greenwichLongitude);
View Full Code Here

     */
    @Override
    protected String formatTo(final Formatter formatter) {
        WKTUtilities.appendName(this, formatter, null);
        final Convention convention = formatter.getConvention();
        final boolean isWKT1 = convention.majorVersion() == 1;
        for (final CoordinateReferenceSystem element :
                (isWKT1 || convention == Convention.INTERNAL) ? components : singles)
        {
            formatter.newLine();
            formatter.append(toFormattable(element));
View Full Code Here

     */
    @Override
    protected String formatTo(final Formatter formatter) {
        super.formatTo(formatter);
        final Convention convention = formatter.getConvention();
        final boolean isWKT1 = convention.majorVersion() == 1;
        double length = semiMajorAxis;
        if (isWKT1) {
            length = unit.getConverterTo(SI.METRE).convert(length);
        }
        formatter.append(length);
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.