Author: Sean Gillies Version: 1.0
This document describes a GeoJSON-like protocol for geo-spatial (GIS) vector data.
#!/usr/bin/env python | |
# distance_from_shore.py: compute true distance between points | |
# and closest geometry. | |
# shaun walbridge, 2012.05.15 | |
# TODO: no indexing used currently, could stand if performance needs | |
# improving (currently runs in ~1.5hr for 13k points) | |
from geopy import distance |
library(rgdal) | |
behrmann.crs <- CRS('+proj=cea +lon_0=0 +lat_ts=30 +x_0=0 +y_0=0 +datum=WGS84 +ellps=WGS84 +units=m +no_defs') | |
# define a known point in Behrmann projection | |
point <- SpatialPoints(cbind(0, 7284713.234), behrmann.crs) | |
# try reprojecting point back to WGS84 | |
spTransform(point, CRS('+init=epsg:4326')) |
colorama 0.3.7 py35_0 defaults | |
cycler 0.10.0 py35_0 defaults | |
future 0.15.2 py35_0 defaults | |
matplotlib 1.5.3 np111py35_0e [arcgispro] esri | |
mpmath 0.19 py35_1 defaults | |
netcdf4 1.2.4 py35_0e [arcgispro] esri | |
nose 1.3.7 py35_1 defaults | |
numexpr 2.6.1 np111py35_0e [arcgispro] esri | |
numpy 1.11.2 py35_0e [arcgispro] esri | |
pandas 0.19.0 np111py35_0 defaults |
--- conda_api.py.orig 2018-05-11 12:10:17.419642200 -0400 | |
+++ conda_api.py 2018-05-11 12:14:31.058928700 -0400 | |
@@ -406,12 +406,12 @@ | |
""" | |
if abspath: | |
if sys.platform == 'win32': | |
- python = join(self.ROOT_PREFIX, 'python.exe') | |
- conda = join(self.ROOT_PREFIX, 'Scripts', 'conda-script.py') | |
+ python = join(self.CONDA_PREFIX, 'python.exe') | |
+ conda = join(self.ROOT_PREFIX, 'Scripts', 'conda.exe') |
x = [5, 10, 15, 20, 30, 40, 50, 60, 100, 140] | |
def range_finder(seq): | |
it = iter(seq) | |
prev = next(it) | |
prev_diff = seq[1] - seq[0] | |
r = 0 | |
for (i, item) in enumerate(it): | |
diff = item - prev | |
if diff != prev_diff: |
import arcpy | |
import os | |
def create_path(path): | |
if not os.path.exists(path): | |
print "Creating directory {}".format(path) | |
os.makedirs(path) | |
# default application data dir; e.g. c:\Users\scw\AppData\Roaming |
@setlocal enabledelayedexpansion | |
@echo off | |
@CALL :normalizepath scripts_path "%~dp0" | |
@set env_text="%scripts_path%proenv.txt" | |
:: read the activte environment name | |
@set /p CONDA_NEW_ENV=<%env_text% | |
@set CONDA_SKIPCHECK=1 | |
@set "CONDA_PREFIX=%CONDA_NEW_ENV%" |
import arcpy | |
class Toolbox(object): | |
def __init__(self): | |
self.label = u'Example_Toolbox' | |
self.alias = '' | |
self.tools = [FirstTool, SecondTool, ThirdTool] | |
class FirstTool(object): |