# How create prj file when create shape file

**URL:** <https://community.thinkgeo.com/t/how-create-prj-file-when-create-shape-file/1821>\
**Category:** WinForms\
**Created:** [October 26, 2011, 10:01pm UTC](https://community.thinkgeo.com/t/how-create-prj-file-when-create-shape-file/1821 "2011-10-26T22:01:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/3da27b/32.png) [@Steve1](https://community.thinkgeo.com/u/Steve1)\
**Post date:** [October 26, 2011, 10:01pm UTC](https://community.thinkgeo.com/t/how-create-prj-file-when-create-shape-file/1821/1 "2011-10-26T22:01:51Z")

</div>

&nbsp;Hi

I&nbsp;am&nbsp;allowing&nbsp;my&nbsp;user&nbsp;to&nbsp;draw&nbsp;a&nbsp;shape&nbsp;file&nbsp;and&nbsp;save&nbsp;it.&nbsp;I&nbsp;use&nbsp;ShapeFileFeatureLayer.CreateShapeFile&nbsp;to&nbsp;do&nbsp;this.

My&nbsp;user&nbsp;says&nbsp;that&nbsp;the&nbsp;shape&nbsp;files&nbsp;that&nbsp;are&nbsp;created&nbsp;are&nbsp;not&nbsp;suitable&nbsp;for&nbsp;their&nbsp;use&nbsp;as&nbsp;there&nbsp;is&nbsp;no&nbsp;.prj&nbsp;file&nbsp;generated.

How&nbsp;do&nbsp;I&nbsp;generate&nbsp;a&nbsp;.prj&nbsp;file?

Cheers

Steve

---

<div class="post-metadata">

**Author:** ![Val](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/v/e56c9b/32.png) [@Val](https://community.thinkgeo.com/u/Val)\
**Post date:** [October 27, 2011, 10:51am UTC](https://community.thinkgeo.com/t/how-create-prj-file-when-create-shape-file/1821/2 "2011-10-27T10:51:35Z")

</div>

Steve,

&nbsp;&nbsp;The&nbsp;.PRJ&nbsp;file&nbsp;itself&nbsp;is&nbsp;a&nbsp;regular&nbsp;text&nbsp;file&nbsp;with&nbsp;the&nbsp;.prj&nbsp;extension&nbsp;and&nbsp;with&nbsp;the&nbsp;PRJ&nbsp;string&nbsp;that&nbsp;needs&nbsp;to&nbsp;accompany&nbsp;the&nbsp;.shp,&nbsp;.shx&nbsp;and&nbsp;.dbf&nbsp;files.&nbsp;So,&nbsp;to&nbsp;create&nbsp;the&nbsp;PRJ&nbsp;file,&nbsp;it&nbsp;is&nbsp;about&nbsp;general&nbsp;programming&nbsp;using&nbsp;the&nbsp;IO&nbsp;functions.&nbsp;You&nbsp;can&nbsp;find&nbsp;many&nbsp;examples&nbsp;on&nbsp;the&nbsp;web&nbsp;for&nbsp;creating&nbsp;files.&nbsp;The&nbsp;more&nbsp;specific&nbsp;questions&nbsp;to&nbsp;MapSuite&nbsp;and&nbsp;GIS&nbsp;are:&nbsp;Do&nbsp;you&nbsp;know&nbsp;exactly&nbsp;what&nbsp;PRJ&nbsp;string&nbsp;to&nbsp;use?&nbsp;Do&nbsp;you&nbsp;already&nbsp;know&nbsp;the&nbsp;proj4&nbsp;string&nbsp;and&nbsp;you&nbsp;want&nbsp;to&nbsp;convert&nbsp;to&nbsp;PRJ&nbsp;string?&nbsp;Do&nbsp;you&nbsp;know&nbsp;the&nbsp;EPSG&nbsp;code&nbsp;([spatialreference.org/](http://spatialreference.org/)&nbsp;)of&nbsp;the&nbsp;projection&nbsp;and&nbsp;want&nbsp;to&nbsp;convert&nbsp;to&nbsp;PRJ&nbsp;string?&nbsp;You&nbsp;just&nbsp;know&nbsp;the&nbsp;general&nbsp;information&nbsp;about&nbsp;the&nbsp;projection&nbsp;and&nbsp;you&nbsp;are&nbsp;trying&nbsp;to&nbsp;find&nbsp;the&nbsp;PRJ&nbsp;string?

&nbsp;I&nbsp;don't&nbsp;know&nbsp;what&nbsp;your&nbsp;case&nbsp;is&nbsp;but&nbsp;let&nbsp;me&nbsp;give&nbsp;you&nbsp;some&nbsp;various&nbsp;info:

-To&nbsp;get&nbsp;the&nbsp;PRJ&nbsp;string&nbsp;from&nbsp;proj4&nbsp;string,&nbsp;we&nbsp;have&nbsp;the&nbsp;API:&nbsp;Proj4Projection.ConvertProj4ToProj()

-To&nbsp;get&nbsp;the&nbsp;PRJ&nbsp;string&nbsp;from&nbsp;the&nbsp;EPSG&nbsp;code,&nbsp;we&nbsp;have&nbsp;the&nbsp;API:&nbsp;Proj4Projection.ConvertEpsgToPrj()

-To&nbsp;get&nbsp;the&nbsp;PRJ&nbsp;string&nbsp;from&nbsp;some&nbsp;general&nbsp;projection&nbsp;info,&nbsp;you&nbsp;can&nbsp;do&nbsp;a&nbsp;search&nbsp;in&nbsp;[spatialreference.org/](http://spatialreference.org/)&nbsp;to&nbsp;find&nbsp;the&nbsp;exact&nbsp;projection&nbsp;that&nbsp;you&nbsp;need&nbsp;and&nbsp;the&nbsp;PRJ&nbsp;string&nbsp;will&nbsp;be&nbsp;available&nbsp;to&nbsp;you.

I&nbsp;hope&nbsp;that&nbsp;this&nbsp;is&nbsp;usefull&nbsp;info&nbsp;for&nbsp;you.&nbsp;Thank&nbsp;you.
