Skip to content

Instantly share code, notes, and snippets.

Avatar

Ian Schneider ischneider

  • Planet Labs
View GitHub Profile
View immutable.go
package main
import (
"fmt"
"os"
)
type D struct {
v string
}
@ischneider
ischneider / geoserver.py
Created May 20, 2015
build and run geoserver w/ different data directories
View geoserver.py
import os.path
import argparse
import os
import sys
import subprocess
MAVEN = os.getenv('MAVEN', 'mvn')
GEOSERVER_HOME = os.getenv('GEOSERVER_HOME', None)
GEOTOOLS_HOME = os.getenv('GEOTOOLS_HOME', None)
DATA_DIR_HOME = os.getenv('DATA_DIR_HOME', None)
View latest-submodule
#!/bin/bash
REPO=$1
function die() {
echo $1
exit 1
}
[ ! -e $REPO/.git ] && die "not git repo"
pushd $REPO
@ischneider
ischneider / mp_test.py
Last active Jan 22, 2020
multiprocessing example using fiona and shapely
View mp_test.py
from multiprocessing import Pool
import sys
import fiona
from fiona.transform import transform_geom
from shapely.geometry import mapping, shape
import json
def reproject(f, srs_crs, dest_crs):
f['geometry'] = transform_geom(srs_crs, dest_crs, f['geometry'],
antimeridian_cutting=True,
@ischneider
ischneider / nbactions.xml
Created Aug 29, 2013
netbeans config for running geoserver web/app module
View nbactions.xml
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<actionName>run</actionName>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2:exec</goal>
</goals>
<properties>
<exec.args>-classpath %classpath ${packageClassName}</exec.args>
@ischneider
ischneider / example.py
Created Apr 10, 2012
finding nativeName of geoserver resource
View example.py
cat = Layer.objects.gs_catalog
for l in Layer.objects.all():
gsl = cat.get_layer(l.name)
# always returns a copy, so hold on to it
res = gsl.resource
res.fetch()
name = res.dom.find('nativeName').text
print l.name, name
You can’t perform that action at this time.