GeoApiProjection protected properties

This commit is contained in:
Clemens 2022-01-21 16:55:00 +01:00
parent 544ac32ee3
commit be0e06f581
3 changed files with 13 additions and 24 deletions

View file

@ -30,12 +30,13 @@ namespace MapControl.Projections
private double scaleFactor;
private string bboxFormat;
public GeoApiProjection(string wkt = null)
protected GeoApiProjection()
{
if (wkt != null)
{
WKT = wkt;
}
}
public GeoApiProjection(string wkt)
{
WKT = wkt;
}
/// <summary>
@ -46,7 +47,7 @@ namespace MapControl.Projections
public string WKT
{
get { return CoordinateSystem?.WKT; }
set { CoordinateSystem = new CoordinateSystemFactory().CreateFromWkt(value); }
protected set { CoordinateSystem = new CoordinateSystemFactory().CreateFromWkt(value); }
}
/// <summary>
@ -55,7 +56,7 @@ namespace MapControl.Projections
public ICoordinateSystem CoordinateSystem
{
get { return coordinateSystem; }
set
protected set
{
coordinateSystem = value ?? throw new ArgumentNullException(nameof(value));