Navigációs képernyőn forráspontok megjelenítése
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 9s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 9s
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
/// Egy jelgerjesztési/tartalék forráspont a `terepi_seged_measure_source_points`
|
||||
/// táblából. Tisztán online — nincs helyi tükör.
|
||||
class MeasureSourcePoint {
|
||||
final String id;
|
||||
final String projectId;
|
||||
final double lineNumber;
|
||||
final double pointNumber;
|
||||
final int sequenceIndex;
|
||||
final double eovX;
|
||||
final double eovY;
|
||||
final double? elevation;
|
||||
final double? linkedReceiverLineNumber;
|
||||
|
||||
/// 0 = tartalék pont, 1 = jelgerjesztés helye.
|
||||
final int planState;
|
||||
final DateTime? plannedAcquisitionDate;
|
||||
final int? fieldSequence;
|
||||
final String? sourceType;
|
||||
final bool isActive;
|
||||
|
||||
const MeasureSourcePoint({
|
||||
required this.id,
|
||||
required this.projectId,
|
||||
required this.lineNumber,
|
||||
required this.pointNumber,
|
||||
required this.sequenceIndex,
|
||||
required this.eovX,
|
||||
required this.eovY,
|
||||
this.elevation,
|
||||
this.linkedReceiverLineNumber,
|
||||
required this.planState,
|
||||
this.plannedAcquisitionDate,
|
||||
this.fieldSequence,
|
||||
this.sourceType,
|
||||
required this.isActive,
|
||||
});
|
||||
|
||||
bool get isReserve => planState == 0;
|
||||
bool get isShotLocation => planState == 1;
|
||||
|
||||
factory MeasureSourcePoint.fromMap(Map<String, dynamic> m) =>
|
||||
MeasureSourcePoint(
|
||||
id: m['id'] as String,
|
||||
projectId: m['project_id'] as String,
|
||||
lineNumber: (m['line_number'] as num).toDouble(),
|
||||
pointNumber: (m['point_number'] as num).toDouble(),
|
||||
sequenceIndex: m['sequence_index'] as int,
|
||||
|
||||
// FIGYELEM: a terepi_seged_measure_source_points táblában az
|
||||
// eov_x/eov_y oszlopnevek FEL VANNAK CSERÉLVE a valódi magyar
|
||||
// EOV-konvencióhoz képest (az "eov_x" oszlop tartalmazza a
|
||||
// ténylegesen Y-nak/keletinek számító, ~640 000 körüli
|
||||
// értéket, az "eov_y" a ténylegesen X-nek/északinak számítót,
|
||||
// ~185 000 körülit) — itt kompenzáljuk, hogy a modell mezői
|
||||
// (eovX/eovY) a kód többi részével KONZISZTENS, valódi EOV-
|
||||
// jelentést hordozzanak.
|
||||
eovX: (m['eov_y'] as num).toDouble(),
|
||||
eovY: (m['eov_x'] as num).toDouble(),
|
||||
elevation: (m['elevation'] as num?)?.toDouble(),
|
||||
linkedReceiverLineNumber:
|
||||
(m['linked_receiver_line_number'] as num?)?.toDouble(),
|
||||
planState: m['plan_state'] as int,
|
||||
plannedAcquisitionDate: m['planned_acquisition_date'] != null
|
||||
? DateTime.parse(m['planned_acquisition_date'] as String)
|
||||
: null,
|
||||
fieldSequence: m['field_sequence'] as int?,
|
||||
sourceType: m['source_type'] as String?,
|
||||
isActive: m['is_active'] as bool,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user