public override DbGeometry GeometryFromProviderValue(object providerValue)
        {
            providerValue.CheckNull("providerValue");
            object normalizedProviderValue = NormalizeProviderValue(providerValue, this.SqlTypes.SqlGeometryType);

            return(this.SqlTypes.IsSqlGeometryNull(normalizedProviderValue) ? null : DbSpatialServices.CreateGeometry(this, normalizedProviderValue));
        }
 public override DbGeometry GeometryFromProviderValue(object providerValue)
 {
     return
         (providerValue == null || ((dynamic)providerValue).IsNull ?
          null :
          DbSpatialServices.CreateGeometry(this, providerValue));
 }
Example #3
0
        public override DbGeometry GeometryFromText(string geometryText)
        {
            geometryText.CheckNull("geometryText");
            ReadOnlySpatialValues backingValue = new ReadOnlySpatialValues(DbGeometry.DefaultCoordinateSystemId, textValue: geometryText, binaryValue: null, gmlValue: null);

            return(DbSpatialServices.CreateGeometry(this, backingValue));
        }
Example #4
0
        public override DbGeometry GeometryFromGml(string geometryMarkup, int spatialReferenceSystemId)
        {
            geometryMarkup.CheckNull("geometryMarkup");
            ReadOnlySpatialValues backingValue = new ReadOnlySpatialValues(spatialReferenceSystemId, textValue: null, binaryValue: null, gmlValue: geometryMarkup);

            return(DbSpatialServices.CreateGeometry(this, backingValue));
        }
Example #5
0
        public override DbGeometry GeometryFromBinary(byte[] geometryBinary, int spatialReferenceSystemId)
        {
            geometryBinary.CheckNull("geometryBinary");
            ReadOnlySpatialValues backingValue = new ReadOnlySpatialValues(spatialReferenceSystemId, textValue: null, binaryValue: geometryBinary, gmlValue: null);

            return(DbSpatialServices.CreateGeometry(this, backingValue));
        }
Example #6
0
 public override DbGeometry GeometryFromGml(
     string geometryMarkup,
     int spatialReferenceSystemId)
 {
     Check.NotNull <string>(geometryMarkup, nameof(geometryMarkup));
     return(DbSpatialServices.CreateGeometry((DbSpatialServices)this, (object)new DefaultSpatialServices.ReadOnlySpatialValues(spatialReferenceSystemId, (string)null, (byte[])null, geometryMarkup)));
 }
Example #7
0
 public override DbGeometry GeometryFromBinary(
     byte[] geometryBinary,
     int spatialReferenceSystemId)
 {
     Check.NotNull <byte[]>(geometryBinary, nameof(geometryBinary));
     return(DbSpatialServices.CreateGeometry((DbSpatialServices)this, (object)new DefaultSpatialServices.ReadOnlySpatialValues(spatialReferenceSystemId, (string)null, geometryBinary, (string)null)));
 }
Example #8
0
 public override DbGeometry GeometryFromText(string geometryText)
 {
     Check.NotNull <string>(geometryText, nameof(geometryText));
     return(DbSpatialServices.CreateGeometry((DbSpatialServices)this, (object)new DefaultSpatialServices.ReadOnlySpatialValues(DbGeometry.DefaultCoordinateSystemId, geometryText, (byte[])null, (string)null)));
 }
Example #9
0
 public override DbGeometry GeometryFromProviderValue(object providerValue)
 {
     Check.NotNull <object>(providerValue, nameof(providerValue));
     return(DbSpatialServices.CreateGeometry((DbSpatialServices)this, (object)DefaultSpatialServices.CheckProviderValue(providerValue)));
 }