From a7a3d8fa1de514958ea503659f219c73eb656e98 Mon Sep 17 00:00:00 2001 From: Domenico Ciavarella Date: Fri, 10 Nov 2017 18:35:57 +0100 Subject: [PATCH] Fixed problem weight bitgate --- GeometricNetworkUtility.cs | 6 +++--- Properties/AssemblyInfo.cs | 10 +++++----- README.md | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/GeometricNetworkUtility.cs b/GeometricNetworkUtility.cs index 5c1ef47..4cc7f7f 100644 --- a/GeometricNetworkUtility.cs +++ b/GeometricNetworkUtility.cs @@ -1469,7 +1469,7 @@ private byte[] TraceGeometryNetwork(NameValueCollection boundVariables, JsonObje int valueWeight; if (int.TryParse(n, out valueWeight)) { - if ((weightType == esriWeightType.esriWTBitGate) && (Convert.ToString(valueWeight, 2).Length != netJunctionFilterWeight.BitGateSize)) + if ((weightType == esriWeightType.esriWTBitGate) && (Convert.ToString(valueWeight, 2).Length > netJunctionFilterWeight.BitGateSize)) { throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "{0} not valid (BitGateSize)", junctionFilterRanges), methodName); } @@ -1637,7 +1637,7 @@ private byte[] TraceGeometryNetwork(NameValueCollection boundVariables, JsonObje { if (range.Length == 1) { - if ((weightType == esriWeightType.esriWTBitGate) && (Convert.ToString(valueWeight, 2).Length != netFromToEdgeFilterWeight.BitGateSize) && (Convert.ToString(valueWeight, 2).Length != netToFromEdgeFilterWeight.BitGateSize)) + if ((weightType == esriWeightType.esriWTBitGate) && (Convert.ToString(valueWeight, 2).Length > netFromToEdgeFilterWeight.BitGateSize) && (Convert.ToString(valueWeight, 2).Length > netToFromEdgeFilterWeight.BitGateSize)) { throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "{0} not valid (BitGateSize)", edgeFilterRanges), methodName); } @@ -1657,7 +1657,7 @@ private byte[] TraceGeometryNetwork(NameValueCollection boundVariables, JsonObje edgeFilterRangesTo.Add(valueWeight); int fromEdge = (int)edgeFilterRangesFrom[edgeFilterRangesFrom.Count - 1]; int toEdge = (int)edgeFilterRangesTo[edgeFilterRangesTo.Count - 1]; - if ((weightType == esriWeightType.esriWTBitGate) && (Convert.ToString(fromEdge, 2).Length != netFromToEdgeFilterWeight.BitGateSize) && (Convert.ToString(toEdge, 2).Length != netToFromEdgeFilterWeight.BitGateSize)) + if ((weightType == esriWeightType.esriWTBitGate) && (Convert.ToString(fromEdge, 2).Length > netFromToEdgeFilterWeight.BitGateSize) && (Convert.ToString(toEdge, 2).Length > netToFromEdgeFilterWeight.BitGateSize)) { throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "{0} not valid (BitGateSize)", edgeFilterRanges), methodName); } diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index ac14470..bfc2f40 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -17,7 +17,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Studio A&T s.r.l.")] [assembly: AssemblyProduct("GeometricNetworkUtility")] -[assembly: AssemblyCopyright("Copyright © Studio A&T s.r.l. 2012")] +[assembly: AssemblyCopyright("Copyright © Studio A&T s.r.l. 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -39,16 +39,16 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.3.0.0")] +[assembly: AssemblyFileVersion("1.3.0.0")] [assembly: AddInPackage("Studioat.ArcGis.Soe.Rest.GeometricNetworkUtility", "f15446f6-4217-4c50-a970-078c0b64a20a", Author = "nicogis", Company = "Studio A&T s.r.l.", Description = "Geometric Network Utility", TargetProduct = "Server", - TargetVersion = "10.4", - Version = "1.2")] + TargetVersion = "10.5", + Version = "1.3")] [module: SuppressMessage("Microsoft.Design", "CA1014:MarkAssembliesWithClsCompliant", Justification = "-")] [module: SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Justification = "-", Scope = "namespace", Target = "Studioat.ArcGis.Soe.Rest")] diff --git a/README.md b/README.md index 48fc26b..8ddcdec 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Geometric Network Utility SOE Rest -This solution (developed in c#) creates a SOE Rest in arcgis server 10.4.1 or superior for these operations: +This solution (developed in c#) creates a SOE Rest in arcgis server 10.5.1 or superior for these operations: - TraceNetwork - ValveIsolation