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
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, |
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
package main | |
import ( | |
"fmt" | |
"os" | |
) | |
type D struct { | |
v string | |
} |
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
<?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> |
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
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 |
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
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) |
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/bash | |
REPO=$1 | |
function die() { | |
echo $1 | |
exit 1 | |
} | |
[ ! -e $REPO/.git ] && die "not git repo" | |
pushd $REPO |