public AddRoadSegment( RecordNumber recordNumber, RoadSegmentId temporaryId, RoadNodeId startNodeId, RoadNodeId endNodeId, OrganizationId maintenanceAuthority, RoadSegmentGeometryDrawMethod geometryDrawMethod, RoadSegmentMorphology morphology, RoadSegmentStatus status, RoadSegmentCategory category, RoadSegmentAccessRestriction accessRestriction, CrabStreetnameId?leftSideStreetNameId, CrabStreetnameId?rightSideStreetNameId) { RecordNumber = recordNumber; TemporaryId = temporaryId; StartNodeId = startNodeId; EndNodeId = endNodeId; Geometry = null; MaintenanceAuthority = maintenanceAuthority; GeometryDrawMethod = geometryDrawMethod ?? throw new ArgumentNullException(nameof(geometryDrawMethod)); Morphology = morphology ?? throw new ArgumentNullException(nameof(morphology)); Status = status ?? throw new ArgumentNullException(nameof(status)); Category = category ?? throw new ArgumentNullException(nameof(category)); AccessRestriction = accessRestriction ?? throw new ArgumentNullException(nameof(accessRestriction)); LeftSideStreetNameId = leftSideStreetNameId; RightSideStreetNameId = rightSideStreetNameId; Lanes = new RoadSegmentLaneAttribute[0]; Widths = new RoadSegmentWidthAttribute[0]; Surfaces = new RoadSegmentSurfaceAttribute[0]; }
public AddRoadSegment WithWidth(RoadSegmentWidthAttribute width) { return(new AddRoadSegment( RecordNumber, TemporaryId, StartNodeId, EndNodeId, Geometry, MaintenanceAuthority, GeometryDrawMethod, Morphology, Status, Category, AccessRestriction, LeftSideStreetNameId, RightSideStreetNameId, Lanes, new List <RoadSegmentWidthAttribute>(Widths) { width }, Surfaces)); }
public TranslatedChanges Translate(ZipArchiveEntry entry, IDbaseRecordEnumerator <RoadSegmentWidthChangeDbaseRecord> records, TranslatedChanges changes) { if (entry == null) { throw new ArgumentNullException(nameof(entry)); } if (records == null) { throw new ArgumentNullException(nameof(records)); } if (changes == null) { throw new ArgumentNullException(nameof(changes)); } while (records.MoveNext()) { var record = records.Current; if (record != null) { switch (record.RECORDTYPE.Value) { case RecordType.EqualIdentifier: case RecordType.AddedIdentifier: case RecordType.ModifiedIdentifier: var segmentId = new RoadSegmentId(record.WS_OIDN.Value); if (changes.TryFindAddRoadSegment(segmentId, out var before)) { var width = new RoadSegmentWidthAttribute( new AttributeId(record.WB_OIDN.Value), new RoadSegmentWidth(record.BREEDTE.Value), RoadSegmentPosition.FromDouble(record.VANPOSITIE.Value), RoadSegmentPosition.FromDouble(record.TOTPOSITIE.Value) ); changes = changes.Replace(before, before.WithWidth(width)); } break; } } } return(changes); }