I’m using the attached shapefile and trying to load the projection based on the prj. However, when I use Proj4Projection.ConverPrjToProj4(path) it returns an empty string. I checked the prj file and it seems to have everything in there, so I must be missing something. Here is the code I’m using. The shapefile is attached. Thanks for any help you can provide.
featureLayer =newShapeFileFeatureLayer(layer.Path);stringprjPath = System.IO.Path.ChangeExtension(layer.Path,“prj”);Proj4Projection projection =newProj4Projection();projection.InternalProjectionParametersString = Proj4Projection.ConvertPrjToProj4(prjPath);projection.ExternalProjectionParametersString = Proj4Projection.GetDecimalDegreesParametersString();if(!string.IsNullOrWhiteSpace(projection.InternalProjectionParametersString) &&!string.IsNullOrWhiteSpace(projection.ExternalProjectionParametersString) &&projection.InternalProjectionParametersString != projection.ExternalProjectionParametersString){featureLayer.FeatureSource.Projection = projection;}
Streets.zip (1.47 MB)