當前位置: 首頁>>代碼示例>>Java>>正文


Java Envelope.getMaxY方法代碼示例

本文整理匯總了Java中com.vividsolutions.jts.geom.Envelope.getMaxY方法的典型用法代碼示例。如果您正苦於以下問題:Java Envelope.getMaxY方法的具體用法?Java Envelope.getMaxY怎麽用?Java Envelope.getMaxY使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.vividsolutions.jts.geom.Envelope的用法示例。


在下文中一共展示了Envelope.getMaxY方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: applySearchBoundary

import com.vividsolutions.jts.geom.Envelope; //導入方法依賴的package包/類
private String applySearchBoundary(String reqParams, SearchBoundary searchBoundary)
{
	if (searchBoundary != null)
	{
		if (searchBoundary instanceof RectSearchBoundary)
		{
			RectSearchBoundary rsb = (RectSearchBoundary)searchBoundary;
			Envelope env = rsb.getRectangle();
			reqParams += "&boundary.rect.min_lat=" + env.getMinY() + "&boundary.rect.min_lon=" + env.getMinX() + "&boundary.rect.max_lat=" + env.getMaxY() + "&boundary.rect.max_lon=" + env.getMaxX();
		}
		else if (searchBoundary instanceof CircleSearchBoundary)
		{
			CircleSearchBoundary csb = (CircleSearchBoundary)searchBoundary;
			reqParams += "&boundary.circle.lat=" + csb.getLatitude() + "&boundary.circle.lon=" + csb.getLongitude() + "&boundary.circle.radius=" + csb.getRadius();
		}
	}

	return reqParams;
}
 
開發者ID:GIScience,項目名稱:openrouteservice,代碼行數:20,代碼來源:PeliasGeocoder.java

示例2: findStabbedSegments

import com.vividsolutions.jts.geom.Envelope; //導入方法依賴的package包/類
/**
 * Finds all non-horizontal segments intersecting the stabbing line.
 * The stabbing line is the ray to the right of stabbingRayLeftPt.
 *
 * @param stabbingRayLeftPt the left-hand origin of the stabbing line
 * @return a List of {@link DepthSegments} intersecting the stabbing line
 */
private List findStabbedSegments(Coordinate stabbingRayLeftPt) {
    List stabbedSegments = new ArrayList();
    for (Object subgraph : subgraphs) {
        BufferSubgraph bsg = (BufferSubgraph) subgraph;

        // optimization - don't bother checking subgraphs which the ray does not intersect
        Envelope env = bsg.getEnvelope();
        if (stabbingRayLeftPt.y < env.getMinY()
                || stabbingRayLeftPt.y > env.getMaxY()) {
            continue;
        }

        this.findStabbedSegments(stabbingRayLeftPt, bsg.getDirectedEdges(), stabbedSegments);
    }
    return stabbedSegments;
}
 
開發者ID:gegy1000,項目名稱:Earth,代碼行數:24,代碼來源:SubgraphDepthLocater.java

示例3: createFrame

import com.vividsolutions.jts.geom.Envelope; //導入方法依賴的package包/類
private void createFrame(Envelope env) {
    double deltaX = env.getWidth();
    double deltaY = env.getHeight();
    double offset = 0.0;
    if (deltaX > deltaY) {
        offset = deltaX * 10.0;
    } else {
        offset = deltaY * 10.0;
    }

    this.frameVertex[0] = new Vertex((env.getMaxX() + env.getMinX()) / 2.0, env
            .getMaxY()
            + offset);
    this.frameVertex[1] = new Vertex(env.getMinX() - offset, env.getMinY() - offset);
    this.frameVertex[2] = new Vertex(env.getMaxX() + offset, env.getMinY() - offset);

    this.frameEnv = new Envelope(this.frameVertex[0].getCoordinate(), this.frameVertex[1]
            .getCoordinate());
    this.frameEnv.expandToInclude(this.frameVertex[2].getCoordinate());
}
 
開發者ID:gegy1000,項目名稱:Earth,代碼行數:21,代碼來源:QuadEdgeSubdivision.java

