示例#1
0
        /// <summary>
        /// Adds a coordinate system from a WellKnownText.
        /// </summary>
        /// <param name="descriptor">The convention descriptor</param>
        /// <param name="srid">The identifier of the coordinate system</param>
        /// <param name="wellKnownText">The definition in WellKnownText</param>
        /// <returns>The descriptor</returns>
        public static ISpatialConventionDescriptor AddCoordinateSystemFromString(
            this ISpatialConventionDescriptor descriptor,
            int srid,
            string wellKnownText)
        {
            if (CoordinateSystemWktReader.Parse(wellKnownText) is CoordinateSystem cs)
            {
                descriptor.AddCoordinateSystem(srid, cs);
            }

            return(descriptor);
        }
示例#2
0
 /// <summary>
 /// This method is called on initialization of the convention but before the convention is
 /// completed. The default implementation of this method does nothing. It can be overriden
 /// by a derived class such that the convention can be further configured before it is
 /// completed
 /// </summary>
 /// <param name="descriptor">
 /// The descriptor that can be used to configure the convention
 /// </param>
 protected virtual void Configure(ISpatialConventionDescriptor descriptor)
 {
 }
示例#3
0
 /// <summary>
 /// Registers the coordinate system WebMercator (SRID: 3857) on the convention
 /// </summary>
 /// <param name="descriptor">The convention descriptor</param>
 /// <returns>The convention descriptor</returns>
 public static ISpatialConventionDescriptor AddWebMercator(
     this ISpatialConventionDescriptor descriptor)
 {
     return(descriptor.AddCoordinateSystem(3857, ProjectedCoordinateSystem.WebMercator));
 }
示例#4
0
 /// <summary>
 /// Registers the coordinate system WGS84 (SRID: 4326) on the convention
 /// </summary>
 /// <param name="descriptor">The convention descriptor</param>
 /// <returns>The convention descriptor</returns>
 public static ISpatialConventionDescriptor AddWGS84(
     this ISpatialConventionDescriptor descriptor)
 {
     return(descriptor.AddCoordinateSystem(4326, GeographicCoordinateSystem.WGS84));
 }