Package org.geotools.util

Examples of org.geotools.util.SimpleInternationalString


          responsibleParty.setIndividualName(name);
        }
       
        if (sameName(elems[1], value[i])) {
          String organization = (String) value[i].getValue();
          responsibleParty.setOrganisationName(new SimpleInternationalString(organization));
        }
      }
     
      return responsibleParty;
    }
View Full Code Here


          address.setDeliveryPoints(Collections.singleton(address1));
        }
       
        if (sameName(elems[2], value[i])) {
          String city = (String) value[i].getValue();
          address.setCity(new SimpleInternationalString(city));
        }
       
        if (sameName(elems[3], value[i])) {
          String state = (String) value[i].getValue();
          address.setAdministrativeArea(new SimpleInternationalString(state));
        }
       
        if (sameName(elems[4], value[i])) {
          String postalCode = (String) value[i].getValue();
          address.setPostalCode(postalCode);
        }
       
        if (sameName(elems[5], value[i])) {
          String country = (String) value[i].getValue();
          address.setCountry(new SimpleInternationalString(country));
        }
      }
     
      return address;
    }
View Full Code Here

        unset = false;
        return this;
    }

    public DescriptionBuilder title(String title) {
        return title(new SimpleInternationalString(title));
    }
View Full Code Here

        unset = false;
        return this;
    }

    public DescriptionBuilder description(String description) {
        return description(new SimpleInternationalString(description));
    }
View Full Code Here

     * This test uses use the default implementations to express 7 bands of a landsat image.
     */
    @Test
    public void testLandsatAxis() {
        CoordinateSystemAxis csAxis = new DefaultCoordinateSystemAxis(
                new SimpleInternationalString("light"), "light", AxisDirection.OTHER,
                SI.MICRO(SI.METER));

        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,
                Unit.ONE, lightCRS);

        assertEquals(lightCRS, axis.getCoordinateReferenceSystem());
        assertEquals(7, axis.getKeys().size());
       
View Full Code Here

        // Creation of a default field type
        Set<SampleDimension> sampleDims = new HashSet<SampleDimension>();
        GridSampleDimension sampleDim = new GridSampleDimension("test");
        sampleDims.add(sampleDim);
        NameImpl name = new NameImpl("test");
        SimpleInternationalString description = new SimpleInternationalString("test");
        FieldType fieldType = new DefaultFieldType(name, description, sampleDims);
       
        // Getting the input data and checking if they are equals
        assertSame(name, fieldType.getName());
        assertSame(description, fieldType.getDescription());
        assertTrue(fieldType.getSampleDimensions().contains(sampleDim));
       
        // Creation of a RangeType
        RangeType rangeType = new DefaultRangeType("test", "test", fieldType);
       
        assertTrue(rangeType.getName().equals(name));
        assertTrue(description.compareTo(rangeType.getDescription()) == 0);
        assertEquals(1, rangeType.getNumFieldTypes());
        assertSame(fieldType, rangeType.getFieldType("test"));
       
        Set<Name> names = rangeType.getFieldTypeNames();
        assertNotNull(names);
View Full Code Here

     * This test uses use the default implementations to express 7 bands of a landsat image.
     */
    @Test
    public void testLandsatAxis() {
        CoordinateSystemAxis csAxis = new DefaultCoordinateSystemAxis(
                new SimpleInternationalString("light"), "light", AxisDirection.OTHER,
                SI.MICRO(SI.METER));

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

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

        List<Measure<Band, Dimensionless>> keys = EnumMeasure.valueOf(Band.class);

        DefaultAxis<Band, Dimensionless> axis = new DefaultAxis<Band, Dimensionless>(new NameImpl(
                "Bands"), new SimpleInternationalString("Landsat bands by wavelength"), keys,
                Unit.ONE);

        Map<Measure<Integer, Dimensionless>, SampleDimension> samples = new HashMap<Measure<Integer, Dimensionless>, SampleDimension>();
       
        // Ensure that the equals method is correct
View Full Code Here

     * an open ended data dictionary consider a CodeList (and CodeMeasure).
     */
    @Test
    public void testTOY() {
        DimensionlessAxis TOY = new DimensionlessAxis(new String[] { "A", "B", "C" }, new NameImpl(
                "Color"), new SimpleInternationalString("Toy Example"));

        assertEquals(Unit.ONE, TOY.getUnitOfMeasure());
        BandIndexMeasure key = TOY.getKey(0);
        assertEquals("A", key.getValue());
        assertNull(TOY.getCoordinateReferenceSystem());
View Full Code Here

     * Depth represented as an axis of one band
     */
    @Test
    public void testElevation() {
        DimensionlessAxis HEIGHT = new DimensionlessAxis(1, new NameImpl("height"),
                new SimpleInternationalString("Height from sealevel"));
        assertEquals(Unit.ONE, HEIGHT.getUnitOfMeasure());
        BandIndexMeasure key = HEIGHT.getKey(0);
        assertEquals("0", key.getValue());

        // Make sure we can discover everything we need via the Axis API
View Full Code Here

                GeoTools.getDefaultHints());
        // Axis creation
        DimensionlessAxis sample = DimensionlessAxis.createFromRenderedImage(constant);
        // Minor checks
        assertTrue(sample.getName().equals(new NameImpl("GRAY-AXIS")));
        assertTrue(sample.getDescription().compareTo(new SimpleInternationalString("Axis for GRAY bands")) == 0);
        assertNotNull(sample.getKeys());
        BandIndexMeasure band = sample.getKey(0);
        assertTrue(band != null);
        constant.dispose();
    }
View Full Code Here

TOP

Related Classes of org.geotools.util.SimpleInternationalString

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.