Esempio n. 1
0
        public Boolean updateAll(string sourceCoordSystem)
        {
            if (_projectionDAL.datumProjection() == Constants.datumProjection.WGS84)
            {
                _projectionDAL.updateAll(sourceCoordSystem);

                if (_projectionDAL.location().locEast == null ||
                    _projectionDAL.location().locNorth == null)
                {
                    return(false);
                }

                double height = 50;

                if (_projectionDAL.location().locNorth != null)
                {
                    height = _projectionDAL.location().locNorth.Value;
                }
                Transform_WGS84_and_OSGB t = new Transform_WGS84_and_OSGB();
                ge_data _wgs84             = t.OSGB_East_North_to_WGS84_Lat_Long_Height(_projectionDAL.location().locEast.Value,
                                                                                        _projectionDAL.location().locNorth.Value,
                                                                                        height);
                _projectionDAL.SetLatitudeLongitudeHeight(_wgs84.locLatitude.Value, _wgs84.locLongitude.Value, _wgs84.locHeight.Value);

                return(true);
            }
            else
            {
                return(_projectionDAL.updateAll(sourceCoordSystem));
            }
        }
Esempio n. 2
0
        public bool UpdateProjectionLoc(_ge_location loc)
        {
            bool retvar = false;

            if (loc.datumProjection == Constants.datumProjection.NONE)
            {
                retvar = true;
                ViewData["locMessage"] = "No datumProjection";
            }
            else
            {
                ProjectionSystem  ps = new ProjectionSystem();
                ige_projectionDAL pd = ps.getProjectionDAL(loc);

                if (pd == null)
                {
                    retvar = false;
                }
                else
                {
                    retvar = pd.updateAll(locSelect);
                    ViewData["locMessage"] = pd.getMessage();
                }
            }

            return(retvar);
        }