/** * @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; }
/** * {@inheritDoc} */ @Override public void store(StoreWriter writer, StoreClassRegister storeClassRegister) { writer.writeDouble(nodeLocation.getLongitude()); writer.writeDouble(nodeLocation.getLatitude()); }
FixedPrecisionCoordinateConvertor.convertToFixed(nodeLocation.getLongitude()), buffer, bufferOffset); bufferOffset += 4; writeIntToBuffer(
dataOutStream.writeInt(FixedPrecisionCoordinateConvertor.convertToFixed(nodeLocation.getLongitude())); dataOutStream.writeInt(FixedPrecisionCoordinateConvertor.convertToFixed(nodeLocation.getLatitude())); currentFileOffset += NODE_DATA_SIZE;
linePoints.add(new Point(nodeLocation.getLongitude(), nodeLocation.getLatitude())); } else { return null;
longitude = nodeLocation.getLongitude(); latitude = nodeLocation.getLatitude();
Assert.assertEquals("The longitude is incorrect.", longitude, location.getLongitude(), 0); Assert.assertEquals("The latitude is incorrect.", latitude, location.getLatitude(), 0);