示例4: getSubnodeIndex

import com.vividsolutions.jts.geom.Envelope; //導入方法依賴的package包/類
/**
 * Gets the index of the subquad that wholly contains the given envelope.
 * If none does, returns -1.
 *
 * @return the index of the subquad that wholly contains the given envelope
 * or -1 if no subquad wholly contains the envelope
 */
public static int getSubnodeIndex(Envelope env, double centrex, double centrey) {
    int subnodeIndex = -1;
    if (env.getMinX() >= centrex) {
        if (env.getMinY() >= centrey) {
            subnodeIndex = 3;
        }
        if (env.getMaxY() <= centrey) {
            subnodeIndex = 1;
        }
    }
    if (env.getMaxX() <= centrex) {
        if (env.getMinY() >= centrey) {
            subnodeIndex = 2;
        }
        if (env.getMaxY() <= centrey) {
            subnodeIndex = 0;
        }
    }
    return subnodeIndex;
}
 
開發者ID:gegy1000,項目名稱:Earth,代碼行數:28,代碼來源:NodeBase.java

示例5: ensureExtent

import com.vividsolutions.jts.geom.Envelope; //導入方法依賴的package包/類
/**
 * Ensure that the envelope for the inserted item has non-zero extents.
 * Use the current minExtent to pad the envelope, if necessary
 */
public static Envelope ensureExtent(Envelope itemEnv, double minExtent) {
    //The names "ensureExtent" and "minExtent" are misleading -- sounds like
    //this method ensures that the extents are greater than minExtent.
    //Perhaps we should rename them to "ensurePositiveExtent" and "defaultExtent".
    //[Jon Aquino]
    double minx = itemEnv.getMinX();
    double maxx = itemEnv.getMaxX();
    double miny = itemEnv.getMinY();
    double maxy = itemEnv.getMaxY();
    // has a non-zero extent
    if (minx != maxx && miny != maxy) {
        return itemEnv;
    }

    // pad one or both extents
    if (minx == maxx) {
        minx = minx - minExtent / 2.0;
        maxx = minx + minExtent / 2.0;
    }
    if (miny == maxy) {
        miny = miny - minExtent / 2.0;
        maxy = miny + minExtent / 2.0;
    }
    return new Envelope(minx, maxx, miny, maxy);
}
 
開發者ID:gegy1000,項目名稱:Earth,代碼行數:30,代碼來源:Quadtree.java

示例6: postSeedRequest

import com.vividsolutions.jts.geom.Envelope; //導入方法依賴的package包/類
private void postSeedRequest(Envelope envelope) {

		String gwcurl = gwcBaseUrl + "seed/" + layername + ".json";

		Bounds bounds = new Bounds(new Coordinates(envelope.getMinX(), envelope.getMinY(), envelope.getMaxX(),
				envelope.getMaxY()));
		Srs srs = new Srs(epsgCode);
		SeedRequest request = new SeedRequest(layername, bounds, srs, zoomStart, zoomStop, imageFormat, operation,
				numThreads);

		HttpEntity<GwcSeedDAO> httpentity = new HttpEntity<GwcSeedDAO>(new GwcSeedDAO(request), createHeaders(
				gwcUserName, gwcPassword));
		ResponseEntity response = template.exchange(gwcurl, HttpMethod.POST, httpentity, String.class);
		HttpStatus returncode = response.getStatusCode();
		if (!returncode.is2xxSuccessful()) {
			log.warn("HTTP Call to " + gwcurl + " was not successfull, Status code: " + response.getStatusCode());
		}
		else {
			log.debug("HTTP Call to "+ gwcurl + "succeeded");
		}
		
	}
 
開發者ID:sebastian-r-schmidt,項目名稱:logicaldecoding,代碼行數:23,代碼來源:GWCInvalidator.java

示例7: createRectangleWithSideLengthInMeters

