Skip to content

Instantly share code, notes, and snippets.

View airbreather's full-sized avatar
💭
Wondering why there's a "Set status" button.

Joe Amenta airbreather

💭
Wondering why there's a "Set status" button.
  • Urban Science Applications, Inc.
  • Sterling Heights, Michigan, USA
View GitHub Profile
Input:
LINESTRING (458 661.74, 463 657.74, 469 653.74, 475 650.74, 481 647.74, 488 644.74, 492 642.74, 495 639.74, 498 638.74, 500 637.74, 503 636.74, 508 634.74, 511 633.74, 520 629.74, 530 624.74, 544 618.74, 565 609.74, 597 593.74, 623 582.74, 658 567.74, 690 553.74, 721 541.74, 750 527.74, 777 515.74, 801 501.74, 818 488.74, 829 477.74, 840 465.74, 845 453.74, 848 439.74, 849 424.74, 849 407.74, 845 378.74, 835 352.74, 828 332.74, 817 315.74, 806 301.74, 798 290.74, 791 280.74, 780 270.74, 772 262.74, 757 253.74, 740 246.74, 724 239.74, 696 232.74, 669 224.74, 639 217.74, 609 214.74, 575 209.74, 548 204.74, 516 202.74, 494 202.74, 475 205.74, 464 210.74, 447 216.74, 431 226.74, 410 243.74, 395 259.74, 381 279.74, 367 308.74, 358 329.74, 353 348.74, 345 371.74, 342 382.74, 340 392.74, 337 403.74, 336 411.74, 336 420.74, 336 427.74, 336 433.74, 336 442.74, 339 448.74, 341 452.74, 344 457.74, 348 462.74, 350 465.74, 354 468.74, 358 472.74, 362 476.74, 368 480.74, 374 484.74, 381 489.74, 389 495.74, 395 499.7
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace HelperTypes
{
public sealed class BitList : IReadOnlyList<bool>
{
private readonly List<int> values = new List<int>();
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime;
using System.Threading.Tasks;
using GeoAPI.Geometries;
using NetTopologySuite.Geometries;
This file has been truncated, but you can view the full file.
Only the 48 contiguous US states + DC:
MULTIPOLYGON (((-82.987477 24.619214, -82.987477 24.625379, -82.987477 24.625429999999998, -82.985529 24.640484999999998, -82.977736 24.656482, -82.96409899999999 24.670596, -82.951436 24.678124, -82.940721 24.682828999999998, -82.932892999999993 24.684668, -82.930831 24.686738, -82.924646 24.692950999999997, -82.922585 24.695021999999998, -82.902018 24.715678, -82.899928 24.717778, -82.883181 24.721480999999997, -82.874844 24.723326, -82.865619999999993 24.726225, -82.800176999999991 24.726281999999998, -82.766509 24.701763999999997, -82.766680999999991 24.667939999999998, -82.795228 24.625429999999998, -82.800799 24.616934999999998, -82.805633 24.614501999999998, -82.805095999999992 24.613087, -82.799649 24.606232, -82.798007 24.604165, -82.80440999999999 24.604295999999998, -82.821754 24.590708, -82.821795999999992 24.590774999999997, -82.821908 24.590687, -82.82857 24.585535, -82.836157 24.581141, -82.849053 24.576748, -82.861189 24.575284, -82.874840999999989 24.57
This file has been truncated, but you can view the full file.
contiguous, plus FIPS codes 02, 15, 60, 66, 69, 72, 78
MULTIPOLYGON (((-168.22527300000002 -14.535905999999999, -168.22452900000002 -14.52451, -168.22312 -14.521576999999999, -168.218752 -14.512483, -168.21868899999998 -14.512364999999999, -168.218501 -14.512011, -168.218439 -14.511892999999999, -168.218446 -14.511880999999999, -168.218468 -14.511847999999999, -168.218476 -14.511837, -168.209822 -14.500086, -168.20978 -14.500045, -168.199527 -14.490126, -168.186781 -14.48325, -168.1733 -14.479693, -168.172043 -14.47955, -168.157486 -14.477894, -168.156488 -14.477884, -168.153496 -14.477853999999999, -168.15249899999998 -14.477844999999999, -168.152444 -14.477844999999999, -168.152282 -14.477846999999999, -168.15222799999998 -14.477848, -168.15222799999998 -14.477922999999999, -168.152231 -14.47815, -168.152232 -14.478226, -168.144096 -14.481204, -168.13489299999998 -14.484573999999999, -168.123337 -14.491729, -168.12162899999998 -14.493689999999999, -168.115941 -14.500224999999999, -168.111165 -14.508125, -1
LINESTRING (-9318957.21189894 5178906.52688059, -9319300.5654344 5178563.17334512, -9320055.94321243 5178082.47839547, -9321360.68664721 5177533.11273872, -9322871.44220327 5177121.08849616, -9324176.18563804 5176983.74708197, -9324656.8805877 5176915.07637488, -9324656.8805877 5176846.40566779, -9324588.2098806 5176846.40566779, -9324107.51493095 5176846.40566779, -9323352.13715292 5176846.40566779, -9322528.0886678 5177121.08849616, -9321772.71088977 5177395.77132453, -9321360.68664721 5177601.78344581, -9321154.67452593 5177670.45415291, -9321292.01594011 5177670.45415291, -9321910.05230396 5177670.45415291, -9322802.77149617 5177601.78344581, -9323558.1492742 5177533.11273872, -9324176.18563804 5177327.10061744, -9324382.19775932 5177327.10061744, -9324382.19775932 5177258.42991035, -9323970.17351676 5177258.42991035, -9323283.46644583 5177258.42991035, -9322596.75937489 5177533.11273872, -9322047.39371814 5177739.12486, -9321841.38159686 5177807.7955671, -9322322.07654652 5177807.7955671, -9323146.125031
MULTIPOLYGON (((701 406.74, 700.90625 406.89625, 701.461538461538 406.816923076923, 702 405.74, 701 406.74)), ((700.833333333333 406.906666666667, 701 406.74, 701.666666666667 405.74, 700.5 405.74, 700 406.74, 700 407.025714285714, 700.833333333333 406.906666666667)), ((701 406.74, 702 405.74, 701.666666666667 405.74, 701 406.74)), ((698 412.54, 698.666666666667 412.406666666667, 698 411.74, 698 412.54)), ((700.90625 406.89625, 701 406.74, 700.833333333333 406.906666666667, 700.90625 406.89625)), ((699.571428571429 410.597142857143, 699.727272727273 410.649090909091, 700.2 409.94, 699.857142857143 410.025714285714, 699.571428571429 410.597142857143)), ((699.5 411.74, 699 411.74, 699 412.34, 699.222222222222 412.295555555556, 699.5 411.74)), ((699 413.24, 698.5 413.99, 698 415.24, 698 416.168571428571, 698.2 415.94, 699 414.74, 699 413.24)), ((698 413.74, 698.5 412.74, 698 412.74, 698 413.74)), ((700 406.74, 700.5 405.74, 700 405.74, 700 406.74)), ((700.5 408.74, 701 407.74, 700.142857142857 408.168571428571,
/*
* Copyright 2014 JPiston
*
* Licensed under The MIT License (MIT);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed to in writing, software
using System;
using System.Collections;
using System.Collections.Generic;
using GeoAPI.Geometries;
using NetTopologySuite.Geometries.Utilities;
namespace NetTopologySuite.Algorithm.Locate
{
public class OptimizedIndexedPointInAreaLocator : IPointOnGeometryLocator
public sealed class ArrayWrapper<T> : IReadOnlyDictionary<int, T>
{
private readonly T[] arr;
public ArrayWrapper(T[] arr)
{
if (arr == null)
{
throw new ArgumentNullException("arr");
}