/** * Get NodeLocation from internal store. * * @param nodeId * Id of the node we want the location for. * @return Location of node */ public NodeLocation getNodeLocation(long nodeId) { return locationStore.getNodeLocation(nodeId); }
/** * @param nodeId * Id of the node. * @return Point object */ public Point createPoint(long nodeId) { NodeLocation nodeLocation = locationStore.getNodeLocation(nodeId); Point point = new Point(nodeLocation.getLongitude(), nodeLocation.getLatitude()); point.srid = 4326; return point; }
NodeLocation nodeLocation; nodeLocation = locationStore.getNodeLocation(wayNode.getNodeId());
double latitude; nodeLocation = locationStore.getNodeLocation(wayNode.getNodeId()); longitude = nodeLocation.getLongitude(); latitude = nodeLocation.getLatitude();
latitude = FixedPrecisionCoordinateConvertor.convertToDouble(1 << ((i + 1) % 32)); location = store.getNodeLocation(i * 2); Assert.assertTrue("The node location should be valid.", location.isValid()); Assert.assertEquals("The longitude is incorrect.", longitude, location.getLongitude(), 0); Assert.assertEquals("The latitude is incorrect.", latitude, location.getLatitude(), 0); location = store.getNodeLocation((i * 2) + 1); Assert.assertFalse("The node location should be invalid.", location.isValid());