コード例 #1
0
ファイル: ShapefileDataWriter.cs プロジェクト: vmoll/geotools
 /// <summary>
 /// Creates a <see cref="ShapefileDataWriter"/> that appends to a shapefile instead of creating a new one.
 /// </summary>
 /// <param name="filename">The filename to append to.</param>
 /// <param name="factory">The Geometry factory to use.</param>
 public ShapefileDataWriter(string filename, GeometryFactory factory)
 {
     // appends
     _filename = filename;
     _shpWriter = new ShapefileWriter(filename, factory,true);
     _dbfWriter = new DbaseFileWriter(GetDbasefilename(_filename),true);
 }
コード例 #2
0
		/// <summary>
		/// Creates a <see cref="ShapefileDataWriter"/> that appends to a shapefile instead of creating a new one.
		/// </summary>
		/// <param name="filename">The filename to append to.</param>
		/// <param name="factory">The Geometry factory to use.</param>
		public ShapefileDataWriter(string filename, GeometryFactory factory)
		{		
			// appends
			_filename = filename;
			_shpWriter = new ShapefileWriter(filename, factory,true);
			_dbfWriter = new DbaseFileWriter(GetDbasefilename(_filename),true);

		}
コード例 #3
0
ファイル: ShapefileDataWriter.cs プロジェクト: vmoll/geotools
        /// <summary>
        /// Initializes a new instance of the <see cref="ShapefileDataWriter">ShapefileDataWriter</see> class.
        /// </summary>
        /// <param name="filename">The name of the file to write.</param>
        /// <param name="factory">The <b>GeometryFactory</b> to use.</param>
        /// <param name="fields">An <see cref="DbaseFieldDescriptor">DbaseFieldDescriptor[]</see> containing the data column definitions.</param>
        /// <remarks>
        /// The <see cref="ShapefileDataWriter.Close">Close</see> method must be called in order to update 
        /// the underlying file headers.  If <see cref="ShapefileDataWriter.Close">Close</see> is not called 
        /// the underlying files may be in an invalid state.
        /// </remarks>
        public ShapefileDataWriter(string filename, GeometryFactory factory, DbaseFieldDescriptor[] fields)
        {
            _filename = filename;
            // This may need to have more logic to it to ensure we end up with the proper paths....
            _shpWriter = new ShapefileWriter(_filename, factory);
            _dbfWriter = new DbaseFileWriter(GetDbasefilename(_filename));

            for (int i = 0; i < fields.Length; i++)
            {
                _dbfWriter.AddColumn(fields[i]);
            }
        }
コード例 #4
0
		/// <summary>
		/// Initializes a new instance of the <see cref="ShapefileDataWriter">ShapefileDataWriter</see> class.
		/// </summary>
		/// <param name="filename">The name of the file to write.</param>
		/// <param name="factory">The <b>GeometryFactory</b> to use.</param>
		/// <param name="fields">An <see cref="DbaseFieldDescriptor">DbaseFieldDescriptor[]</see> containing the data column definitions.</param>
		/// <remarks>
		/// The <see cref="ShapefileDataWriter.Close">Close</see> method must be called in order to update 
		/// the underlying file headers.  If <see cref="ShapefileDataWriter.Close">Close</see> is not called 
		/// the underlying files may be in an invalid state.
		/// </remarks>
		public ShapefileDataWriter(string filename, GeometryFactory factory, DbaseFieldDescriptor[] fields)
		{
			_filename = filename;
			// This may need to have more logic to it to ensure we end up with the proper paths....
			_shpWriter = new ShapefileWriter(_filename, factory);
			_dbfWriter = new DbaseFileWriter(GetDbasefilename(_filename));

			for (int i = 0; i < fields.Length; i++)
			{
				_dbfWriter.AddColumn(fields[i]);
			}
		}