コード例 #1
0
ファイル: ScaledNoder.cs プロジェクト: Smartico2020/Geo1
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public IList<ISegmentString> GetNodedSubstrings()
 {
     var splitSS = _noder.GetNodedSubstrings();
     if (_isScaled)
         Rescale(splitSS);
     return splitSS;
 }
コード例 #2
0
ファイル: ScaledNoder.cs プロジェクト: Sony-NS/SharpMap
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public IList GetNodedSubstrings()
        {
            IList splitSS = noder.GetNodedSubstrings();

            if (isScaled)
            {
                Rescale(splitSS);
            }
            return(splitSS);
        }
コード例 #3
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public IList <ISegmentString> GetNodedSubstrings()
        {
            IList <ISegmentString> splitSS = _noder.GetNodedSubstrings();

            if (_isScaled)
            {
                Rescale(splitSS);
            }
            return(splitSS);
        }
コード例 #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="bufferSegStrList"></param>
        /// <param name="precisionModel"></param>
        private void ComputeNodedEdges(IList bufferSegStrList, IPrecisionModel precisionModel)
        {
            INoder noder = GetNoder(precisionModel);

            noder.ComputeNodes(bufferSegStrList);
            IList nodedSegStrings = noder.GetNodedSubstrings();

            foreach (object obj in nodedSegStrings)
            {
                SegmentString segStr   = (SegmentString)obj;
                Label         oldLabel = (Label)segStr.Data;
                Edge          edge     = new Edge(segStr.Coordinates, new Label(oldLabel));
                InsertEdge(edge);
            }
        }
コード例 #5
0
        /**
         * Runs a noder on one or two sets of input geometries
         * and validates that the result is fully noded.
         *
         * @param geom1 a geometry
         * @param geom2 a geometry, which may be null
         * @param noder the noder to use
         * @return the fully noded linework
         *
         * @throws TopologyException
         */
        public static Geometry NodeValidated(Geometry geom1, Geometry geom2, INoder noder)
        {
            var lines = new List <Geometry>(LineStringExtracter.GetLines(geom1));

            if (geom2 != null)
            {
                lines.AddRange(LineStringExtracter.GetLines(geom2));
            }
            var ssList = ToSegmentStrings(lines);

            var noderValid = new ValidatingNoder(noder);

            noderValid.ComputeNodes(ssList);
            var nodedList = noder.GetNodedSubstrings();

            var result = ToLines(nodedList, geom1.Factory);

            return(result);
        }
コード例 #6
0
 /// <summary>
 /// Checks whether the output of the wrapped noder is fully noded.
 /// Throws an exception if it is not.
 /// </summary>
 public void ComputeNodes(IList <ISegmentString> segStrings)
 {
     _noder.ComputeNodes(segStrings);
     _nodedSs = _noder.GetNodedSubstrings();
     Validate();
 }