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 WithSurface(RoadSegmentSurfaceAttribute surface) { return(new AddRoadSegment( RecordNumber, TemporaryId, StartNodeId, EndNodeId, Geometry, MaintenanceAuthority, GeometryDrawMethod, Morphology, Status, Category, AccessRestriction, LeftSideStreetNameId, RightSideStreetNameId, Lanes, Widths, new List <RoadSegmentSurfaceAttribute>(Surfaces) { surface })); }
public TranslatedChanges Translate(ZipArchiveEntry entry, IDbaseRecordEnumerator <RoadSegmentSurfaceChangeDbaseRecord> 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 surface = new RoadSegmentSurfaceAttribute( new AttributeId(record.WV_OIDN.Value), RoadSegmentSurfaceType.ByIdentifier[record.TYPE.Value], RoadSegmentPosition.FromDouble(record.VANPOSITIE.Value), RoadSegmentPosition.FromDouble(record.TOTPOSITIE.Value) ); changes = changes.Replace(before, before.WithSurface(surface)); } break; } } } return(changes); }