import com.vividsolutions.jts.geom.Envelope; //導入方法依賴的package包/類
public static Polygon createRectangleWithSideLengthInMeters(Point p, double sideLengthMeters) {
	Envelope env = createEnvelopeInMeters(p, sideLengthMeters);
	Coordinate[] coords = new Coordinate[5];
	coords[0] = new Coordinate(env.getMinX(), env.getMinY());
	coords[1] = new Coordinate(env.getMinX(), env.getMaxY());
	coords[2] = new Coordinate(env.getMaxX(), env.getMaxY());
	coords[3] = new Coordinate(env.getMaxX(), env.getMinY());
	coords[4] = new Coordinate(env.getMinX(), env.getMinY());
	return gm.createPolygon(coords);
}
 
開發者ID:graphium-project,項目名稱:graphium,代碼行數:11,代碼來源:GeometryUtils.java

示例8: buildBboxFilter

import com.vividsolutions.jts.geom.Envelope; //導入方法依賴的package包/類
private String buildBboxFilter(Envelope bbox)
{
	String polygon = "'POLYGON((" + bbox.getMinX() + " " + bbox.getMinY() + "," +
			bbox.getMinX() + " " + bbox.getMaxY() + "," + 
			bbox.getMaxX() + " " + bbox.getMaxY() + "," + 
			bbox.getMinY() + " " + bbox.getMaxY() + "," +
			bbox.getMinX() + " " + bbox.getMinY() +"))'";
	return "GEOGRAPHY_INTERSECTS(" + polygon +  "," + _geomColumn + ")";
}
 
開發者ID:GIScience,項目名稱:openrouteservice,代碼行數:10,代碼來源:MemSQLLocationsDataProvider.java

示例9: getKey

import com.vividsolutions.jts.geom.Envelope; //導入方法依賴的package包/類
private SpatialKey getKey(SearchRow row) {
    if (row == null) {
        return null;
    }
    Value v = row.getValue(columnIds[0]);
    if (v == ValueNull.INSTANCE) {
        return null;
    }
    Geometry g = ((ValueGeometry) v.convertTo(Value.GEOMETRY)).getGeometryNoCopy();
    Envelope env = g.getEnvelopeInternal();
    return new SpatialKey(row.getKey(),
            (float) env.getMinX(), (float) env.getMaxX(),
            (float) env.getMinY(), (float) env.getMaxY());
}
 
開發者ID:vdr007,項目名稱:ThriftyPaxos,代碼行數:15,代碼來源:MVSpatialIndex.java

示例10: visit

import com.vividsolutions.jts.geom.Envelope; //導入方法依賴的package包/類
@Override
protected void visit(Geometry element) {
    Envelope elementEnv = element.getEnvelopeInternal();

    // disjoint => no intersection
    if (!this.rectEnv.intersects(elementEnv)) {
        return;
    }
    // rectangle contains target env => must intersect
    if (this.rectEnv.contains(elementEnv)) {
        this.intersects = true;
        return;
    }
    /**
     * Since the envelopes intersect and the test element is connected, if the
     * test envelope is completely bisected by an edge of the rectangle the
     * element and the rectangle must touch (This is basically an application of
     * the Jordan Curve Theorem). The alternative situation is that the test
     * envelope is "on a corner" of the rectangle envelope, i.e. is not
     * completely bisected. In this case it is not possible to make a conclusion
     * about the presence of an intersection.
     */
    if (elementEnv.getMinX() >= this.rectEnv.getMinX()
            && elementEnv.getMaxX() <= this.rectEnv.getMaxX()) {
        this.intersects = true;
        return;
    }
    if (elementEnv.getMinY() >= this.rectEnv.getMinY()
            && elementEnv.getMaxY() <= this.rectEnv.getMaxY()) {
        this.intersects = true;
    }
}
 
開發者ID:gegy1000,項目名稱:Earth,代碼行數:33,代碼來源:RectangleIntersects.java

示例11: buildIndex

