@@ -23,14 +23,14 @@ public MultiLineHandler(ShapeGeometryType type) : base(type)
23
23
/// </summary>
24
24
/// <param name="file">The stream to read.</param>
25
25
/// <param name="totalRecordLength">Total length of the record we are about to read</param>
26
- /// <param name="geometryFactory ">The geometry factory to use when making the object.</param>
26
+ /// <param name="factory ">The geometry factory to use when making the object.</param>
27
27
/// <returns>The Geometry object that represents the shape file record.</returns>
28
- public override IGeometry Read ( BigEndianBinaryReader file , int totalRecordLength , IGeometryFactory geometryFactory )
28
+ public override IGeometry Read ( BigEndianBinaryReader file , int totalRecordLength , IGeometryFactory factory )
29
29
{
30
30
int totalRead = 0 ;
31
31
var type = ( ShapeGeometryType ) ReadInt32 ( file , totalRecordLength , ref totalRead ) ;
32
32
if ( type == ShapeGeometryType . NullShape )
33
- return geometryFactory . CreateMultiLineString ( null ) ;
33
+ return factory . CreateMultiLineString ( null ) ;
34
34
35
35
if ( type != ShapeType )
36
36
throw new ShapefileException ( string . Format ( "Encountered a '{0}' instead of a '{1}'" , type , ShapeType ) ) ;
@@ -52,7 +52,7 @@ public override IGeometry Read(BigEndianBinaryReader file, int totalRecordLength
52
52
53
53
var lines = new List < ILineString > ( numParts ) ;
54
54
var buffer = new CoordinateBuffer ( numPoints , NoDataBorderValue , true ) ;
55
- var pm = geometryFactory . PrecisionModel ;
55
+ var pm = factory . PrecisionModel ;
56
56
57
57
for ( var part = 0 ; part < numParts ; part ++ )
58
58
{
@@ -77,7 +77,7 @@ public override IGeometry Read(BigEndianBinaryReader file, int totalRecordLength
77
77
// Geometries via ICoordinateSequence further down.
78
78
GetZMValues ( file , totalRecordLength , ref totalRead , buffer ) ;
79
79
80
- var sequences = new List < ICoordinateSequence > ( buffer . ToSequences ( geometryFactory . CoordinateSequenceFactory ) ) ;
80
+ var sequences = new List < ICoordinateSequence > ( buffer . ToSequences ( factory . CoordinateSequenceFactory ) ) ;
81
81
82
82
for ( var s = 0 ; s < sequences . Count ; s ++ )
83
83
{
@@ -94,10 +94,10 @@ public override IGeometry Read(BigEndianBinaryReader file, int totalRecordLength
94
94
case GeometryInstantiationErrorHandlingOption . ThrowException :
95
95
break ;
96
96
case GeometryInstantiationErrorHandlingOption . Empty :
97
- sequences [ s ] = geometryFactory . CoordinateSequenceFactory . Create ( 0 , points . Ordinates ) ;
97
+ sequences [ s ] = factory . CoordinateSequenceFactory . Create ( 0 , points . Ordinates ) ;
98
98
break ;
99
99
case GeometryInstantiationErrorHandlingOption . TryFix :
100
- sequences [ s ] = AddCoordinateToSequence ( points , geometryFactory . CoordinateSequenceFactory ,
100
+ sequences [ s ] = AddCoordinateToSequence ( points , factory . CoordinateSequenceFactory ,
101
101
points . GetOrdinate ( 0 , Ordinate . X ) , points . GetOrdinate ( 0 , Ordinate . Y ) ,
102
102
points . GetOrdinate ( 0 , Ordinate . Z ) , points . GetOrdinate ( 0 , Ordinate . M ) ) ;
103
103
break ;
@@ -110,13 +110,13 @@ public override IGeometry Read(BigEndianBinaryReader file, int totalRecordLength
110
110
if ( createLineString )
111
111
{
112
112
// Grabs m values if we have them
113
- var line = geometryFactory . CreateLineString ( points ) ;
113
+ var line = factory . CreateLineString ( points ) ;
114
114
lines . Add ( line ) ;
115
115
}
116
116
}
117
117
118
118
geom = ( lines . Count != 1 )
119
- ? ( IGeometry ) geometryFactory . CreateMultiLineString ( lines . ToArray ( ) )
119
+ ? ( IGeometry ) factory . CreateMultiLineString ( lines . ToArray ( ) )
120
120
: lines [ 0 ] ;
121
121
return geom ;
122
122
}
@@ -126,15 +126,15 @@ public override IGeometry Read(BigEndianBinaryReader file, int totalRecordLength
126
126
/// </summary>
127
127
/// <param name="geometry">The geometry object to write.</param>
128
128
/// <param name="writer">The stream to write to.</param>
129
- /// <param name="geometryFactory ">The geometry factory to use.</param>
130
- public override void Write ( IGeometry geometry , BinaryWriter writer , IGeometryFactory geometryFactory )
129
+ /// <param name="factory ">The geometry factory to use.</param>
130
+ public override void Write ( IGeometry geometry , BinaryWriter writer , IGeometryFactory factory )
131
131
{
132
132
// Force to use a MultiGeometry
133
133
IMultiLineString multi ;
134
134
if ( geometry is IGeometryCollection )
135
135
multi = ( IMultiLineString ) geometry ;
136
136
else
137
- multi = geometryFactory . CreateMultiLineString ( new [ ] { ( ILineString ) geometry } ) ;
137
+ multi = factory . CreateMultiLineString ( new [ ] { ( ILineString ) geometry } ) ;
138
138
139
139
writer . Write ( ( int ) ShapeType ) ;
140
140
0 commit comments