本文整理汇总了C#中Envelope.Top方法的典型用法代码示例。如果您正苦于以下问题:C# Envelope.Top方法的具体用法?C# Envelope.Top怎么用?C# Envelope.Top使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Envelope
的用法示例。
在下文中一共展示了Envelope.Top方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetFileName
private string GetFileName(Envelope boundingBox)
{
return String.Format("{0}/{1}_{2}_{3}_{4}.{5}", _directory,
boundingBox.Left().ToString("r", _cultureInfo), boundingBox.Top().ToString("r", _cultureInfo),
boundingBox.Right().ToString("r", _cultureInfo),
boundingBox.Bottom().ToString("r", _cultureInfo),
"png");
}
示例2: GenerateBoundingBoxElement
private static XmlElement GenerateBoundingBoxElement(Envelope bbox, int SRID, XmlDocument doc)
{
XmlElement xmlBbox = doc.CreateElement("BoundingBox", wmsNamespaceURI);
xmlBbox.Attributes.Append(CreateAttribute("minx", bbox.Left().ToString(Map.NumberFormatEnUs), doc));
xmlBbox.Attributes.Append(CreateAttribute("miny", bbox.Bottom().ToString(Map.NumberFormatEnUs), doc));
xmlBbox.Attributes.Append(CreateAttribute("maxx", bbox.Right().ToString(Map.NumberFormatEnUs), doc));
xmlBbox.Attributes.Append(CreateAttribute("maxy", bbox.Top().ToString(Map.NumberFormatEnUs), doc));
xmlBbox.Attributes.Append(CreateAttribute("CRS", "EPSG:" + SRID, doc));
return xmlBbox;
}
示例3: GetOidsInView
/// <summary>
/// Returns geometry Object IDs whose bounding box intersects 'bbox'
/// </summary>
/// <param name="bbox"></param>
/// <returns></returns>
public override IEnumerable<object> GetOidsInView(Envelope bbox, CancellationToken? cancellationToken = null)
{
if (Table.Rows.Count == 0)
{
yield break;
}
var strSQL = XColumn + " > " + bbox.Left().ToString(Map.NumberFormatEnUs) + " AND " +
XColumn + " < " + bbox.Right().ToString(Map.NumberFormatEnUs) + " AND " +
YColumn + " > " + bbox.Bottom().ToString(Map.NumberFormatEnUs) + " AND " +
YColumn + " < " + bbox.Top().ToString(Map.NumberFormatEnUs);
var drow = Table.Select(strSQL);
foreach (var dr in drow)
{
yield return dr[ObjectIdColumn];
}
}
示例4: GetGeometriesInView
/// <summary>
/// Returns geometries within the specified bounding box
/// </summary>
/// <param name="bbox"></param>
/// <returns></returns>
public override Collection<IGeometry> GetGeometriesInView(Envelope bbox)
{
DataRow[] drow;
var features = new Collection<IGeometry>();
if (Table.Rows.Count == 0)
{
return null;
}
string strSQL = XColumn + " > " + bbox.Left().ToString(Map.NumberFormatEnUs) + " AND " +
XColumn + " < " + bbox.Right().ToString(Map.NumberFormatEnUs) + " AND " +
YColumn + " > " + bbox.Bottom().ToString(Map.NumberFormatEnUs) + " AND " +
YColumn + " < " + bbox.Top().ToString(Map.NumberFormatEnUs);
drow = Table.Select(strSQL);
foreach (DataRow dr in drow)
{
features.Add(Factory.CreatePoint(new Coordinate((double) dr[XColumn], (double) dr[YColumn])));
}
return features;
}
示例5: GetGeometriesInView
/// <summary>
/// Returns geometries within the specified bounding box
/// </summary>
/// <param name="bbox"></param>
/// <returns></returns>
public override IEnumerable<IGeometry> GetGeometriesInView(Envelope bbox, CancellationToken? cancllationToken= null)
{
if (Table.Rows.Count == 0)
{
yield break;
}
string strSQL = XColumn + " > " + bbox.Left().ToString(Map.NumberFormatEnUs) + " AND " +
XColumn + " < " + bbox.Right().ToString(Map.NumberFormatEnUs) + " AND " +
YColumn + " > " + bbox.Bottom().ToString(Map.NumberFormatEnUs) + " AND " +
YColumn + " < " + bbox.Top().ToString(Map.NumberFormatEnUs);
var drow = Table.Select(strSQL);
foreach (var dr in drow)
{
yield return Factory.CreatePoint(new Coordinate((double) dr[XColumn], (double) dr[YColumn]));
}
}