public void SetUp() { var gss = new NetTopologySuite.NtsGeometryServices(); var css = new SharpMap.CoordinateSystems.CoordinateSystemServices( new ProjNet.CoordinateSystems.CoordinateSystemFactory(System.Text.Encoding.ASCII), new ProjNet.CoordinateSystems.Transformations.CoordinateTransformationFactory(), SharpMap.Converters.WellKnownText.SpatialReference.GetAllReferenceSystems()); GeoAPI.GeometryServiceProvider.Instance = gss; SharpMap.Session.Instance .SetGeometryServices(gss) .SetCoordinateSystemServices(css) .SetCoordinateSystemRepository(css); }
public void RunBeforeAnyTests() { var gss = new NetTopologySuite.NtsGeometryServices(); var css = new SharpMap.CoordinateSystems.CoordinateSystemServices( new ProjNet.CoordinateSystems.CoordinateSystemFactory(), new ProjNet.CoordinateSystems.Transformations.CoordinateTransformationFactory(), SharpMap.Converters.WellKnownText.SpatialReference.GetAllReferenceSystems()); GeoAPI.GeometryServiceProvider.Instance = gss; SharpMap.Session.Instance .SetGeometryServices(gss) .SetCoordinateSystemServices(css) .SetCoordinateSystemRepository(css); _stopWatch = new System.Diagnostics.Stopwatch(); System.Diagnostics.Trace.WriteLine("Starting tests"); _stopWatch.Start(); }
public void RunBeforeAnyTests() { var gss = new NetTopologySuite.NtsGeometryServices(); var css = new SharpMap.CoordinateSystems.CoordinateSystemServices( new ProjNet.CoordinateSystems.CoordinateSystemFactory(), new ProjNet.CoordinateSystems.Transformations.CoordinateTransformationFactory(), SharpMap.Converters.WellKnownText.SpatialReference.GetAllReferenceSystems()); GeoAPI.GeometryServiceProvider.Instance = gss; SharpMap.Session.Instance .SetGeometryServices(gss) .SetCoordinateSystemServices(css) .SetCoordinateSystemRepository(css); // plug-in WebMercator so that correct spherical definition is directly available to Layer Transformations using SRID var pcs = (ProjNet.CoordinateSystems.ProjectedCoordinateSystem)ProjNet.CoordinateSystems.ProjectedCoordinateSystem.WebMercator; css.AddCoordinateSystem((int)pcs.AuthorityCode, pcs); _stopWatch = new System.Diagnostics.Stopwatch(); System.Diagnostics.Trace.WriteLine("Starting tests"); _stopWatch.Start(); }