Skip to content

Instantly share code, notes, and snippets.

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;
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 };
using System;
using System.Collections.Generic;
using System.Linq;
namespace Classification
{
//------------------------ COMMON METHOD
public static class ClassUtil
{
public const double TOLERANCE = 1E-5;
@hmfly
hmfly / gist:3764811
Created September 22, 2012 01:37
proj.net_sample
using ProjNet.Converters.WellKnownText;
using ProjNet.CoordinateSystems;
using ProjNet.CoordinateSystems.Transformations;
using System;
using System.Collections.Generic;
using System.IO;
namespace prj2mercator
{
class Program
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);
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; }