Examples of project()


Examples of com.vividsolutions.jts.linearref.LocationIndexedLine.project()

                double travelAlongOldEdge = distanceAlongGeometry(edgeGeometry, edgeIndex, null);

                for (Edge e : getOutgoingMatchableEdges(toVertex)) {
                    Geometry newEdgeGeometry = e.getGeometry();
                    LocationIndexedLine newIndexedEdge = new LocationIndexedLine(newEdgeGeometry);
                    newEdgeIndex = newIndexedEdge.project(newRouteCoord);
                    Coordinate newEdgeCoord = newEdgeIndex.getCoordinate(newEdgeGeometry);
                    positionError = distance(newEdgeCoord, newRouteCoord);
                    travelAlongEdge = travelAlongOldEdge + distanceAlongGeometry(newEdgeGeometry, new LinearLocation(), newEdgeIndex);
                    travelError = Math.abs(travelAlongRoute - travelAlongEdge);
View Full Code Here

Examples of com.vividsolutions.jts.linearref.LocationIndexedLine.project()

        // compute initial states
        for (Edge initialEdge : nearbyEdges) {
            Geometry edgeGeometry = initialEdge.getGeometry();
           
            LocationIndexedLine indexedEdge = new LocationIndexedLine(edgeGeometry);
            LinearLocation initialLocation = indexedEdge.project(routeStartCoordinate);
           
            double error = MatchState.distance(initialLocation.getCoordinate(edgeGeometry), routeStartCoordinate);
            MidblockMatchState state = new MidblockMatchState(null, routeGeometry, initialEdge, startIndex, initialLocation, error, 0.01);
            states.insert(state, 0); //make sure all initial states are visited by inserting them at 0
        }
View Full Code Here

Examples of com.vividsolutions.jts.linearref.LocationIndexedLine.project()

        Expression lineExpression = parameters.get(1);
        Geometry line = lineExpression.evaluate(object, Geometry.class);
   
        LocationIndexedLine index = new LocationIndexedLine(line);
   
        LinearLocation location = index.project(point.getCoordinate());
   
        Coordinate snap = index.extractPoint(location);
   
        Point pt = point.getFactory().createPoint(snap);
   
View Full Code Here

Examples of com.vividsolutions.jts.linearref.LocationIndexedLine.project()

    while (records.hasNext()) {
      SpatialDatabaseRecord record = records.next();
      Geometry geom = record.getGeometry();
      if (geom instanceof LineString) {
        LocationIndexedLine line = new LocationIndexedLine(geom);
        LinearLocation here = line.project(point.getCoordinate());
        Coordinate snap = line.extractPoint(here);
        double distance = snap.distance(point.getCoordinate());
        results.add(new PointResult(layer.getGeometryFactory()
            .createPoint(snap), record, distance));
      } else if (geom instanceof Point) {
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.algebra.MutableRelation.project()

    // URI didn't fit the node maker
    if (x.equals(NodeMaker.EMPTY)) return;
    Set<ProjectionSpec> requiredProjections = new HashSet<ProjectionSpec>();
    requiredProjections.add(downloadMap.getContentDownloadColumn());
    requiredProjections.addAll(mediaTypeValueMaker.projectionSpecs());
    newRelation.project(requiredProjections);
    newRelation.limit(1);
    Relation filteredRelation = newRelation.immutableSnapshot();
    SelectStatementBuilder builder = new SelectStatementBuilder(filteredRelation);
    String sql = builder.getSQLStatement();
    int contentColumn = builder.getColumnSpecs().indexOf(downloadMap.getContentDownloadColumn()) + 1;
View Full Code Here

Examples of eu.stratosphere.test.recordJobs.util.Tuple.project()

    /* Extract the year from the date element of the order relation: */
   
    /* pice = extendedprice * (1 - discount): */
    float price = Float.parseFloat(inputTuple.getStringValueAt(5)) * (1 - Float.parseFloat(inputTuple.getStringValueAt(6)));
    /* Project (orderkey | partkey, suppkey, linenumber, quantity, extendedprice, discount, tax, ...) to (partkey, suppkey, quantity): */
    inputTuple.project((0 << 0) | (1 << 1) | (1 << 2) | (0 << 3) | (1 << 4));
    inputTuple.addAttribute("" + price);
    record.setField(1, inputTuple);
    out.collect(record);
  }

View Full Code Here

Examples of eu.stratosphere.test.recordJobs.util.Tuple.project()

  @Test
  public void testProject() {
   
    Tuple t = new Tuple();
   
    t.project(1);
    Assert.assertTrue(t.getNumberOfColumns() == 0);
   
    t.addAttribute("a");
    t.project(0);
    Assert.assertTrue(t.getNumberOfColumns() == 0);
View Full Code Here

Examples of gov.nasa.worldwind.View.project()

        Position refPos = dragObject.getReferencePosition();
        if (refPos == null)
            return;

        Vec4 refPoint = globe.computePointFromPosition(refPos);
        Vec4 screenRefPoint = view.project(refPoint);

        // Compute screen-coord delta since last event.
        int dx = dragEvent.getPickPoint().x - dragEvent.getPreviousPickPoint().x;
        int dy = dragEvent.getPickPoint().y - dragEvent.getPreviousPickPoint().y;
View Full Code Here

Examples of kodkod.ast.Expression.project()

    boolean allSame = expr==project.expression();
    for(int i = 0, arity = project.arity(); i < arity; i++) {
      cols[i] = project.column(i).accept(this);
      allSame = allSame && (cols[i]==project.column(i));
    }
    ret = allSame ? project : expr.project(cols);
    return cache(project, ret);
  }
  /**
   * Calls lookup(castExpr) and returns the cached value, if any.  If a replacement
   * has not been cached, visits the expression's child.  If nothing changes, the argument
View Full Code Here

Examples of net.sourceforge.processdash.util.LinearRegression.project()

    public void calc() {
        Vector dataPoints = histData.getXYDataPoints(xColumn, yColumn);

        LinearRegression l = new LinearRegression(dataPoints);
        this.rangePercent = RANGE_PERCENT;
        l.project(this.inputValue, this.rangePercent);

        this.beta0 = l.beta0;
        this.beta1 = l.beta1;
        this.outputValue = l.projection;
        this.outputRange = l.range;
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.