This project has moved and is read-only. For the latest updates, please go here.

.DBF the ShapeFile

Jun 9, 2016 at 8:17 PM
I'm trying to shit he .DBF a shape file into another object C # to manipulate and make several validations and changes.
But I do not like getting DBF as a table; someone can show me something that can help me.

This is the code for my load shp:
            __ _SharpMap.Data.Providers.ShapeFile DataShapeFile = null;
                 DataShapeFile = CargarShape (p_shape);
                 FeatureShapeFile var = DataShapeFile.GetFeature (j);___

cargarShape (p_shape) is a method with varied route based processes

I can then have this:

  __ _ShapeFilecaposdbf var = FeatureShapeFile.ItemArray;
                         Session ["dbfcodSolicitud"] = ShapeFilecaposdbf [1] .ToString ();
                         Session ["dbfcodfinca"] = ShapeFilecaposdbf [2] .ToString ();___

Here I can have what has the dbf but parts like arrangement, I need a table for your headers could also someone please help me
Jun 10, 2016 at 7:06 AM
I'm not sure if I understand what you are trying to do so I try to put it in my words:

You want to mix the geometries defined in a shapefile with some custom, on-the-fly created attribute data?
Jun 13, 2016 at 5:44 PM
No, I want to get the shape .DBF file as a table in C #. "DataTable"

To manipulate all .DBF as a board can ask column names and data which brings each column.
Regardless of position or order of the data.

I described how to make it limits me to the shape he .DBF file must come ordered positions to read smoothly.
But I want to read and get what I need no matter how sort the column names and column data in your example:

Id Name use relationship
12345 alontriany 234,567 22

Name Id relationship use
alontriany 12567 56 23426,456

Jun 14, 2016 at 7:59 AM
Edited Jun 14, 2016 at 12:30 PM

Have you tried setting up a DataView of the FeatureDataTable. If I'm not mistaken, you can reorder, omit, compute, ..., columns as you like when you do that.