Examples of Projection


Examples of com.bbn.openmap.proj.Projection

        repaint();
    }

    public OMGraphic getPointIntersectionImage(OMGraphic omg) {
        Shape s = omg.getShape();
        Projection p = getProjection();
        if (s != null && p != null && omg instanceof OMPoly) {
            Rectangle r = s.getBounds();

            double x = r.getX();
            double y = r.getY();
            double h = r.getHeight();
            double w = r.getWidth();
            float[] rawll = ((OMPoly) omg).getLatLonArray();
            LatLonPoint llHolder = new LatLonPoint();
            Geo g = new Geo(0, 0);
            int[] pix = new int[(int) (h * w)];

            for (double j = 0; j < h; j++) {
                for (double i = 0; i < w; i++) {

                    boolean inShape = s.contains(i + x, j + y);
                    p.inverse((int) (i + x), (int) (j + y), llHolder);

                    g.initialize(llHolder.getLatitude(), llHolder.getLongitude());
                    boolean inGeo = Intersection.isPointInPolygon(g,
                            rawll,
                            false);
View Full Code Here

Examples of com.bbn.openmap.proj.Projection

    public void setCreatePointCheck(boolean createPointCheck) {
        this.createPointCheck = createPointCheck;
    }
   
    public void runGeoTests(int numIterations, int numToSkipAtStart) {
        Projection proj = new Mercator(new LatLonPoint(35f, -90f), 100000000, 800, 800);

        double[] results = new double[7];

        for (int i = 0; i < numIterations; i++) {

            boolean countThisIteration = (i >= numToSkipAtStart);

            long startTime = System.currentTimeMillis();
            setProjection(proj.makeClone());
            calculateIntersectionsWithDrawnList();
            long endTime = System.currentTimeMillis();
            if (countThisIteration) {
                results[0] += endTime - startTime;
            }
View Full Code Here

Examples of com.bbn.openmap.proj.Projection

        // extract the projection and check to see if it's really
        // different.
        // if it isn't then we don't need to do all the work again,
        // just
        // repaint.
        Projection proj = setProjection(e);
        if (proj == null) {
            repaint();
            return;
        }
View Full Code Here

Examples of com.google.appengine.api.datastore.Projection

    }

    @Test
    public void testProjection() {
        Query query = new Query(kindName, rootKey);
        Projection pp = new PropertyProjection("stringData", String.class);
        assertEquals("stringData", pp.getName());
        query.addProjection(pp);
        assertEquals(1, query.getProjections().size());
        pp = new PropertyProjection("intData", Integer.class);
        query.addProjection(pp);
        for (Projection p : query.getProjections()) {
View Full Code Here

Examples of com.google.gwt.maps.client.geom.Projection

  public void testProjection() {
    loadApi(new Runnable() {
      public void run() {
        initTileLayer();
        @SuppressWarnings("unused")
        Projection projection = new Projection() {

          @Override
          public Point fromLatLngToPixel(LatLng latlng, int zoomLevel) {
            return Point.newInstance(0, 0);
          }
View Full Code Here

Examples of com.jhlabs.map.proj.Projection

                throw new Error(ex);
            }
        }
       
        final Rectangle2D bnd = bounds.getBounds();
        final Projection proj = new OrthographicAzimuthalProjection();
        proj.setProjectionLongitudeDegrees(bnd.getX() + bnd.getWidth()/2);
        proj.setProjectionLatitudeDegrees(bnd.getY() + bnd.getHeight()/2);
        proj.initialize();
        return proj;
    }
View Full Code Here

Examples of comum.util.grafico.Projection

    if(comQtde){
      Date start = getDataInicioProjecaoIndicador(Pagina.getParam(request, "codIndicador"), Pagina.getParam(request, "codAri"), comQtde, soPrevisao);
      GregorianCalendar calendar = new GregorianCalendar();
      calendar.setTime(start);

      Projection myProjection = FactoryCalculoProjecao.getProjection(tipoProjecao, valuesProjection, calendar);
     
      TimeSeries projectionSerie = new TimeSeries("Projetado", Month.class);
     
      calendar.add(GregorianCalendar.MONTH,valuesProjection.size()-1);
     
      Map<GregorianCalendar,Double> projection = myProjection.getMapProjection(calendar, myProjection.getDate(previstoFinal));
     
     
      for(GregorianCalendar date: projection.keySet()){
        projectionSerie.add(new Month(date.get(GregorianCalendar.MONTH) + 1, date.get(GregorianCalendar.YEAR)), projection.get(date));
      }
View Full Code Here

Examples of de.hpi.eworld.util.Projection

      stringBuffer.append(id);
      stringBuffer.append(TEXT_3);
     
      // Perform projection of coordinates
      GlobalPosition g = node.getPosition();
      Projection p = ProjectionFactory.getInstance().getProjection(g.getLatitude(), g.getLongitude());
      double[] projected = p.projectToSUMO(g.getLongitude(), g.getLatitude());
      stringBuffer.append(projected[0]);
      stringBuffer.append(TEXT_4);
      stringBuffer.append(projected[1]);
      stringBuffer.append(TEXT_5);
      stringBuffer.append(type);
View Full Code Here

Examples of fm.last.darling.nspace.Projection

    // HBase stuff.
    byte[] rowkey = HBaseUtils.formatRowkey(point.getUnit(), point.getTimestamp());
    ImmutableBytesWritable rk = new ImmutableBytesWritable(rowkey);
    BatchUpdate update = new BatchUpdate(rowkey);

    Projection p = new Projection(point);
    update.put(p.toHBaseCFQ(), n);
    // dispatch to HBase.
    output.collect(rk, update);
  }
View Full Code Here

Examples of gistoolkit.projection.Projection

            sb.append(Double.toString( (tempEnvelope.getMinY()+tempEnvelope.getMaxY())/2 ));
            sb.append("\n\n");
        }
       
        // Projection information
        Projection tempProjection = myDisplay.getProjection();
        if (tempProjection == null){
            sb.append("Not Projected");
            sb.append("\n\n");
        }
        else{
            sb.append("Projection :");
            sb.append(tempProjection.getProjectionName());
            sb.append("\n\n");
        }
        // list the number of records visible for each layer.
        Layer[] tempLayers = myDisplay.getLayers();
        for (int i=0; i<tempLayers.length; i++){
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.