Exemplo n.º 1
0
 public void QueryIntervalY(com.epl.geometry.Envelope1D env1D)
 {
     if (IsEmpty())
     {
         env1D.SetEmpty();
     }
     else
     {
         env1D.SetCoords(ymin, ymax);
     }
 }
 // Checked vs. Jan 11, 2011
 public override com.epl.geometry.Envelope1D QueryInterval(int semantics, int ordinate)
 {
     com.epl.geometry.Envelope1D env = new com.epl.geometry.Envelope1D();
     if (IsEmptyImpl())
     {
         env.SetEmpty();
         return(env);
     }
     _updateAllDirtyIntervals(true);
     return(m_envelope.QueryInterval(semantics, ordinate));
 }
 // Checked vs. Jan 11, 2011
 /// <param name="bExact">
 /// True, when the exact envelope need to be calculated and false
 /// for the loose one.
 /// </param>
 protected internal virtual void _updateAllDirtyIntervals(bool bExact)
 {
     _verifyAllStreams();
     if (_hasDirtyFlag(com.epl.geometry.MultiVertexGeometryImpl.DirtyFlags.DirtyIntervals))
     {
         if (null == m_envelope)
         {
             m_envelope = new com.epl.geometry.Envelope(m_description);
         }
         else
         {
             m_envelope.AssignVertexDescription(m_description);
         }
         if (IsEmpty())
         {
             m_envelope.SetEmpty();
             return;
         }
         _updateXYImpl(bExact);
         // efficient method for xy's
         // now go through other attribues.
         for (int attributeIndex = 1; attributeIndex < m_description.GetAttributeCount(); attributeIndex++)
         {
             int semantics = m_description._getSemanticsImpl(attributeIndex);
             int ncomps    = com.epl.geometry.VertexDescription.GetComponentCount(semantics);
             com.epl.geometry.AttributeStreamBase stream = m_vertexAttributes[attributeIndex];
             for (int iord = 0; iord < ncomps; iord++)
             {
                 com.epl.geometry.Envelope1D interval = new com.epl.geometry.Envelope1D();
                 interval.SetEmpty();
                 for (int i = 0; i < m_pointCount; i++)
                 {
                     double value = stream.ReadAsDbl(i * ncomps + iord);
                     // some
                     // optimization
                     // is
                     // possible
                     // if
                     // non-virtual
                     // method
                     // is
                     // used
                     interval.Merge(value);
                 }
                 m_envelope.SetInterval(semantics, iord, interval);
             }
         }
         if (bExact)
         {
             _setDirtyFlag(com.epl.geometry.MultiVertexGeometryImpl.DirtyFlags.DirtyIntervals, false);
         }
     }
 }
Exemplo n.º 4
0
 public override com.epl.geometry.Envelope1D QueryInterval(int semantics, int ordinate)
 {
     com.epl.geometry.Envelope1D env = new com.epl.geometry.Envelope1D();
     if (IsEmptyImpl())
     {
         env.SetEmpty();
         return(env);
     }
     env.vmin = _getAttributeAsDbl(0, semantics, ordinate);
     env.vmax = env.vmin;
     env.MergeNE(_getAttributeAsDbl(1, semantics, ordinate));
     return(env);
 }
Exemplo n.º 5
0
        public override com.epl.geometry.Envelope1D QueryInterval(int semantics, int ordinate)
        {
            com.epl.geometry.Envelope1D env = new com.epl.geometry.Envelope1D();
            if (IsEmptyImpl())
            {
                env.SetEmpty();
                return(env);
            }
            double s = GetAttributeAsDbl(semantics, ordinate);

            env.vmin = s;
            env.vmax = s;
            return(env);
        }