Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ISpatialReference getSpatialReference_byCode(int srid)
- {
- ISpatialReference spatialReference;
- ISpatialReferenceFactory sr_factory = new SpatialReferenceEnvironmentClass();
- try
- {
- spatialReference = sr_factory.CreateGeographicCoordinateSystem(srid);
- }
- catch
- {
- try
- {
- spatialReference = sr_factory.CreateProjectedCoordinateSystem(srid);
- }
- catch
- {
- throw new NotImplementedException("This is an unkown Spatial Reference");
- }
- }
- return spatialReference;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement