Skip to content

Instantly share code, notes, and snippets.

View eightysteele's full-sized avatar

Aaron Steele eightysteele

View GitHub Profile
{
"item":{
"source":"World Wildlife Fund (WWF)",
"type":"Ecoregion",
"name":"Admiralty Island lowland rain forests",
"description":"",
"storage":{
"location":"G:/MoL/....",
"format":"esri-shape"
},
class OccurrencePolygonSet(db.Model):
# Normal properties...
class Ecoregion(db.Model):
cluster = db.ReferenceProperty(OccurrencePolygonSet)
terms = db.StringListProperty()
# Other properties here...
# Find all ecoregions for a cluster where the ecoregion is introduced and g200Num is 2:
cluster = OccurrencePolygonSet.get(some_key)
// Setup app:
var mol = MOL(function(mol) {
bus = new mol.events.Bus();
api = new mol.ajax.Api(bus);
var config = {bus: bus, api: api, logging:true};
var app = new mol.app.Instance(config);
app.run();
return this;
});
JAVA lat=-90.0, lng=-180.0, key=7-3-0 - PYTHON lat=-90.0, lng=-180.0, key=7-0-1
JAVA lat=-90.0, lng=-180.0, key=7-3-0 - PYTHON lat=-90.0, lng=-180.0, key=7-0-1
JAVA lat=-90.0, lng=-180.0, key=7-3-0 - PYTHON lat=-90.0, lng=-180.0, key=7-0-1
JAVA lat=-90.0, lng=-180.0, key=7-3-0 - PYTHON lat=-90.0, lng=-180.0, key=7-0-1
JAVA lat=-90.0, lng=-180.0, key=7-3-0 - PYTHON lat=-90.0, lng=-180.0, key=7-0-1
JAVA lat=-90.0, lng=-180.0, key=7-3-0 - PYTHON lat=-90.0, lng=-180.0, key=7-0-1
JAVA lat=-90.0, lng=-180.0, key=7-3-0 - PYTHON lat=-90.0, lng=-180.0, key=7-0-1
JAVA lat=-90.0, lng=-180.0, key=7-3-0 - PYTHON lat=-90.0, lng=-180.0, key=7-0-1
JAVA lat=-90.0, lng=-180.0, key=7-3-0 - PYTHON lat=-90.0, lng=-180.0, key=7-0-1
JAVA lat=-90.0, lng=-180.0, key=7-3-0 - PYTHON lat=-90.0, lng=-180.0, key=7-0-1
<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Placemark>
<name>Tessellated</name>
<visibility>1</visibility>
<description>Hi</description>
<!-- LinearRing as a "standalone" geometry -->
<LinearRing id="4:0:0">
<gx:altitudeOffset>0</gx:altitudeOffset>
<extrude>0</extrude>
<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Placemark>
<name>Tessellated</name>
<visibility>1</visibility>
<description></description>
<!-- LinearRing as a "standalone" geometry -->
<LinearRing id="4:0:0">
<gx:altitudeOffset>0</gx:altitudeOffset>
<extrude>0</extrude>
package org.bg.server;
import java.io.IOException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.google.appengine.repackaged.com.google.common.collect.ImmutableMap;
import com.google.gson.Gson;
#!/usr/bin/env python
#
# Copyright 2011 Map Of Life
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
class Tile(webapp.RequestHandler):
def post(self):
self.get()
def get(self):
url = self.request.path_info
png_data = TileService.get_png_tile(url)
if png_data:
self.response.headers['Content-Type'] = 'image/png'
self.response.out.write(png_data.getvalue())