Shapefile layer won't load in MapView without .prj file

332
2
Jump to solution
06-02-2020 12:56 PM
AbrahamFisher
New Contributor

I am trying to add layers to a MapView Map in .NET.  I have several dozen layers created some years ago that load and display just fine via ArcGIS Pro (Desktop), plus 3 or 4 layers that were created just recently.  In .NET, using the SDK I can load the recently created layers but not the older ones. 

Both old and new layers have .shp, .shx and .dbf files.  The newer layers, in addition to these three required files also have .prj and .cpg files.  After some trial and error, it appears that it is the .prj file that is needed to get the layers to load and display in the Map object.  I am at a loss however as to how to generate these .prj files for the older layers that do not have them.

Thank you.

0 Kudos
1 Solution

Accepted Solutions
MichaelBranscomb
Esri Frequent Contributor
0 Kudos
2 Replies
MichaelBranscomb
Esri Frequent Contributor

Hi,

Can you try using the Define Projection tool in ArcGIS Pro?

Thanks

Mike

0 Kudos
AbrahamFisher
New Contributor

Thank you Mike! It took a good bit of playing around and experimenting, but that tool did indeed do just what I needed.

Much appreciated!

Abe

0 Kudos