This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void displayCurrent(List<Vector> vectors) | |
{ | |
var wm = new SpatialReference(3857); | |
foreach (var vector in vectors) | |
{ | |
var length = Math.Sqrt(vector.U * vector.U + vector.V * vector.V) * 500000; | |
var theta = Math.Atan(Math.Abs(vector.V / vector.U)); | |
var p1 = | |
(MapPoint)_webMercator.FromGeographic(new MapPoint(vector.X, vector.Y, new SpatialReference(4326))); | |
var h = length / 6; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Classification | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var con18 = new double[] { 56, 64, 41, 39, 69, 46, 38, 26, 62, 68, 50, 62, 63, 37, 70, 42, 63, 40, 30, 28, 75, 42, 43, 73, 72, 48, 28, 42, 47, 50, 42 }; | |
//var vals = new List<double> { 1, 2, 3, 70, 80, 90, 200, 210, 220 }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace Classification | |
{ | |
//------------------------ COMMON METHOD | |
public static class ClassUtil | |
{ | |
public const double TOLERANCE = 1E-5; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using ProjNet.Converters.WellKnownText; | |
using ProjNet.CoordinateSystems; | |
using ProjNet.CoordinateSystems.Transformations; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
namespace prj2mercator | |
{ | |
class Program |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class ColorUtil | |
{ | |
public static ColorBlend GetGrayRamp() | |
{ | |
var result = new ColorBlend(); | |
result.Positions = new float[2] { 0f, 1f }; | |
var colors = new Color[2]; | |
colors[0] = Color.FromArgb(0, Color.Black); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HeatMapMaker | |
{ | |
public int Width { get; set; } | |
public int Height { get; set; } | |
public int Radius { get; set; } | |
public float Opacity { get; set; } | |
public ColorRamp ColorRamp { get; set; } | |
public List<HeatPoint> HeatPoints { get; set; } | |
public Bitmap GrayMap { get; private set; } |