public MapInfoProvider(string tabpath)
		{
			try
			{
				m_layer = new Layer(tabpath);
				m_filename = tabpath;
				BuildTree();
			}
			catch (Exception ex)
			{
				throw new Exception("Couldn't load file " + tabpath + "\nError: " + ex.Message);
			}
		}
Beispiel #2
0
		internal FeaturesEnum(IObjectProvider objProvider, Layer layer) : base(objProvider) {
			this.layer = layer;
		}
Beispiel #3
0
		protected internal Features(Layer layer) : 
			base(MiApi.mitab_c_get_feature_count(layer.Handle)) {
			this.Layer = layer;
		}
Beispiel #4
0
		/// <summary>
		/// Override this to support descendants of the Field class.
		/// </summary>
		/// <returns>A Field, with the given index, belonging to the given Layer</returns>
		protected internal virtual Field CreateField(Layer layer, int index) {
			return new Field(layer, index);
		}
Beispiel #5
0
		protected internal Feature(Layer layer, int featureId) {
			this.Id = featureId;
			this.Layer = layer;
			this.Handle = MiApi.mitab_c_read_feature(layer.Handle, featureId);
			this.Type = MiApi.mitab_c_get_type(Handle);
			this.Parts = CreateParts(this);
		}
Beispiel #6
0
		protected internal Fields(Layer layer):base(MiApi.mitab_c_get_field_count(layer.Handle)) {
			fields = new Field[Count];
			for (int i=0; i<Count; i++)
				fields[i] = CreateField(layer, i);
		}
Beispiel #7
0
		protected internal Field(Layer layer, int i) {
			this.Layer = layer;
			this.Index = i;
			this.Name = MiApi.mitab_c_get_field_name(layer.Handle, i);
			this.Type = MiApi.mitab_c_get_field_type(layer.Handle, i);
			this.Precision = (short) MiApi.mitab_c_get_field_precision(layer.Handle, i);
			this.Width = MiApi.mitab_c_get_field_width(layer.Handle, i);
		}
Beispiel #8
0
 protected internal Features(Layer layer) : base(MiApi.mitab_c_get_feature_count(layer.Handle))
 {
     this.Layer = layer;
 }
Beispiel #9
0
 internal FeaturesEnum(IObjectProvider objProvider, Layer layer) : base(objProvider)
 {
     this.layer = layer;
 }
Beispiel #10
0
 /// <summary>
 /// Override this to support descendants of the Field class.
 /// </summary>
 /// <returns>A Field, with the given index, belonging to the given Layer</returns>
 protected internal virtual Field CreateField(Layer layer, int index)
 {
     return(new Field(layer, index));
 }