Examples of CoordinateConverter


Examples of com.cumulocity.me.rest.convert.inventory.CoordinateConverter

    public static void registerConverters() {
        SecondFragmentConverter fragmentConverter = new SecondFragmentConverter();
        platform.getConversionService().register(fragmentConverter);
        platform.getValidationService().register(fragmentConverter);
       
        CoordinateConverter coordinateConverter = new CoordinateConverter();
        platform.getConversionService().register(coordinateConverter);
        platform.getValidationService().register(coordinateConverter);
       
        ThreePhaseElectricitySensorConverter sensorConverter = new ThreePhaseElectricitySensorConverter();
        platform.getConversionService().register(sensorConverter);
View Full Code Here

Examples of com.cumulocity.me.rest.convert.inventory.CoordinateConverter

    public static void registerConverters() {
        SecondFragmentConverter fragmentConverter = new SecondFragmentConverter();
        platform.getConversionService().register(fragmentConverter);
        platform.getValidationService().register(fragmentConverter);
       
        CoordinateConverter coordinateConverter = new CoordinateConverter();
        platform.getConversionService().register(coordinateConverter);
        platform.getValidationService().register(coordinateConverter);
       
        ThreePhaseElectricitySensorConverter sensorConverter = new ThreePhaseElectricitySensorConverter();
        platform.getConversionService().register(sensorConverter);
View Full Code Here

Examples of com.volantis.mcs.layouts.spatial.CoordinateConverter

        FormatStylingEngine formatStylingEngine =
                context.getFormatStylingEngine();
        Styles formatStyles = formatStylingEngine.startStyleable(
                spatial, spatial.getStyleClass());

        CoordinateConverter converter = chooseCoordinateConverter(
                context, instance, spatial, formatStyles);

        render(context, instance, formatStyles, converter);

        formatStylingEngine.endStyleable(spatial);
View Full Code Here

Examples of fi.luomus.commons.utils.CoordinateConverter

    System.out.println();
  }

  private static void coordinateConverterExample() {
    try {
      CoordinateConverter converter = new CoordinateConverter();
      converter.setYht_leveys("6666666");
      converter.setYht_pituus("3333333");
      converter.convert();
      System.out.println();
      System.out.println("Uniform: 6666666 : 3333333 -> EUREF: " + converter.getEur_leveys() + " : " + converter.getEur_pituus());
      System.out.println();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

Examples of fi.luomus.commons.utils.CoordinateConverter

   
    private CoordinateConverter  converter;
   
    @Override
    protected void setUp() throws Exception {
      converter = new CoordinateConverter();
    }
View Full Code Here

Examples of jsky.coords.CoordinateConverter

     * @param offset the index in the coords array of of the first value to convert
     * @param length the number of values to convert and include in the result
     * @return screen coordinate array of size "length"
     */
    protected double[] imageToScreenCoords(double[] coords, int offset, int length) {
        CoordinateConverter coordinateConverter = imageDisplay.getCoordinateConverter();
        double[] c = new double[length];
        Point2D.Double p = new Point2D.Double();

        for (int i = 0; i < length; i += 2) {
            p.x = coords[i + offset];
            p.y = coords[i + offset + 1];
            coordinateConverter.imageToScreenCoords(p, false);
            c[i] = p.x;
            c[i + 1] = p.y;
        }
        return c;
    }
View Full Code Here

Examples of jsky.coords.CoordinateConverter

     * @param coords an array x,y of coordinate pairs in screen coordinates
     * @param length the number of coordinate values to process (the rest are ignored)
     * @return a string containing the coordinates separated by spaces
     */
    protected String convertCoords(double[] coords, int length) {
        CoordinateConverter coordinateConverter = imageDisplay.getCoordinateConverter();
        Point2D.Double p = new Point2D.Double();
        for (int i = 0; i < length; i += 2) {
            p.x = coords[i];
            p.y = coords[i + 1];
            coordinateConverter.screenToImageCoords(p, false);
            coords[i] = p.x;
            coords[i + 1] = p.y;
        }

        // convert to Tcl list format
View Full Code Here

Examples of jsky.coords.CoordinateConverter

    /**
     * Return a Tcl formatted (space separated) list of two image coordinate values
     * for the given screen coordinate point.
     */
    protected String getCoords(Point2D.Double p) {
        CoordinateConverter coordinateConverter = imageDisplay.getCoordinateConverter();
        coordinateConverter.screenToImageCoords(p, false);
        return Double.toString(p.getX()) + " " + Double.toString(p.getY());
    }
View Full Code Here

Examples of jsky.coords.CoordinateConverter

     * @param lat
     * @param lonLevels
     * @param latLevels
     */
    private void calcCoords(double[][] lon, double[][] lat, List<Double> lonLevels, List<Double> latLevels) {
        CoordinateConverter converter = imageDisplay.getCoordinateConverter();
        Point2D.Double p;
        double plon, plat;
        Point2D size = getCanvasPane().getSize();
        int nx = lon[0].length;
        int ny = lon.length;
        int x, y;
        for (int iy = 0; iy < ny; iy++) {
            for (int ix = 0; ix < nx; ix++) {
                x = (int) size.getX() * ix / (nx - 1);
                y = (int) size.getY() * iy / (ny - 1);
                p = new Point2D.Double(x, y);
                converter.screenToWorldCoords(p, false);
                plon = p.getX();
                plat = p.getY();
                lon[iy][ix] = plon;
                lat[iy][ix] = plat;
            }
View Full Code Here

Examples of jsky.coords.CoordinateConverter

     *
     * @param g
     */
    private void drawRadial(Graphics g) {
        double levels[] = {0.0, 45, 90.0, 135, 180.0, 215, 270.0, 305};
        CoordinateConverter converter = imageDisplay.getCoordinateConverter();
        Point2D size = getCanvasPane().getSize();
        int nx = (int) size.getX();
        int ny = (int) size.getY();
        double lon[][] = new double[ny][nx];
        double lat[][] = new double[ny][nx];
        Point2D.Double p;
        for (int iy = 0; iy < ny; iy++) {
            for (int ix = 0; ix < nx; ix++) {
                p = new Point2D.Double(ix, iy);
                converter.screenToWorldCoords(p, false);
                lon[iy][ix] = p.x;
                lat[iy][ix] = p.y;
            }
        }

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.