Ejemplo n.º 1
0
        protected virtual EsriPoint  CreatePoint(double x, double y, double?z, double?m)
        {
            EsriPoint point = new EsriPoint(x, y);

            point.Z = z;
            point.M = m;
            return(point);
        }
Ejemplo n.º 2
0
        protected override EsriPoint CreatePoint(double x, double y, double?z, double?m)
        {
            if (_outSrid == Srid)
            {
                return(base.CreatePoint(x, y, z, m));
            }
            else
            {
                EsriPoint point = null;
                double    ox;
                double    oy;
                if (Srid == 4326 || Srid == 4490)
                {
                    if (_outSrid == 3857 || _outSrid == 102100)
                    {
                        CoordinateTransform.WGS84ToWebMercator(y, x, out ox, out oy);
                        point = new EsriPoint(ox, oy);
                    }
                    else
                    {
                        point = new EsriPoint(x, y);
                    }
                }
                else
                {
                    if (_outSrid == 4326 || _outSrid == 4490)
                    {
                        CoordinateTransform.WebMercatorToWGS84(y, x, out oy, out ox);
                        point = new EsriPoint(ox, oy);
                    }
                    else
                    {
                        point = new EsriPoint(x, y);
                    }
                }

                point.Z = z;
                point.M = m;

                return(point);
            }
        }