Hi,
I have tested this with the Daily Development Build 5.5.26.0 and also with the latest production release version 5.5.0.0.
The error only happens under certain circumstances.
- There is a layer in a geographic coordinate system, NAD83, units of decimal degree.
- This layer is projected to a different (projected) coordinate system, NAD83 Zone 16N.
- A feature in the layer is edited and the transaction remains open.
- After the edit occurs any attempt to use GetFeaturesWithinDistanceOf results in an ArgumentOutOfRange exception.
System.ArgumentOutOfRangeException was unhandled
Message=The decimal degree longitude value you provided was out of range.
Parameter name: fromLongitude
ParamName=fromLongitude
Source=MapSuiteCore
StackTrace:
at exQ=.cTs=.xzs=(Double yDs=, String yTs=)
at ThinkGeo.MapSuite.Core.DecimalDegreesHelper.GetDistanceFromDecimalDegrees(Double fromLongitude, Double fromLatitude, Double toLongitude, Double toLatitude, DistanceUnit returningUnit)
at ThinkGeo.MapSuite.Core.DecimalDegreesHelper.B0c=(Double CEc=, Double CUc=, Double Ckc=, Double C0c=, PointShape DEc=, DistanceUnit DUc=)
at ThinkGeo.MapSuite.Core.LineShape.mU4=(PointShape wFI=, GeographyUnit wVI=, DistanceUnit wlI=, PointShape& w1I=, Double& xFI=)
at ThinkGeo.MapSuite.Core.LineShape.GetDistanceToCore(BaseShape targetShape, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
at ThinkGeo.MapSuite.Core.BaseShape.GetDistanceTo(BaseShape targetShape, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
at ThinkGeo.MapSuite.Core.PolygonShape.GetDistanceToCore(BaseShape targetShape, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
at ThinkGeo.MapSuite.Core.BaseShape.GetDistanceTo(BaseShape targetShape, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
at ThinkGeo.MapSuite.Core.MultipolygonShape.GetDistanceToCore(BaseShape targetShape, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
at ThinkGeo.MapSuite.Core.BaseShape.GetDistanceTo(BaseShape targetShape, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
at ThinkGeo.MapSuite.Core.FeatureSource.GetFeaturesWithinDistanceOf(BaseShape targetShape, GeographyUnit unitOfData, DistanceUnit distanceUnit, Double distance, IEnumerable`1 returningColumnNames)
at ThinkGeo.MapSuite.Core.FeatureSource.GetFeaturesWithinDistanceOf(BaseShape targetShape, GeographyUnit unitOfData, DistanceUnit distanceUnit, Double distance, ReturningColumnsType returningColumnNamesType)
at ThinkGeo.MapSuite.Core.QueryTools.GetFeaturesWithinDistanceOf(BaseShape targetShape, GeographyUnit unitOfData, DistanceUnit distanceUnit, Double distance, ReturningColumnsType returningColumnNamesType)
at DeleteTest.Form1.WinformsMap1_MapClick(Object sender, MapClickWinformsMapEventArgs e) in C:\Users\steller\Documents\Visual Studio 2010\Projects\ThinkGeo\DistanceSearchProjectedDegrees\Form1.vb:line 125
at ThinkGeo.MapSuite.DesktopEdition.WinformsMap.OnMapClick(MapClickWinformsMapEventArgs e)
at ThinkGeo.MapSuite.DesktopEdition.WinformsMap.KhY=(InteractionArguments KxY=)
at ThinkGeo.MapSuite.DesktopEdition.WinformsMap.EBY=(Object ERY=, 6Bc= EhY=)
at 8BM=.jhU=.OnMouseEvent(6Bc= e)
at 8BM=.jhU=.uRU=(Object uhU=, EventArgs uxU=)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at DeleteTest.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
This is not a problem if the transaction is committed following the edit. It is also not a problem if the layer is not projected into a different coordinate system.
I have attached a sample project, please let me know if this is a bug or if I'm just not doing something right.
Thanks!
Steve
DistanceSearchProjectedDegrees.zip (30.5 KB)