Examples of Coordinate


Examples of com.vividsolutions.jts.geom.Coordinate

    //note that setting a global filter on the SearchByLocationRequest will only work if the filter is applicable
    //to all layers! In this test case there is only one layer.
    request.setFilter("region='Region 1'");

    GeometryFactory factory = new GeometryFactory();
    LineString equator = factory.createLineString(new Coordinate[] {new Coordinate(0, 0),
        new Coordinate(-180, 180)});
    request.setLocation(converter.toDto(equator));

    // execute
    SearchByLocationResponse response = (SearchByLocationResponse) dispatcher.execute(
        SearchByLocationRequest.COMMAND, request, null, "en");
View Full Code Here

Examples of com.vividsolutions.jts.geom.Coordinate

    request.setSearchType(SearchByLocationRequest.SEARCH_ALL_LAYERS);
    request.setLayerIds(new String[] {LAYER_ID});
    request.setFilter(LAYER_ID, "region='Region 1'");

    GeometryFactory factory = new GeometryFactory();
    LineString equator = factory.createLineString(new Coordinate[] {new Coordinate(0, 0),
        new Coordinate(-180, 180)});
    request.setLocation(converter.toDto(equator));

    // execute
    SearchByLocationResponse response = (SearchByLocationResponse) dispatcher.execute(
        SearchByLocationRequest.COMMAND, request, null, "en");
View Full Code Here

Examples of com.vividsolutions.jts.geom.Coordinate

    request.setRatio(0.5f);
    request.setLayerIds(new String[] {LAYER_ID});

    // create a rectangle that overlaps 50 %
    GeometryFactory factory = new GeometryFactory();
    LinearRing half1 = factory.createLinearRing(new Coordinate[] {new Coordinate(0, 0), new Coordinate(1, 0),
        new Coordinate(1, 0.5), new Coordinate(0, 0.5), new Coordinate(0, 0)});
    Polygon polygon = factory.createPolygon(half1, null);
    request.setLocation(converter.toDto(polygon));

    // execute
    SearchByLocationResponse response = (SearchByLocationResponse) dispatcher.execute(
View Full Code Here

Examples of com.vividsolutions.jts.geom.Coordinate

    request.setRatio(0.5f);
    request.setLayerIds(new String[] {LAYER_ID});

    // create a rectangle that overlaps 49 %
    GeometryFactory factory = new GeometryFactory();
    LinearRing half1 = factory.createLinearRing(new Coordinate[] {new Coordinate(0, 0), new Coordinate(1, 0),
        new Coordinate(1, 0.49), new Coordinate(0, 0.49), new Coordinate(0, 0)});
    Polygon polygon = factory.createPolygon(half1, null);
    request.setLocation(converter.toDto(polygon));

    // execute
    SearchByLocationResponse response = (SearchByLocationResponse) dispatcher.execute(
View Full Code Here

Examples of com.yahoo.labs.taxomo.util.SymbolTransitionFrequencies.Coordinate

  private HashSet<Coordinate> getUsedCoordinates() {
    HashSet<Coordinate> isUsed = new HashSet<Coordinate>();

    for (int x : statesPerType.get(StateType.SUBNODE)) {
      for (int y : statesPerType.get(StateType.SHARED)) {
        isUsed.add(new Coordinate(x, y));
        isUsed.add(new Coordinate(y, x));
      }
      for (int y : statesPerType.get(StateType.SUBNODE)) {
        isUsed.add(new Coordinate(x, y));
      }
    }

    for (int x : statesPerType.get(StateType.SUPERNODE)) {
      for (int y : statesPerType.get(StateType.SHARED)) {
        isUsed.add(new Coordinate(x, y));
        isUsed.add(new Coordinate(y, x));
      }
      for (int y : statesPerType.get(StateType.SUPERNODE)) {
        isUsed.add(new Coordinate(x, y));
      }
    }

    return isUsed;
  }
View Full Code Here

Examples of datatypes.Coordinate

  }
 
 
 
  private void informEntitymovement(Entity entity) {
    Coordinate oldLocation = entity.getLastLocation();
    Coordinate newLocation = entity.getLocation().toAbsCoordinate();
   
    int dX = newLocation.x - oldLocation.x;
    int dY = newLocation.y - oldLocation.y;
    int dZ = newLocation.z - oldLocation.z;
   
View Full Code Here

Examples of de.fhpotsdam.unfolding.core.Coordinate

      int v = Integer.parseInt("" + s.charAt(i));
      String bv = PApplet.binary(v, 2);
      rowS += bv.charAt(0);
      colS += bv.charAt(1);
    }
    return new Coordinate(PApplet.unbinary(colS), PApplet.unbinary(rowS), s.length());
  }
View Full Code Here

Examples of de.hpi.eworld.importer.osm.jmapviewer.Coordinate

        pStart.y <<= zoomDiff;

        iSelectionRectStart = pStart;
        iSelectionRectEnd = pEnd;

        Coordinate l1 = getPosition(p_max);
        Coordinate l2 = getPosition(p_min);
        Bounds b = new Bounds(
                        Math.min(l2.getLat(), l1.getLat()),
                        Math.min(l1.getLon(), l2.getLon()),
                        Math.max(l2.getLat(), l1.getLat()),
                        Math.max(l1.getLon(), l2.getLon())
        );
        Bounds oldValue = this.bbox;
        this.bbox = b;
    firePropertyChange(BOUNDS_CHANGED_PROP, oldValue, this.bbox);
        repaint();
View Full Code Here

Examples of de.micromata.opengis.kml.v_2_2_0.Coordinate

     *     required parameter
     * @return
     *     <tt>true</tt> (as general contract of <tt>Collection.add</tt>).
     */
    public LatLonQuad addToCoordinates(final double longitude, final double latitude) {
        this.getCoordinates().add(new Coordinate(longitude, latitude));
        return this;
    }
View Full Code Here

Examples of geodress.model.Coordinate

   * @throws Exception
   *             may cause an exception
   */
  @Test
  public void testValidCoordinates() throws Exception {
    coords = new Coordinate(30, 20);
    Assert.assertEquals((double) 30, coords.getLatitude());
    Assert.assertEquals((double) 20, coords.getLongitude());

    coords.setLatitude(60.8237);
    Assert.assertEquals(60.8237, coords.getLatitude());

    coords.setLongitude(-102.287);
    Assert.assertEquals(-102.287, coords.getLongitude());

    coords.setLatitude(-90);
    Assert.assertEquals((double) -90, coords.getLatitude());

    coords.setLongitude(180);
    Assert.assertEquals((double) 180, coords.getLongitude());

    coords = new Coordinate("-34.5342", "-78.2345");
    Assert.assertEquals(-34.5342, coords.getLatitude());
    Assert.assertEquals(-78.2345, coords.getLongitude());
  }
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.