Пример #1
0
        public IList <Feature> writeStrabs(IList <StrassenabschnittGIS> strabs)
        {
            IList <Feature> features = new List <Feature>();

            foreach (StrassenabschnittGIS strab in strabs)
            {
                //The service uses a cache (httpRequestCacheService) for loading  WiederbeschaffungswertKatalogModels so there should be no performance problem looking this up for every strab
                WiederbeschaffungswertKatalogModel wbwkatalog = this.wiederbeschaffungswertKatalogService.GetWiederbeschaffungswertKatalogModel(strab.Belastungskategorie);

                Feature          feature    = new Feature();
                IAttributesTable attributes = new AttributesTable();

                feature.Geometry = strab.Shape;

                double areaTrottLeft  = strab.BreiteTrottoirLinks != null ? (double)(strab.BreiteTrottoirLinks * strab.Laenge) : 0d;
                double areaTrottRight = strab.BreiteTrottoirRechts != null ? (double)(strab.BreiteTrottoirRechts * strab.Laenge) : 0d;
                double areaStreet     = (double)(strab.Laenge * strab.BreiteFahrbahn);
                double wbw            = areaStreet * (double)wbwkatalog.FlaecheFahrbahn + (double)wbwkatalog.FlaecheTrottoir * (areaTrottLeft + areaTrottRight);

                attributes.AddAttribute(StrabShapeFileConstants.ID, this.guidToOracleRaw(strab.Id));
                attributes.AddAttribute(StrabShapeFileConstants.Belastungskategorie, StrabShapeFileConstants.getBelastungsKategorie(strab.Belastungskategorie.Typ));
                attributes.AddAttribute(StrabShapeFileConstants.Laenge, (double)strab.Laenge);
                attributes.AddAttribute(StrabShapeFileConstants.FlaecheFahrbahn, areaStreet);
                attributes.AddAttribute(StrabShapeFileConstants.Bezeichnungbis, strab.BezeichnungBis != null ? strab.BezeichnungBis : string.Empty);
                attributes.AddAttribute(StrabShapeFileConstants.Bezeichnungvon, strab.BezeichnungVon != null ? strab.BezeichnungVon : string.Empty);
                attributes.AddAttribute(StrabShapeFileConstants.Strassenname, strab.Strassenname != null ? strab.Strassenname : string.Empty);
                attributes.AddAttribute(StrabShapeFileConstants.Eigentuemer, StrabShapeFileConstants.getOwner(strab.Strasseneigentuemer));
                attributes.AddAttribute(StrabShapeFileConstants.Ortsbezeichnung, strab.Ortsbezeichnung != null ? strab.Ortsbezeichnung : string.Empty);
                attributes.AddAttribute(StrabShapeFileConstants.Belag, StrabShapeFileConstants.getBelag(strab.Belag));
                attributes.AddAttribute(StrabShapeFileConstants.BreiteFahrbahn, (double)strab.BreiteFahrbahn);
                attributes.AddAttribute(StrabShapeFileConstants.Trottoir, StrabShapeFileConstants.getTrottoirTyp(strab.Trottoir));
                attributes.AddAttribute(StrabShapeFileConstants.BreiteTrottoirlinks, strab.BreiteTrottoirLinks != null ? (double)strab.BreiteTrottoirLinks : 0d);
                attributes.AddAttribute(StrabShapeFileConstants.FlaecheTrottoirlinks, areaTrottLeft);
                attributes.AddAttribute(StrabShapeFileConstants.BreiteTrottoirrechts, strab.BreiteTrottoirRechts != null ? (double)strab.BreiteTrottoirRechts : 0d);
                attributes.AddAttribute(StrabShapeFileConstants.FlaecheTrottoirrechts, areaTrottRight);
                attributes.AddAttribute(StrabShapeFileConstants.FlaecheTrottoir, areaTrottRight + areaTrottLeft);
                attributes.AddAttribute(StrabShapeFileConstants.Wiederbeschaffungswert, wbw);
                attributes.AddAttribute(StrabShapeFileConstants.AlterungsbeiwertI, (double)wbwkatalog.AlterungsbeiwertI);
                attributes.AddAttribute(StrabShapeFileConstants.WertverlustI, (double)((double)wbwkatalog.AlterungsbeiwertI * wbw / 100));
                attributes.AddAttribute(StrabShapeFileConstants.AlterungsbeiwertII, (double)wbwkatalog.AlterungsbeiwertII);
                attributes.AddAttribute(StrabShapeFileConstants.WertverlustII, (double)((double)wbwkatalog.AlterungsbeiwertII * wbw / 100));

                feature.Attributes = attributes;
                features.Add(feature);
            }
            return(features);
            //shpShxSerializeService.WriteShpShxDbf(features, fileName);
        }
Пример #2
0
        private decimal GetWiederbeschaffungswert(IFlaecheFahrbahnUndTrottoirHolder flaecheFahrbahnUndTrottoirHolder, WiederbeschaffungswertKatalogModel wieder)
        {
            if (flaecheFahrbahnUndTrottoirHolder.HasTrottoirInformation)
            {
                return(flaecheFahrbahnUndTrottoirHolder.FlaecheFahrbahn * wieder.FlaecheFahrbahn + wieder.FlaecheTrottoir * flaecheFahrbahnUndTrottoirHolder.FlaecheTrottoir);
            }

            return(flaecheFahrbahnUndTrottoirHolder.FlaecheFahrbahn * wieder.GesamtflaecheFahrbahn);
        }
Пример #3
0
        private decimal GetWiederbeschaffungswert(StrassenabschnittBase strassenabschnittBase, WiederbeschaffungswertKatalogModel wieder)
        {
            if (strassenabschnittBase.HasTrottoirInformation)
                return strassenabschnittBase.FlaecheFahrbahn * wieder.FlaecheFahrbahn + wieder.FlaecheTrottoir * strassenabschnittBase.FlaecheTrottoir;

            return strassenabschnittBase.GesamtFlaeche * wieder.GesamtflaecheFahrbahn;
        }
 private decimal GetWiederbeschaffungswert(KenngroessenFruehererJahreDetail kenngroessenFruehererJahreDetail, WiederbeschaffungswertKatalogModel wieder)
 {
     return(kenngroessenFruehererJahreDetail.Fahrbahnflaeche * wieder.GesamtflaecheFahrbahn);
 }
 private decimal GetWiederbeschaffungswert(NetzSummarischDetail netzSummarischDetail, WiederbeschaffungswertKatalogModel wieder)
 {
     return(netzSummarischDetail.Fahrbahnflaeche * wieder.GesamtflaecheFahrbahn);
 }
        private decimal GetWiederbeschaffungswert(StrassenabschnittBase strassenabschnittBase, WiederbeschaffungswertKatalogModel wieder)
        {
            //ToDo: Clarify! Should we calculate with Trottoir?
            if (strassenabschnittBase.HasTrottoirInformation)
            {
                return(strassenabschnittBase.FlaecheFahrbahn * wieder.FlaecheFahrbahn + wieder.FlaecheTrottoir * strassenabschnittBase.FlaecheTrottoir);
            }

            return(strassenabschnittBase.GesamtFlaeche * wieder.GesamtflaecheFahrbahn);
        }