Ejemplo n.º 1
0
        /// <summary>
        /// Parse the command arguments for the bounding-box command.
        /// </summary>
        /// <param name="args"></param>
        /// <param name="idx"></param>
        /// <param name="switchOut"></param>
        /// <returns></returns>
        public override int Parse(string[] args, int idx, out Switch switchOut)
        {
            // check next argument.
            if (args.Length < idx)
            {
                throw new SwitchParserException("None", "Invalid path for bounding-geojson command!");
            }

            // everything ok, take the next argument as the path.
            switchOut = new SwitchFilterBoundingGeoJSON()
            {
                GeoJSONFile = args[idx]
            };
            return(1);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Parse the command arguments for the bounding-box command.
        /// </summary>
        /// <param name="args"></param>
        /// <param name="idx"></param>
        /// <param name="switchOut"></param>
        /// <returns></returns>
        public override int Parse(string[] args, int idx, out Switch switchOut)
        {
            // check next argument.
            if (args.Length < idx)
            {
                throw new SwitchParserException("None", "Invalid path for bounding-geojson command!");
            }

            // everything ok, take the next argument as the path.
            switchOut = new SwitchFilterBoundingGeoJSON()
            {
                GeoJSONFile = args[idx]
            };
            return 1;
        }