# Retrieving shapefile point color from .SHP file?

**URL:** <https://mapwindow.discourse.group/t/retrieving-shapefile-point-color-from-shp-file/1502>\
**Category:** Uncategorized\
**Created:** [February 9, 2023, 11:14pm UTC](https://mapwindow.discourse.group/t/retrieving-shapefile-point-color-from-shp-file/1502 "2023-02-09T23:14:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericpalmatier](https://avatars.discourse-cdn.com/v4/letter/e/dbc845/32.png) [@ericpalmatier](https://mapwindow.discourse.group/u/ericpalmatier)\
**Post date:** [February 9, 2023, 11:14pm UTC](https://mapwindow.discourse.group/t/retrieving-shapefile-point-color-from-shp-file/1502/1 "2023-02-09T23:14:26Z")

</div>

I have been fighting with shapefiles for a little over a week now and I am guessing that I am missing a very crucial feature. When I add a shapefile, I can draw it by manually adjusting the fillcolor, pointsize, filltransparency, etc… but what about retrieving that information from the shapefile itself? If i Make a shapefile in ArcGIS or qGIS, and I set those attributes before I save it, shouldn’t MapWinGIS be able to retrieve that data without having to set it?

I just need somebody to point me in the right direction here. I am coding in [VB.net](http://VB.net).

---

<div class="post-metadata">

**Author:** ![ericpalmatier](https://avatars.discourse-cdn.com/v4/letter/e/dbc845/32.png) [@ericpalmatier](https://mapwindow.discourse.group/u/ericpalmatier)\
**Post date:** [February 9, 2023, 11:43pm UTC](https://mapwindow.discourse.group/t/retrieving-shapefile-point-color-from-shp-file/1502/2 "2023-02-09T23:43:57Z")

</div>

I also want to add that I have seen many posts on this forum that dont quite ask this quesiton. this post "  
[Where can I get shapefile data](https://mapwindow.discourse.group/t/where-can-i-get-shapefile-data/1079) " got me to the two examples listed within, but the point options are set within the code, not retrieved from the shapefile.

So two questions. Can we retrieve point/polygon drawing options FROM the shapefile? or must we set them AFTER the shapefile is loaded?

thanks again.

---

<div class="post-metadata">

**Author:** ![Daniel\_Heden](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@Daniel\_Heden](https://mapwindow.discourse.group/u/Daniel_Heden)\
**Post date:** [February 15, 2023, 7:23am UTC](https://mapwindow.discourse.group/t/retrieving-shapefile-point-color-from-shp-file/1502/3 "2023-02-15T07:23:54Z")

</div>

Hi,

The “symbology” information (how a shapefile is drawn) is not stored in the shapefile.  
In the case of ArcGIS (ArcMap) it is stored in the map document (.mxd).  
A shapefile only contains the data for the layer like: Geometry and Attributes att a minimum.  
And a shapefile is not a single file but a collection of files where only the file extension differ.

Here you can read all about how and what is stored in ha shapefile

> **[shapefile.pdf](https://www.esri.com/content/dam/esrisites/sitecore-archive/Files/Pdfs/library/whitepapers/pdfs/shapefile.pdf)**
>
> 123.79 KB

Regards  
Daniel

---

<div class="post-metadata">

**Author:** ![ericpalmatier](https://avatars.discourse-cdn.com/v4/letter/e/dbc845/32.png) [@ericpalmatier](https://mapwindow.discourse.group/u/ericpalmatier)\
**Post date:** [February 16, 2023, 9:51pm UTC](https://mapwindow.discourse.group/t/retrieving-shapefile-point-color-from-shp-file/1502/4 "2023-02-16T21:51:41Z")

</div>

Thank you so much for your reply. So it sounds like the best thing I can do is allow the user to import the Shapefile, and then manually adjust the layer settings. That’s cumbersome but workable. I already have a basic UI that lets the user adjust basic layer characteristics while the application is running, it just seems slow and repetitive unless I come up with a way to save a layer settings memory file of some sort.

The ESRI document you pointed me to was extremely interesting. Thanks for that as well.

Regards,  
Eric

---

<div class="post-metadata">

**Author:** ![yixing](https://avatars.discourse-cdn.com/v4/letter/y/71e660/32.png) [@yixing](https://mapwindow.discourse.group/u/yixing)\
**Post date:** [October 25, 2023, 1:47pm UTC](https://mapwindow.discourse.group/t/retrieving-shapefile-point-color-from-shp-file/1502/5 "2023-10-25T13:47:35Z")

</div>

I have some C# simple code:  
Shpfile = open.FileName;  
bool openResult = sf.Open(Shpfile, null);  
float temp = sf.DefaultDrawingOptions.LineWidth;  
uint lincolor = sf.DefaultDrawingOptions.LineColor;  
other attributes are similar.  
I hope it is useful.
