diff --git a/appveyor.yml b/appveyor.yml
index d8e803d..ea05dc1 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -9,7 +9,7 @@
init:
- git config --global core.autocrlf true
- image: Visual Studio 2017
+ image: Visual Studio 2019
version: "{build}"
@@ -33,7 +33,7 @@
init:
- git config --global core.autocrlf true
- image: Visual Studio 2017
+ image: Visual Studio 2019
version: "{build}"
@@ -61,7 +61,7 @@
init:
- git config --global core.autocrlf true
- image: Visual Studio 2017
+ image: Visual Studio 2019
version: "{build}"
diff --git a/build.cake b/build.cake
index f78b2b6..0f79a14 100644
--- a/build.cake
+++ b/build.cake
@@ -9,7 +9,7 @@ var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");
var solution = "./Anywhere.ArcGIS.sln";
-var version = "1.11.1";
+var version = "1.12.0";
var versionSuffix = Environment.GetEnvironmentVariable("VERSION_SUFFIX");
//////////////////////////////////////////////////////////////////////
diff --git a/src/Anywhere.ArcGIS/Anywhere.ArcGIS.csproj b/src/Anywhere.ArcGIS/Anywhere.ArcGIS.csproj
index d76b852..c37ace3 100644
--- a/src/Anywhere.ArcGIS/Anywhere.ArcGIS.csproj
+++ b/src/Anywhere.ArcGIS/Anywhere.ArcGIS.csproj
@@ -15,7 +15,7 @@
https://github.com/davetimmins/Anywhere.ArcGIS
git
ArcGIS ArcGISServer ArcGISOnline Esri REST netstandard anywhere GIS Mapping Map Location GeoLocation OAuth
- 1.11.1
+ 1.12.0
LICENSE
diff --git a/src/Anywhere.ArcGIS/Operation/Query.cs b/src/Anywhere.ArcGIS/Operation/Query.cs
index 635e527..6bc1894 100644
--- a/src/Anywhere.ArcGIS/Operation/Query.cs
+++ b/src/Anywhere.ArcGIS/Operation/Query.cs
@@ -237,6 +237,27 @@ public string Time
///
[DataMember(Name = "outStatistics")]
public List OutputStatistics { get; set; }
+
+ ///
+ /// The buffer distance for the input geometries.
+ /// The distance unit is specified by units.
+ /// For example, if the distance is 100, the query geometry is a point, units is set to meters, and all points within 100 meters of the point are returned.
+ /// The geodesic buffer is created based on the datum of the output spatial reference if it exists.
+ /// If there is no output spatial reference, the input geometry spatial reference is used.
+ /// Otherwise, the native layer spatial reference is used to generate the geometry buffer used in the query.
+ /// This parameter only applies if supportsQueryWithDistance is true.
+ ///
+ [DataMember(Name = "distance")]
+ public double Distance { get; set; }
+
+ ///
+ /// The unit for calculating the buffer distance.
+ /// If unit is not specified, the default will be esriSRUnit_Foot when querying feature services in ArcGIS Enterprise, and esriSRUnit_Meter when querying feature services in ArcGIS Online.
+ /// This parameter only applies if supportsQueryWithDistance is true.
+ /// Values: esriSRUnit_Meter | esriSRUnit_StatuteMile | esriSRUnit_Foot | esriSRUnit_Kilometer | esriSRUnit_NauticalMile | esriSRUnit_USNauticalMile
+ ///
+ [DataMember(Name = "units")]
+ public string DistanceUnits { get; set; }
}
[DataContract]
@@ -444,6 +465,16 @@ public static class SpatialRelationshipTypes
public const string Relation = "esriSpatialRelRelation";
}
+ public static class BufferDistanceUnits
+ {
+ public const string Meters = "esriSRUnit_Meter";
+ public const string Miles = "esriSRUnit_StatuteMile";
+ public const string Feet = "esriSRUnit_Foot";
+ public const string Kilometers = "esriSRUnit_Kilometer";
+ public const string NauticalMiles = "esriSRUnit_NauticalMile";
+ public const string USNauticalMiles = "esriSRUnit_USNauticalMile";
+ }
+
public static class FieldDataTypes
{
public readonly static Dictionary> FieldDataTypeMap = new Dictionary>
diff --git a/src/Anywhere.ArcGIS/PortalGatewayBase.cs b/src/Anywhere.ArcGIS/PortalGatewayBase.cs
index 35f1883..d04ccc1 100644
--- a/src/Anywhere.ArcGIS/PortalGatewayBase.cs
+++ b/src/Anywhere.ArcGIS/PortalGatewayBase.cs
@@ -428,7 +428,10 @@ public virtual async Task>> Buffer(List> features,
if (ct.IsCancellationRequested) return null;
var result = features.UpdateGeometries(buffered.Geometries);
- if (result.First().Geometry.SpatialReference == null) result.First().Geometry.SpatialReference = spatialReference;
+ if (result.Any() && result?.First() != null && result.First().Geometry != null && result?.First()?.Geometry?.SpatialReference == null)
+ {
+ result.First().Geometry.SpatialReference = spatialReference;
+ }
return result;
}
diff --git a/tests/Anywhere.ArcGIS.Test.Integration/Anywhere.ArcGIS.Test.Integration.csproj b/tests/Anywhere.ArcGIS.Test.Integration/Anywhere.ArcGIS.Test.Integration.csproj
index fcaa842..89cb997 100644
--- a/tests/Anywhere.ArcGIS.Test.Integration/Anywhere.ArcGIS.Test.Integration.csproj
+++ b/tests/Anywhere.ArcGIS.Test.Integration/Anywhere.ArcGIS.Test.Integration.csproj
@@ -1,16 +1,16 @@
- netcoreapp2.0
+ netcoreapp3.1
-
-
+
+
-
+
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/tests/Anywhere.ArcGIS.Test/Anywhere.ArcGIS.Test.csproj b/tests/Anywhere.ArcGIS.Test/Anywhere.ArcGIS.Test.csproj
index 0c9d4de..57163a4 100644
--- a/tests/Anywhere.ArcGIS.Test/Anywhere.ArcGIS.Test.csproj
+++ b/tests/Anywhere.ArcGIS.Test/Anywhere.ArcGIS.Test.csproj
@@ -1,13 +1,13 @@
- netcoreapp2.0
+ netcoreapp3.1
-
+
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive