test_class.declarator: locationReferencePointDecoder = new LocationReferencePointDecoder()
test_class.original_string: LocationReferencePointDecoder locationReferencePointDecoder = new LocationReferencePointDecoder();
test_class.type: LocationReferencePointDecoder
test_class.var_name: locationReferencePointDecoder
test_class.file: proto/src/test/java/openlr/proto/decoder/LocationReferencePointDecoderTest.java
test_class.identifier: LocationReferencePointDecoderTest
test_case.body: @Test
      public void testLocationReferencePoint() throws OpenLRProtoException {
          Coordinates coordinates = Coordinates.newBuilder()
                  .setLongitude(5)
                  .setLatitude(52)
                  .build();
  
          LineAttributes lineAttributes = LineAttributes.newBuilder()
                  .setBearing(90)
                  .setFrc(FRC.FRC_0)
                  .setFow(FOW.FOW_MOTORWAY)
                  .build();
  
          PathAttributes pathAttributes = PathAttributes.newBuilder()
                  .setDistanceToNext(100)
                  .setLowestFrcAlongPath(FRC.FRC_1)
                  .build();
  
          LocationReferencePoint locationReferencePoint = LocationReferencePoint.newBuilder()
                  .setCoordinates(coordinates)
                  .setLineAttributes(lineAttributes)
                  .setPathAttributes(pathAttributes)
                  .build();
  
          openlr.LocationReferencePoint lrp = locationReferencePointDecoder.decode(locationReferencePoint, 1, false);
  
          assertNotNull(lrp);
          assertEquals(lrp.getSequenceNumber(), 1);
          assertEquals(lrp.getLongitudeDeg(),5);
          assertEquals(lrp.getLatitudeDeg(), 52);
          assertEquals(lrp.getBearing(), 90);
          assertEquals(lrp.getFRC(), FunctionalRoadClass.FRC_0);
          assertEquals(lrp.getFOW(), FormOfWay.MOTORWAY);
          assertEquals(lrp.getDistanceToNext(), 100);
          assertEquals(lrp.getLfrc(), FunctionalRoadClass.FRC_1);
          assertEquals(lrp.isLastLRP(), false);
      }
test_case.class_method_signature: LocationReferencePointDecoderTest.testLocationReferencePoint()
test_case.full_signature: @Test public void testLocationReferencePoint()
test_case.identifier: testLocationReferencePoint
test_case.invocations: build setLatitude setLongitude newBuilder build setFow setFrc setBearing newBuilder build setLowestFrcAlongPath setDistanceToNext newBuilder build setPathAttributes setLineAttributes setCoordinates newBuilder decode assertNotNull assertEquals getSequenceNumber assertEquals getLongitudeDeg assertEquals getLatitudeDeg assertEquals getBearing assertEquals getFRC assertEquals getFOW assertEquals getDistanceToNext assertEquals getLfrc assertEquals isLastLRP
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testLocationReferencePoint()
focal_class.file: proto/src/main/java/openlr/proto/decoder/LocationReferencePointDecoder.java
focal_class.identifier: LocationReferencePointDecoder
focal_class.class_method_signature: LocationReferencePointDecoder.decode(openlr.proto.schema.LocationReferencePoint data, int sequenceNumber, boolean isLast)
focal_class.full_signature:  LocationReferencePoint decode(openlr.proto.schema.LocationReferencePoint data, int sequenceNumber, boolean isLast)
focal_class.identifier: decode
focal_class.parameters: (openlr.proto.schema.LocationReferencePoint data, int sequenceNumber, boolean isLast)
focal_class.return: LocationReferencePoint
focal_class.signature: LocationReferencePoint decode(openlr.proto.schema.LocationReferencePoint data, int sequenceNumber, boolean isLast)
focal_class.class_method_signature: LocationReferencePointDecoder.decode(FRC frc)
focal_class.full_signature: private FunctionalRoadClass decode(FRC frc)
focal_class.identifier: decode
focal_class.modifiers: private
focal_class.parameters: (FRC frc)
focal_class.return: FunctionalRoadClass
focal_class.signature: FunctionalRoadClass decode(FRC frc)
focal_class.class_method_signature: LocationReferencePointDecoder.decode(FOW fow)
focal_class.full_signature: private FormOfWay decode(FOW fow)
focal_class.identifier: decode
focal_class.modifiers: private
focal_class.parameters: (FOW fow)
focal_class.return: FormOfWay
focal_class.signature: FormOfWay decode(FOW fow)
focal_method.body: LocationReferencePoint decode(openlr.proto.schema.LocationReferencePoint data, int sequenceNumber, boolean isLast) throws OpenLRProtoException {
          if (!data.hasCoordinates()) {
              throw new OpenLRProtoException(OpenLRProtoStatusCode.INVALID_LOCATION_REFERENCE);
          }
  
          Coordinates coordinates = data.getCoordinates();
          double longitudeDeg = coordinates.getLongitude();
          double latitudeDeg = coordinates.getLatitude();
  
          if (!data.hasLineAttributes()) {
              throw new OpenLRProtoException(OpenLRProtoStatusCode.INVALID_LOCATION_REFERENCE);
          }
  
          LineAttributes lineAttributes = data.getLineAttributes();
          int bearing = lineAttributes.getBearing();
          FunctionalRoadClass frc = decode(lineAttributes.getFrc());
          FormOfWay fow = decode(lineAttributes.getFow());
  
          if (isLast) {
              return new LocationReferencePointProtoImpl(
                      sequenceNumber,
                      longitudeDeg,
                      latitudeDeg,
                      bearing,
                      frc,
                      fow);
          } else {
              if (!data.hasPathAttributes()) {
                  throw new OpenLRProtoException(OpenLRProtoStatusCode.INVALID_LOCATION_REFERENCE);
              }
  
              PathAttributes pathAttributes = data.getPathAttributes();
              int distanceToNext = pathAttributes.getDistanceToNext();
              FunctionalRoadClass lfrc = decode(pathAttributes.getLowestFrcAlongPath());
  
              return new LocationReferencePointProtoImpl(
                      sequenceNumber,
                      longitudeDeg,
                      latitudeDeg,
                      bearing,
                      frc,
                      fow,
                      distanceToNext,
                      lfrc);
          }
      }
focal_method.class_method_signature: LocationReferencePointDecoder.decode(openlr.proto.schema.LocationReferencePoint data, int sequenceNumber, boolean isLast)
focal_method.full_signature:  LocationReferencePoint decode(openlr.proto.schema.LocationReferencePoint data, int sequenceNumber, boolean isLast)
focal_method.identifier: decode
focal_method.invocations: hasCoordinates getCoordinates getLongitude getLatitude hasLineAttributes getLineAttributes getBearing decode getFrc decode getFow hasPathAttributes getPathAttributes getDistanceToNext decode getLowestFrcAlongPath
focal_method.parameters: (openlr.proto.schema.LocationReferencePoint data, int sequenceNumber, boolean isLast)
focal_method.return: LocationReferencePoint
focal_method.signature: LocationReferencePoint decode(openlr.proto.schema.LocationReferencePoint data, int sequenceNumber, boolean isLast)