Azavea.NijPredictivePolicing.ACSAlchemistLibrary.FileFormats.ShapefileHelper.GetRemoteShapefileURL C# (CSharp) Method

GetRemoteShapefileURL() public static method

Helper function for constructing the correct census URL for a particular Boundary Level / State
public static GetRemoteShapefileURL ( BoundaryLevels level, string stateFips ) : string
level BoundaryLevels
stateFips string
return string
        public static string GetRemoteShapefileURL(BoundaryLevels level, string stateFips)
        {
            string url = string.Empty;
            switch (level)
            {
                case BoundaryLevels.census_blockgroups:
                    url = Settings.ShapeFileBlockGroupURL + Settings.ShapeFileBlockGroupFilename;
                    break;
                case BoundaryLevels.census_tracts:
                    url = Settings.ShapeFileTractURL + Settings.ShapeFileTractFilename;
                    break;

                /*
                case BoundaryLevels.county_subdivisions:
                    url = Settings.ShapeFileCountySubdivisionsURL + Settings.ShapeFileCountySubdivisionsFilename;
                    break;
                case BoundaryLevels.counties:
                    url = Settings.ShapeFileCountiesURL + Settings.ShapeFileCountiesFilename;
                    break;

                case BoundaryLevels.voting:
                    url = Settings.ShapeFileVotingURL + Settings.ShapeFileVotingFilename;
                    break;
                case BoundaryLevels.zipthree:
                    url = Settings.ShapeFileThreeDigitZipsURL + Settings.ShapeFileThreeDigitZipsFilename;
                    break;
                case BoundaryLevels.zipfive:
                    url = Settings.ShapeFileFiveDigitZipsURL + Settings.ShapeFileFiveDigitZipsFilename;
                    break;

                case BoundaryLevels.states:
                case BoundaryLevels.census_regions:
                case BoundaryLevels.census_divisions:
                */
                default:
                    break;
            }

            if (!string.IsNullOrEmpty(url))
            {
                url = url.Replace(Settings.FipsPlaceholder, stateFips);
            }

            return url;
        }