Skip to content

Commit

Permalink
Fixed problem weight bitgate
Browse files Browse the repository at this point in the history
  • Loading branch information
nicogis committed Nov 10, 2017
1 parent 76c0c04 commit a7a3d8f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions GeometricNetworkUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down
10 changes: 5 additions & 5 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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("")]

Expand All @@ -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")]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit a7a3d8f

Please sign in to comment.