src/AircraftTrajectories/Models/Visualisation/KML/AnimationSections/HeatmapKMLAnimator.cs
/// <summary>
///  Return a string in KML format containing all pre animation definitions 
///  that are required for the aircraft
/// </summary>
/// <returns></returns>
Return a string in KML format containing all pre animation definitions
that are required for the aircraft
Return a string in KML format containing all pre animation definitions that are required for the aircraft
public string KMLSetup()
        {
            RDToGeographic converter = new RDToGeographic();
            string heatmapSetup = "<Folder>";
            for (int i = 1; i < _population.Count; i++)
            {
                if (i % 1000 == 0)
                {
                    Console.WriteLine(i);
                }
                double[] row = _population[i];
                var point = converter.convertToLatLong(row[0], row[1]);
                var test = new GeoPoint3D(point.X, point.Y, 0);
                var upperRight = test.MoveInDirection(DotSize, 45);
                var lowerLeft = test.MoveInDirection(DotSize, 225);
                heatmapSetup += @"
    <GroundOverlay>
      <name> house" + i + @"</name>
      <Icon>
        <href>" + DotFile + @"</href>
      </Icon>
      <LatLonBox>
        <north>" + upperRight.Latitude + @"</north>
        <south>" + lowerLeft.Latitude + @"</south>
        <east>" + upperRight.Longitude + @"</east>
        <west>" + lowerLeft.Longitude + @"</west>
      </LatLonBox>
    </GroundOverlay>
                    ";
            }
            heatmapSetup += @"</Folder>";
                return heatmapSetup;
        }
public string KMLSetup ( ) { RDToGeographic converter = new RDToGeographic ( ) ; string heatmapSetup = " " ; for ( int i = 1 ; i < _population . Count ; i ++ ) { if ( i % 1000 == 0 ) { Console . WriteLine ( i ) ; } double [ ] row = _population [ i ] ; var point = converter . convertToLatLong ( row [ 0 ] , row [ 1 ] ) ; var test = new GeoPoint3D ( point . X , point . Y , 0 ) ; var upperRight = test . MoveInDirection ( DotSize , 45 ) ; var lowerLeft = test . MoveInDirection ( DotSize , 225 ) ; heatmapSetup += @"
    <GroundOverlay>
      <name> house" + i + @"</name>
      <Icon>
        <href>" + DotFile + @"</href>
      </Icon>
      <LatLonBox>
        <north>" + upperRight . Latitude + @"</north>
        <south>" + lowerLeft . Latitude + @"</south>
        <east>" + upperRight . Longitude + @"</east>
        <west>" + lowerLeft . Longitude + @"</west>
      </LatLonBox>
    </GroundOverlay>
                    " ; } heatmapSetup += @"</Folder>" ; return heatmapSetup ; }
Return a string in KML format containing all pre animation definitions
that are required for the aircraft
Return a string in KML format containing all pre animation definitions that are required for the aircraft
None