Package ucar.nc2.dt.ugrid.rtree
Class Node
- java.lang.Object
-
- ucar.nc2.dt.ugrid.rtree.Node
-
- All Implemented Interfaces:
Serializable
public class Node extends Object implements Serializable
TheNodeclass represents a data node for an RTree. This class contains references to child nodes as polygons with associated ids NOTE: findEntry is not implemented. This is used in node deletion by the RTree.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static longreorgTime
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LatLonRectangle2DexpandMBR(LatLonRectangle2D mbr, double[] latLons)Adds the givenrecttombras if mbr were a rectangle.static LatLonRectangle2DexpandMBR(LatLonRectangle2D mbr, LatLonPolygon2D poly)Adds the givenpolytombras if mbr were a rectangle.static LatLonRectangle2DexpandMBR(LatLonRectangle2D mbr, LatLonRectangle2D rect)Adds the givenrecttombras if mbr were a rectangle.LatLonPolygon2DgetEntry(int index)intgetEntryCount()intgetId(int index)intgetLevel()LatLonRectangle2DgetMBR()
-
-
-
Method Detail
-
expandMBR
public static LatLonRectangle2D expandMBR(LatLonRectangle2D mbr, LatLonPolygon2D poly)
Adds the givenpolytombras if mbr were a rectangle. Neither objects are modified.- Parameters:
mbr- the minimum bounding rectanglepoly- a polygon to be fit inside the mbr- Returns:
- the bounding rectangle of the union between mbr and poly as polgon2d object
-
expandMBR
public static LatLonRectangle2D expandMBR(LatLonRectangle2D mbr, LatLonRectangle2D rect)
Adds the givenrecttombras if mbr were a rectangle. Neither objects are modified.- Parameters:
mbr- the minimum bounding rectanglerect- a rectangle to be fit inside the mbr- Returns:
- the bounding rectangle of the union between mbr and poly as polgon2d object
-
expandMBR
public static LatLonRectangle2D expandMBR(LatLonRectangle2D mbr, double[] latLons)
Adds the givenrecttombras if mbr were a rectangle. Neither objects are modified.- Parameters:
mbr- the minimum bounding rectanglelatLons- lat/lon array with a length of 4 which contains lat/lon coords in the arrangement of LLy, LLx, URy, URx.- Returns:
- the bounding rectangle of the union between mbr and poly as polgon2d object
-
getEntryCount
public int getEntryCount()
-
getEntry
public LatLonPolygon2D getEntry(int index)
-
getId
public int getId(int index)
-
getLevel
public int getLevel()
-
getMBR
public LatLonRectangle2D getMBR()
-
-