Envelope Example - C# - Latest

Spectrum Spatial Guide

Product type
Software
Portfolio
Locate
Product family
Spectrumâ„¢ software
Product
Spectrumâ„¢ software > Spatial > Spectrum Spatial
Version
Latest
ft:locale
en-US
Product name
Spectrum Technology Platform
ft:title
Spectrum Spatial Guide
Copyright
2025
First publish date
2007
ft:lastEdition
2025-03-07
ft:lastPublication
2025-03-07T10:28:48.112000

The following shows a C# example that returns an Envelope object.


public static Envelope buildEnvelope()
{
    Envelope envelope = new Envelope();
    envelope.srsName = "EPSG:4326";
    //set the startPoint
    Pos[] Pos = new Pos[2];
    Pos[0] = new Pos();

    Pos[0].X = -75.44;
    Pos[0].Y = 45.66;

    //set the endPoint.
    Pos[1] = new Pos();
    Pos[1].X = -73.44;
    Pos[1].Y = 48.66;
    envelope.Pos = Pos;
    return envelope;
}