Skip to content

Instantly share code, notes, and snippets.

💭
It's full of stars

Rene Rubalcava odoe

💭
It's full of stars
Block or report user

Report or block odoe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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
@odoe
odoe / esritogeo.js
Created Nov 23, 2011
Convert ESRI-JSON to GeoJSON
View esritogeo.js
var stripJSON = function(str) {
return str.replace(/\\n/g, "\\n")
.replace(/\\t/g, "\\t");
};
var jsonToObject = function(stringIn) {
var data;
try {
data = JSON.parse(stripJSON(stringIn));
console.log("json converted to object");
View typescript.snippets
snippet dtsx "Dojo tsx widget"
import { create, tsx } from '@dojo/framework/core/vdom';
const factory = create();
export default factory(function $1() {
return (
<div>Widget</div>
);
});
@odoe
odoe / create_sde_connection.py
Created Apr 26, 2012
Arcpy script to add data to mxd and publish to ArcGIS server without ArcMap
View create_sde_connection.py
'''
Created on Feb 24, 2011
The purpose of this script is to create the SDE connection file needed to connect to your SDE
@author: rrubalcava
'''
import os, arcpy
class CreateSDEConnection:
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<title>My First Map</title>
<style>
html,
body,
#viewDiv {
View .vimrc
" minpac package manager
" Try to load minpac.
packadd minpac
if !exists('*minpac#init')
" minpac is not available.
" Settings for plugin-less environment.
" ...
else
@odoe
odoe / vector-tile-pr.md
Last active Jun 18, 2019
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 / leaflet-search-control.js
Last active Jun 10, 2019
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;
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);
View Profile.ts
// src/tests/unit/widgets/Profile.ts
describe("Profile", () => {
it("default renders correctly", () => {
const h = harness(() => w(Profile, {}));
h.expect(profileAssertion);
});
it("renders given username correctly", () => {
// update the expected result with a given username
const namedAssertion = profileAssertion.setChildren("~welcome", [
"Welcome Kel Varnsen!"
You can’t perform that action at this time.