# How to display shapefiles

**URL:** <https://mapwindow.discourse.group/t/how-to-display-shapefiles/560>\
**Category:** MapWinGIS\
**Created:** [May 14, 2020, 11:42pm UTC](https://mapwindow.discourse.group/t/how-to-display-shapefiles/560 "2020-05-14T23:42:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kayumiy](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/kayumiy/32/233_2.png) [@Kayumiy](https://mapwindow.discourse.group/u/Kayumiy)\
**Post date:** [May 14, 2020, 11:42pm UTC](https://mapwindow.discourse.group/t/how-to-display-shapefiles/560/1 "2020-05-14T23:42:44Z")

</div>

I have 3 data files which are:

- .shp
- .shx
- .dbf

I need to display these files in the map.  
Is it possible tp render these three files in the map by using MapWindow?  
I could load .shp file but I am not sure about .shx, .dbf files.

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [May 15, 2020, 5:11am UTC](https://mapwindow.discourse.group/t/how-to-display-shapefiles/560/2 "2020-05-15T05:11:58Z")

</div>

Hello @Kayumiy, and welcome.

Those 3 files are the minimum required (e.g. they all have to exist), but you only have to open the Shapefile (.shp), and the others will be opened internally by the library.

You can use the [FileManager OpenShapefile](https://www.mapwindow.org/documentation/mapwingis4.9/class_file_manager.html#aeeaa1fd541f8dd230928551820868e98) method, or the [Shapefile Open](https://www.mapwindow.org/documentation/mapwingis4.9/group __shapefile__ management.html#ga20dd5a465b84543916144eb515e9e9fd) method.

If you want to go straight to the map to add the layer, you can simply call [axMap.AddLayerFromFilename](https://www.mapwindow.org/documentation/mapwingis4.9/group __map__ layer__management.html#gafe3a6d4ebaf64e8b68c8c8dd0ddbb0d0), which will open the Shapefile and add it to the map in one call.

Regards.  
Jerry.

---

<div class="post-metadata">

**Author:** ![pmeems](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/pmeems/32/9_2.png) [@pmeems](https://mapwindow.discourse.group/u/pmeems)\
**Post date:** [January 5, 2022, 3:09pm UTC](https://mapwindow.discourse.group/t/how-to-display-shapefiles/560/3 "2022-01-05T15:09:02Z")

</div>


