Skip to content

Instantly share code, notes, and snippets.

View xfischer's full-sized avatar
🇨🇵
Working from home

Xavier Fischer xfischer

🇨🇵
Working from home
View GitHub Profile
@xfischer
xfischer / Program.cs
Created March 12, 2021 22:44
NET5 assembly loader for SqlServerTypes - GeoJson MsSqlSpatial test
using GeoJSON.Net.Contrib.MsSqlSpatial;
using GeoJSON.Net.Feature;
using GeoJSON.Net.Geometry;
using Microsoft.SqlServer.Types;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
@xfischer
xfischer / DouglasPeucker.cs
Last active August 5, 2020 14:33
GeoJSON.Net - Douglas Peucker reduction
using GeoJSON.Net.Geometry;
using System;
using System.Collections.Generic;
using System.Linq;
namespace GeoJsonSample
{
//
// Code from https://gist.github.com/oliverheilig/7777382
//
@xfischer
xfischer / SqlTableCreator.cs
Created March 20, 2020 10:04 — forked from riyadparvez/SqlTableCreator.cs
Create Sql table based on given DataTable schema
// Copyright (c) 2012-2013, Riyad Parvez
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
@xfischer
xfischer / demnet_gpx_50mReduction.geojson
Created June 13, 2019 19:37
GPX points elevated and simplified (50m) with DEM-Net
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@xfischer
xfischer / demnet_gpx_5mReduction.geojson
Last active June 13, 2019 19:36
GPX points elevated and simplified with DEM-Net
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
declare @g geography = geography::STGeomFromText('POLYGON ((-52.92612792 -29.013660989999998, -52.930613159999993 -29.02199103, -52.926695999999993 -29.030106959999998, -52.92890712 -29.040738029999996, -52.93262016 -29.04165702, -52.93072512 -29.049041969999998, -52.934951879999993 -29.05490196, -52.946164079999996 -29.056005, -52.94455092 -29.06546301, -52.95650292 -29.060360009999997, -52.960357079999994 -29.062571039999998, -52.94836512 -29.095774019999997, -52.952076 -29.09859696, -52.970573159999994 -29.09499399, -52.974554039999994 -29.096667989999997, -52.972460999999996 -29.103373979999997, -52.971860879999994 -29.10831201, -52.980072119999996 -29.101701959999996, -52.98734988 -29.105648999999996, -52.98852384 -29.12426703, -52.99938612 -29.118789989999996, -53.001855 -29.126067029999998, -52.993083959999993 -29.136593969999996, -52.999047 -29.13942096, -53.006070959999995 -29.136638969999996, -53.011964879999994 -29.13809598, -53.012454119999994 -29.141523, -53.006276879999994 -29.148397019999997, -
@xfischer
xfischer / Singleton.cs
Created January 30, 2019 10:39
Singleton pattern - Lazy
// source : http://csharpindepth.com/Articles/General/Singleton.aspx
//
public sealed class Singleton
{
private static readonly Lazy<Singleton> lazy =
new Lazy<Singleton>(() => new Singleton());
public static Singleton Instance { get { return lazy.Value; } }
private Singleton()
@xfischer
xfischer / README-Template.md
Created December 18, 2018 21:40 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@xfischer
xfischer / GooglePoints.cs
Created January 19, 2017 20:51 — forked from shinyzhu/GooglePoints.cs
Encode/Decode Polyline Algorithm Format in C#
/// <summary>
/// See https://developers.google.com/maps/documentation/utilities/polylinealgorithm
/// </summary>
public static class GooglePoints
{
/// <summary>
/// Decode google style polyline coordinates.
/// </summary>
/// <param name="encodedPoints"></param>
/// <returns></returns>