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 testLastLocationReferencePoint() throws OpenLRProtoException {
          Coordinates coordinates = Coordinates.newBuilder()
                  .setLongitude(2)
                  .setLatitude(51)
                  .build();
  
          LineAttributes lineAttributes = LineAttributes.newBuilder()
                  .setBearing(180)
                  .setFrc(FRC.FRC_4)
                  .setFow(FOW.FOW_SINGLE_CARRIAGEWAY)
                  .build();
  
          LocationReferencePoint locationReferencePoint = LocationReferencePoint.newBuilder()
                  .setCoordinates(coordinates)
                  .setLineAttributes(lineAttributes)
                  .build();
  
          openlr.LocationReferencePoint lrp = locationReferencePointDecoder.decode(locationReferencePoint, 3, true);
  
          assertNotNull(lrp);
          assertEquals(lrp.getSequenceNumber(), 3);
          assertEquals(lrp.getLongitudeDeg(), 2);
          assertEquals(lrp.getLatitudeDeg(), 51);
          assertEquals(lrp.getBearing(), 180);
          assertEquals(lrp.getFRC(), FunctionalRoadClass.FRC_4);
          assertEquals(lrp.getFOW(), FormOfWay.SINGLE_CARRIAGEWAY);
          assertEquals(lrp.isLastLRP(),true);
      }
test_case.class_method_signature: LocationReferencePointDecoderTest.testLastLocationReferencePoint()
test_case.full_signature: @Test public void testLastLocationReferencePoint()
test_case.identifier: testLastLocationReferencePoint
test_case.invocations: build setLatitude setLongitude newBuilder build setFow setFrc setBearing newBuilder build setLineAttributes setCoordinates newBuilder decode assertNotNull assertEquals getSequenceNumber assertEquals getLongitudeDeg assertEquals getLatitudeDeg assertEquals getBearing assertEquals getFRC assertEquals getFOW assertEquals isLastLRP
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testLastLocationReferencePoint()
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)