import com.vividsolutions.jts.geom.Envelope; //導入方法依賴的package包/類
private void buildIndex() {
    //Envelope env = ring.getEnvelopeInternal();
    this.tree = new Bintree();

    Coordinate[] pts = CoordinateArrays.removeRepeatedPoints(this.ring.getCoordinates());
    List mcList = MonotoneChainBuilder.getChains(pts);

    for (Object aMcList : mcList) {
        MonotoneChain mc = (MonotoneChain) aMcList;
        Envelope mcEnv = mc.getEnvelope();
        this.interval.min = mcEnv.getMinY();
        this.interval.max = mcEnv.getMaxY();
        this.tree.insert(this.interval, mc);
    }
}
 
開發者ID:gegy1000,項目名稱:Earth,代碼行數:16,代碼來源:MCPointInRing.java

示例12: RectangleLineIntersector

import com.vividsolutions.jts.geom.Envelope; //導入方法依賴的package包/類
/**
 * Creates a new intersector for the given query rectangle,
 * specified as an {@link Envelope}.
 *
 * @param rectEnv the query rectangle, specified as an Envelope
 */
public RectangleLineIntersector(Envelope rectEnv) {
    this.rectEnv = rectEnv;

    /**
     * Up and Down are the diagonal orientations
     * relative to the Left side of the rectangle.
     * Index 0 is the left side, 1 is the right side.
     */
    this.diagUp0 = new Coordinate(rectEnv.getMinX(), rectEnv.getMinY());
    this.diagUp1 = new Coordinate(rectEnv.getMaxX(), rectEnv.getMaxY());
    this.diagDown0 = new Coordinate(rectEnv.getMinX(), rectEnv.getMaxY());
    this.diagDown1 = new Coordinate(rectEnv.getMaxX(), rectEnv.getMinY());
}
 
開發者ID:gegy1000,項目名稱:Earth,代碼行數:20,代碼來源:RectangleLineIntersector.java

示例13: queryNode

import com.vividsolutions.jts.geom.Envelope; //導入方法依賴的package包/類
private void queryNode(KdNode currentNode, KdNode bottomNode,
                       Envelope queryEnv, boolean odd, List result) {
    if (currentNode == bottomNode) {
        return;
    }

    double min;
    double max;
    double discriminant;
    if (odd) {
        min = queryEnv.getMinX();
        max = queryEnv.getMaxX();
        discriminant = currentNode.getX();
    } else {
        min = queryEnv.getMinY();
        max = queryEnv.getMaxY();
        discriminant = currentNode.getY();
    }
    boolean searchLeft = min < discriminant;
    boolean searchRight = discriminant <= max;

    if (searchLeft) {
        this.queryNode(currentNode.getLeft(), bottomNode, queryEnv, !odd, result);
    }
    if (queryEnv.contains(currentNode.getCoordinate())) {
        result.add(currentNode);
    }
    if (searchRight) {
        this.queryNode(currentNode.getRight(), bottomNode, queryEnv, !odd, result);
    }
}
 
開發者ID:gegy1000,項目名稱:Earth,代碼行數:32,代碼來源:KdTree.java

示例14: Node

import com.vividsolutions.jts.geom.Envelope; //導入方法依賴的package包/類
public Node(Envelope env, int level) {
    //this.parent = parent;
    this.env = env;
    this.level = level;
    this.centrex = (env.getMinX() + env.getMaxX()) / 2;
    this.centrey = (env.getMinY() + env.getMaxY()) / 2;
}
 
開發者ID:gegy1000,項目名稱:Earth,代碼行數:8,代碼來源:Node.java

示例15: PredicateEvaluatorRectangle

import com.vividsolutions.jts.geom.Envelope; //導入方法依賴的package包/類
public PredicateEvaluatorRectangle(Envelope envelope) {
    this.minX = envelope.getMinX();
    this.maxX = envelope.getMaxX();
    this.minY = envelope.getMinY();
    this.maxY = envelope.getMaxY();
}
 
開發者ID:gegy1000,項目名稱:Earth,代碼行數:7,代碼來源:PredicateEvaluatorRectangle.java


注:本文中的com.vividsolutions.jts.geom.Envelope.getMaxY方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。