I am new to Map Suite Desktop also so I'm not an expert. I do know that Map Suite Desktop (MSD) doesn't know anything about prj files. In order for shapefiles in different coordinate systems to display property together you must know in advance what EPSG number goes with each of your shapefiles and the EPSG number that represents the coordinate system in which they should be displayed. You do so as follows:
ShapeFileFeatureLayer railsLayer = new ShapeFileFeatureLayer(@"C:\CR\railways.shp"); Proj4Projection proj4Projection = new Proj4Projection(); proj4Projection.InternalProjectionParametersString = Proj4Projection.GetEpsgParametersString(4326); proj4Projection.ExternalProjectionParametersString = Proj4Projection.GetEpsgParametersString(2163); railsLayer.FeatureSource.Projection = proj4Projection;
This example assumes that the shapefiles is in geographic coordinate system EPSG 4326 (WGS84, its 'internal' projection) and will be displayed in EPSG 2163 (
US National Atlas Equal Area).
It's a bit of an inconvenience, but not too hard to work around.
Steven, Thanks for your sharing, I appreciate it very much.
Tomas, I have to admit that the .prj was not supported yet in MapSuite component, this enhancement is already in our working list. We will try to get it supported in future versions. Sorry for the inconvenience for now.
Thank you for all the answers. It would explain, why the projection didn't feel right. Do you know, whether you can get above mentioned number by examining the projection file ? I have had trouble figuring out the OpenStreetMap shapefiles projection from their website or other information sources and looking in the prj file might give me an answer (if I knew how, I can see only nulls in the file now).