Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
It's full of stars

Rene Rubalcava odoe

💭
It's full of stars
View GitHub Profile
@odoe
odoe / geotofeature.py
Created Sep 10, 2012
ArcPy script to Convert GeoJSON to Feature Classes
View geotofeature.py
# This is a script that I use to convert geojson to
# features in a file gdb
# Step 1. Use the REST page of an ArcGIS Map Service to
# get the esri json results of the data you want.
# Step 2. I used my EsriJSON to GeoJSON app to convert
# the results to geojson. http://esritogeo.herokuapp.com/
# Step 3. In ArcMap, use the python window to create a
# python dictionary of your geojson.
# Step4. Use the following script to convert that geojson
# into featureclasses and then merge them.
@odoe
odoe / EventedMap.js
Created Sep 17, 2012
Evented based esri.Map
View EventedMap.js
// Because I was bored and wanted to use the foo.on() method with my map
define(['dojo/_base/declare', 'dojo/Evented'], function(declare, Evented) {
var EventedMap = declare([Evented, esri.Map], {
constructor: function() {
var _this = this;
dojo.connect(this, "onClick", function(event) {
return _this.emit("click", event);
});
dojo.connect(this, "onDblClick", function(event) {
View tmux.conf
source-file "${HOME}/.tmux-themepack/powerline/block/cyan.tmuxtheme"
@odoe
odoe / leaflet-search-control.js
Last active May 23, 2020
Leaflet sample search control
View leaflet-search-control.js
function sortParks(a, b) {
var _a = a.feature.properties.park;
var _b = b.feature.properties.park;
if (_a < _b) {
return -1;
}
if (_a > _b) {
return 1;
}
return 0;
@odoe
odoe / vector-tile-pr.md
Last active May 13, 2020
Indexing of Vector Tiles (Clipping Justification)
View vector-tile-pr.md

Indexing of Vector Tiles (Clipping Justification)

This pull-request provides the ability to display vector tile trees containing leaves at different levels of detail (LOD) based on data density. This requires clipping tiles when zoomed in beyond a physically present leaf and using an index to determine tile presence.

Purpose

The goal is to efficiently cook tiles and still maintain a high level of data precision in vector tiles. We can achieve this by limiting the cooking of tiles to a satisfactory LOD in less geometrically dense areas. On the consumer side, clipping can be used to clip larger tiles to fit a more precise LOD as needed. This methodology also provides over-zooming of tiles beyond the LOD limit of the current Vector Tile specification.

@odoe
odoe / Stopwatch.m.css
Created Mar 29, 2020
dojo timer widget
View Stopwatch.m.css
@import url('https://fonts.googleapis.com/css?family=Orbitron&display=swap');
@import './variables.css';
.root {
padding: 1rem;
text-align: center;
}
.timer {
font-family: 'Orbitron', sans-serif;
View .spacemacs
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
View main.js
// original AMD version
define([
'views/MapView',
'views/LocatorView'
], function(
MapView, LocatorView
) {
var node = document.getElementById('map-area');
var node2 = document.getElementById('locator-area');
var mapView = new MapView(null, node);
@odoe
odoe / answers.ts
Last active Dec 4, 2019
AdventOfCode-2019
View answers.ts
// Part 1
/**
For a mass of 12, divide by 3 and round down to get 4, then subtract 2 to get 2.
For a mass of 14, dividing by 3 and rounding down still yields 4, so the fuel required is also 2.
For a mass of 1969, the fuel required is 654.
For a mass of 100756, the fuel required is 33583.
**/
function fuelCounterUpper(mass: number): number {
@odoe
odoe / esrileaf.html
Created Apr 19, 2012
Demo of Backbone.js using ESRI REST in Leaflet
View esrileaf.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta content='text/html, charset=UTF-8' http-equiv='Content-Type' />
<meta content='IE=7,IE=8,IE=9' http-equiv='X-UA-Compatible' />
<meta content='initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport' />
<style type="text/css">
@import url("http://code.leafletjs.com/leaflet-0.3.1/leaflet.css");
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
You can’t perform that action at this time.