Пример #1
0
        public FeatureSet PopulateFromTable()
        {
            DataTable pTable = this.GetTable(sqlStatements.selectAddressUnitsSQL);

            foreach (DataRow mRow in pTable.Rows)
            {
                var mXY = ExtFunctions.GetXYFromRow(mRow);
                if (mXY != null)
                {
                    var mPoint   = new DotSpatial.Topology.Point(mXY[0], mXY[1]);
                    var mFeature = this.AddFeature(mPoint);
                    mFeature.DataRow.BeginEdit();

                    mFeature.DataRow["ADDRESSUNITID"]   = mFeature.Fid;
                    mFeature.DataRow["ROADID"]          = mRow["road_id"].ToString();
                    mFeature.DataRow["ADDRESSUNITNR"]   = mRow["addressUnitNumber"].ToString();
                    mFeature.DataRow["ROADNAME_EN"]     = "";
                    mFeature.DataRow["ROADNAME_AR"]     = "";
                    mFeature.DataRow["ROADNAME_POP_EN"] = "";
                    mFeature.DataRow["ROADNAME_POP_AR"] = "";
                    mFeature.DataRow["DISTRICTID"]      = mRow["district_id"].ToString();
                    mFeature.DataRow["MUNICIPALITY_EN"] = Utilities.LABEL_ABUDHABI_EN;
                    mFeature.DataRow["MUNICIPALITY_AR"] = Utilities.LABEL_ABUDHABI_AR;
                    mFeature.DataRow["QR_CODE"]         = this.GetQRCode(mRow, pTable);
                    mFeature.DataRow.EndEdit();
                }
            }
            return(this);
        }
        public FeatureSet PopulateFromTable()
        {
            DataTable pTable = this.GetTable(sqlStatements.selectAddressGuideSignsSQL);

            foreach (DataRow mRow in pTable.Rows)
            {
                var mXY = ExtFunctions.GetXYFromRow(mRow);
                if (mXY != null)
                {
                    var mPoint   = new DotSpatial.Topology.Point(mXY[0], mXY[1]);
                    var mFeature = this.AddFeature(mPoint);

                    mFeature.DataRow.BeginEdit();

                    mFeature.DataRow["ADDRESSGUIDESIGNID"] = mRow["id"];
                    mFeature.DataRow["QR_CODE"]            = this.GetQRCode(mRow, pTable);
                    mFeature.DataRow["SIGNTYPE"]           = mRow["signType"];
                    mFeature.DataRow["SERIALNUMBER"]       = mRow["serialNumberOfSign"];
                    mFeature.DataRow["AUNRANGE"]           = mRow["addressUnitRange"];
                    mFeature.DataRow["ROADID"]             = mRow["road_id"];
                    mFeature.DataRow["DISTRICTID"]         = mRow["district_id"];
                    mFeature.DataRow.EndEdit();
                }
            }

            return(this);
        }
Пример #3
0
        public FeatureSet PopulateFromTable()
        {
            DataTable pTable = this.GetTable(sqlStatements.selectStreetNameSignsSQL);

            foreach (DataRow mRow in pTable.Rows)
            {
                var mXY = ExtFunctions.GetXYFromRow(mRow);
                if (mXY != null)
                {
                    var mPoint   = new DotSpatial.Topology.Point(mXY[0], mXY[1]);
                    var mFeature = this.AddFeature(mPoint);

                    var mF = mFeature.DataRow;

                    mF.BeginEdit();

                    mF["STREETNAMESIGNID"] = mRow["id"];
                    mF["QR_CODE"]          = this.GetQRCode(mRow, pTable);
                    mF["SERIALNUMBER"]     = mRow["serialNumberOfSign"];
                    mF["SIGNTYPE"]         = mRow["signType"];
                    mF["AUNRANGE_P1"]      = mRow["addressUnitRange_p1"];
                    mF["ROADID_P1"]        = mRow["road_id_p1"];
                    mF["DISTRICTID_P1"]    = mRow["district_id_p1"];
                    mF["CLEARANCE_P1"]     = mRow["signpanelgroundclearance_p1"];
                    mF["SIZE_P1"]          = mRow["signPanelDimensions_p1"];
                    mF["AUNRANGE_P2"]      = mRow["addressUnitRange_p2"];
                    mF["ROADID_P2"]        = mRow["road_id_p2"];
                    mF["DISTRICTID_P2"]    = mRow["district_id_p2"];
                    mF["CLEARANCE_P2"]     = mRow["signpanelgroundclearance_p2"];
                    mF["SIZE_P2"]          = mRow["signPanelDimensions_p2"];
                    mF["DISTRICT_EN"]      = "";
                    mF["DISTRICT_AR"]      = "";
                    mF.EndEdit();
                }
            }
            return(this);
        }