This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rectangles = require('./buildings2.json').features | |
const points = require('./dmv_props.json').features | |
const bbox = require('@turf/bbox').default | |
const RBush = require('rbush') | |
function prepare(features) { | |
return features.map(f => { | |
const box = bbox(f) | |
return { | |
minX: box[0], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rectangles = require('./buildings2.json').features | |
const points = require('./dmv_props.json').features | |
const bbox = require('@turf/bbox').default | |
const RBush = require('rbush') | |
function prepare(features) { | |
return features.map(f => { | |
const box = bbox(f) | |
return { | |
minX: box[0], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Requires Python 2.7+ | |
# Sample Usage: | |
# python copyContent.py <sourcePortal> <sourceAdmin> <sourcePassword> | |
# <query> <destinationPortal> <destAdmin> | |
# <destPassword> <destOwner> <destFolder> | |
import urllib | |
import json |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module['exports'] = function echoHttp (hook) { | |
var geographicCodes = {"3819":{"name":"GCS_HD1909","wkt":"GEOGCS[\"GCS_HD1909\",DATUM[\"D_Hungarian_Datum_1909\",SPHEROID[\"Bessel_1841\",6377397.155,299.1528128]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]"},"3821":{"name":"GCS_TWD_1967","wkt":"GEOGCS[\"GCS_TWD_1967\",DATUM[\"D_TWD_1967\",SPHEROID[\"GRS_1967_Truncated\",6378160.0,298.25]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]"},"3824":{"name":"GCS_TWD_1997","wkt":"GEOGCS[\"GCS_TWD_1997\",DATUM[\"D_TWD_1997\",SPHEROID[\"GRS_1980\",6378137.0,298.257222101]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]"},"3889":{"name":"GCS_IGRS","wkt":"GEOGCS[\"GCS_IGRS\",DATUM[\"D_Iraqi_Geospatial_Reference_System\",SPHEROID[\"GRS_1980\",6378137.0,298.257222101]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]"},"3906":{"name":"GCS_MGI_1901","wkt":"GEOGCS[\"GCS_MGI_1901\",DATUM[\"D_MGI_1901\",SPHEROID[\"Bessel_1841\",6377397.155,299.1528128]],PRIMEM[\" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Example request: http://koop.com/craigslist/washingtondc/apartments/FeatureServer/0/query?where=price>20&f=geojson | |
Req is the express request object: https://expressjs.com/en/4x/api.html#req | |
req.params = { | |
host: 'washingtondc', | |
id: 'apartments' | |
} | |
req.query = { | |
where: 'price > 20', | |
f: geojson |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetch = require('node-fetch') | |
const generateToken = require('./lib/token').generate | |
module.exports = async function (args) { | |
const dcatUrl = `${args.site}/data.json` | |
const catalog = await fetch(dcatUrl).then(r => { return r.json() }) | |
const formatted = catalog.dataset.map(d => { | |
return { | |
title: d.title, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"__inputs": [ | |
{ | |
"name": "DS_NGINX-ACCESS-LOG", | |
"label": "nginx-access-log", | |
"description": "", | |
"type": "datasource", | |
"pluginId": "elasticsearch", | |
"pluginName": "Elasticsearch" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
DIR=$(dirname"$0") | |
STAMP=$(date +%s) | |
TEMPDIR="/srv/hub/$STAMP" | |
APPLICATIONDIR="/arcgis/portal/apps/hub" | |
OLDDIR=$(cat ./.old-directory) | |
echo "downloading files to $DIR" | |
/usr/local/bin/aws s3 cp s3://REDACTED/build.tar.gz "$DIR" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET /:provider/:id | |
DELETE /:provider/:id | |
PUT /:provider/:id Content-Type: application/json | |
{ | |
name: | |
description: | |
schemas: { | |
georgia: { | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "koop-trimet", | |
"version": "1.0.8", | |
"description": "A Trimet provider for koop", | |
"main": "index.js", | |
"directories": { | |
"test": "test" | |
}, | |
"scripts": { | |
"start": "node server.js", |
NewerOlder