Curve 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 a Curve object.


public static Curve buildCurve()
{
    Curve curve = new Curve();
    curve.srsName = "EPSG:4326";
    //set the lineString.
    LineString[] lineString = new LineString[1];
    lineString[0] = new LineString();
    lineString[0].srsName = "EPSG:4326";

    Pos[] Pos = new Pos[3];
    Pos[0] = new Pos();
    Pos[0].X = -45.33;
    Pos[0].Y = 75.66;

    //add the viaPoint
    Pos[1] = new Pos();
    Pos[1].X = -46.33;
    Pos[1].Y = 77.66;

    //add the end Point.
    Pos[2] = new Pos();
    Pos[2].X = -49.33;
    Pos[2].Y = 78.66;
    lineString[0].Pos = Pos;
    curve.LineString = lineString;

    return curve;
}