protected virtual bool IsValid(EpsgArea area)
 {
     return(area == null ||
            FromArea == null ||
            FromArea.Intersects(area) ||
            ToArea == null ||
            ToArea.Intersects(area));
 }
Example #2
0
 internal EpsgDatum(ushort code, string name, EpsgArea area)
 {
     Contract.Requires(!String.IsNullOrEmpty(name));
     Contract.Requires(area != null);
     _code = code;
     Name  = name;
     Area  = area;
 }
Example #3
0
 internal EpsgCrsDatumBased(int code, string name, EpsgArea area, bool deprecated, EpsgCoordinateSystem cs)
     : base(code, name, area, deprecated)
 {
     Contract.Requires(code >= 0);
     Contract.Requires(!String.IsNullOrEmpty(name));
     Contract.Requires(area != null);
     Contract.Requires(cs != null);
     CoordinateSystem = cs;
 }
 public EpsgTransformGraph(EpsgArea fromArea, EpsgArea toArea, SharedOptions options)
 {
     Contract.Requires(fromArea != null);
     Contract.Requires(toArea != null);
     Contract.Requires(options != null);
     _options      = options;
     _crsValidator = _options.CreateCrsValidator(fromArea, toArea);
     _opValidator  = _options.CreateOperationValidator(fromArea, toArea);
 }
Example #5
0
 internal EpsgCrsGeocentric(int code, string name, EpsgArea area, bool deprecated, EpsgCoordinateSystem cs, EpsgDatumGeodetic geodeticDatum, EpsgCrsGeodetic baseCrs, int baseOperationCode)
     : base(code, name, area, deprecated, cs, geodeticDatum, baseCrs, baseOperationCode)
 {
     Contract.Requires(code >= 0);
     Contract.Requires(!String.IsNullOrEmpty(name));
     Contract.Requires(area != null);
     Contract.Requires(cs != null);
     Contract.Requires(geodeticDatum != null);
 }
Example #6
0
 internal EpsgCrsVertical(int code, string name, EpsgArea area, bool deprecated, EpsgCoordinateSystem cs, EpsgDatumVertical datum)
     : base(code, name, area, deprecated, cs)
 {
     Contract.Requires(code >= 0);
     Contract.Requires(!String.IsNullOrEmpty(name));
     Contract.Requires(area != null);
     Contract.Requires(cs != null);
     Contract.Requires(datum != null);
     VerticalDatum = datum;
 }
Example #7
0
 internal EpsgCrsProjected(int code, string name, EpsgArea area, bool deprecated, EpsgCoordinateSystem cs, EpsgDatumGeodetic datum, EpsgCrsGeodetic baseCrs, int projectionCode)
     : base(code, name, area, deprecated, cs, datum, baseCrs, projectionCode)
 {
     Contract.Requires(code >= 0);
     Contract.Requires(!String.IsNullOrEmpty(name));
     Contract.Requires(area != null);
     Contract.Requires(baseCrs != null);
     Contract.Requires(cs != null);
     Contract.Requires(datum != null);
 }
Example #8
0
 internal EpsgCrs(int code, string name, EpsgArea area, bool deprecated)
 {
     Contract.Requires(code >= 0);
     Contract.Requires(!String.IsNullOrEmpty(name));
     Contract.Requires(area != null);
     _code       = code;
     Name        = name;
     _area       = area;
     _deprecated = deprecated;
 }
Example #9
0
 public bool IntersectsAll(EpsgArea area)
 {
     Contract.Requires(area != null);
     if (SourceArea == null)
     {
         return(TargetArea == null || TargetArea.Intersects(area));
     }
     else
     {
         return(SourceArea.Intersects(area) &&
                (TargetArea == null || TargetArea.Intersects(area)));
     }
 }
Example #10
0
 internal EpsgCrsCompound(
     int code, string name, EpsgArea area, bool deprecated,
     EpsgCrsDatumBased horizontal, EpsgCrsVertical vertical
     )
     : base(code, name, area, deprecated)
 {
     Contract.Requires(code >= 0);
     Contract.Requires(!String.IsNullOrEmpty(name));
     Contract.Requires(area != null);
     Contract.Requires(horizontal != null);
     Contract.Requires(vertical != null);
     Horizontal = horizontal;
     Vertical   = vertical;
 }
Example #11
0
 internal static EpsgDatumEngineering Create(ushort code, string name, EpsgArea area)
 {
     return(new EpsgDatumEngineering(code, name, area));
 }
Example #12
0
 protected EpsgDatumContracts(string name, EpsgArea area)
     : base(0, name, area)
 {
     Contract.Requires(!String.IsNullOrEmpty(name));
     Contract.Requires(area != null);
 }
 public override CrsValidator CreateCrsValidator(EpsgArea fromArea, EpsgArea toArea)
 {
     return(new CrsPredicateValidator(_crsPredicate, fromArea, toArea));
 }
Example #14
0
 internal EpsgDatumGeodetic(ushort code, string name, EpsgEllipsoid spheroid, EpsgPrimeMeridian primeMeridian, EpsgArea area)
     : base(code, name, area)
 {
     Contract.Requires(spheroid != null);
     Contract.Requires(primeMeridian != null);
     Contract.Requires(area != null);
     Contract.Requires(!String.IsNullOrEmpty(name));
     Spheroid                  = spheroid;
     PrimeMeridian             = primeMeridian;
     _basicWgs84Transformation = new Lazy <Helmert7Transformation>(FindBasicWgs84Transformation, LazyThreadSafetyMode.ExecutionAndPublication);
 }
 public override OperationValidator CreateOperationValidator(EpsgArea fromArea, EpsgArea toArea)
 {
     return(new OperationPredicateValidator(_opPredicate, fromArea, toArea));
 }
 public CrsValidator(EpsgArea fromArea, EpsgArea toArea) : base(fromArea, toArea)
 {
 }
 public OperationValidator(EpsgArea fromArea, EpsgArea toArea) : base(fromArea, toArea)
 {
 }
 public virtual CrsValidator CreateCrsValidator(EpsgArea fromArea, EpsgArea toArea)
 {
     Contract.Ensures(Contract.Result <CrsValidator>() != null);
     return(new CrsValidator(fromArea, toArea));
 }
 protected AreaValidatorBase(EpsgArea fromArea, EpsgArea toArea)
 {
     FromArea = fromArea;
     ToArea   = toArea;
 }
Example #20
0
 internal EpsgDatumEngineering(ushort code, string name, EpsgArea area) : base(code, name, area)
 {
     Contract.Requires(!String.IsNullOrEmpty(name));
     Contract.Requires(area != null);
 }
 public CrsPredicateValidator(Predicate <EpsgCrs> predicate, EpsgArea fromArea, EpsgArea toArea)
     : base(fromArea, toArea)
 {
     Contract.Requires(predicate != null);
     _predicate = predicate;
 }
 public virtual OperationValidator CreateOperationValidator(EpsgArea fromArea, EpsgArea toArea)
 {
     Contract.Ensures(Contract.Result <OperationValidator>() != null);
     return(new OperationValidator(fromArea, toArea));
 }
Example #23
0
 internal static EpsgDatumVertical Create(ushort code, string name, EpsgArea area)
 {
     return(new EpsgDatumVertical(code, name, area));
 }
 public OperationPredicateValidator(Predicate <EpsgCoordinateOperationInfoBase> predicate, EpsgArea fromArea, EpsgArea toArea)
     : base(fromArea, toArea)
 {
     Contract.Requires(predicate != null);
     _predicate = predicate;
 }