This project is read-only.

Selecting shapefile attributes and setting colours

Feb 15, 2014 at 2:09 PM

A couple of noob questions but I have been having trouble with finding the right examples or documentation.

What I am hoping to do is load a shapefile that has many shapes that reside within each other with potentially multiple attributes and plot the shape file with many colours depending on the attribute values. Then have the ability to select specific shapes, find the attributes associated with that shape, change it and then resave the shape file. An example would be a rainfall accumulation map where each colour indicates how much rainfall fell but other information could also be stored within the shapefile.

Most of the above is fine and have gotten it done (got a C# application which can load a shapefile, pan, zoom and select an individual shape), but I cannot seem to find how to get the value for the attributes associated with that shape when they are clicked and selected and how to set the colours of the shapes based on the attribute values upon loading.

Does anyone have any possible code snippets which may help, past posts or something like that?? I am doing everything in C# but have used VB in the past