Ciao a tutti ho una domanda penso facile per chi ha una conoscenza maggiore di me di c#, ...... dato il seguente codice:
var tracks = from track in gpxDoc.Descendants(gpx + "trk")
select new
{
Name = track.Element(gpx + "name") != null ?
track.Element(gpx + "name").Value : null,
Segs = (
from trackpoint in track.Descendants(gpx + "trkpt")
select new
{
Latitude = trackpoint.Attribute("lat").Value,
Longitude = trackpoint.Attribute("lon").Value,
Time = trackpoint.Element(gpx + "time") != null ?
trackpoint.Element(gpx + "time").Value : null
}
)
};
ArrayList Po = new ArrayList();
foreach (var trk in tracks)
{
// Populate track data objects.
foreach (var trkSeg in trk.Segs)
{
}
con cui leggo un file gpx, cosa devo andare a scrivere nell ultimo foreach per far si che mi restituisca un arrayList i cui elementi sono dei pointf e i cui valori x e y sono i dati di langitudine e longitudine del gpx?![]()
grazie mille![]()

Rispondi quotando