This file contains hidden or 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
wget \ | |
http://developer.mapquest.com/content/static/geotiffs/mercator_tiffs.tar \ | |
http://tile.openstreetmap.org/world_boundaries-spherical.tgz \ | |
http://tile.openstreetmap.org/processed_p.tar.bz2 \ | |
http://tile.openstreetmap.org/shoreline_300.tar.bz2 |
This file contains hidden or 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 org.geoscript._ | |
import layer.Shapefile, support.math.Interpolation, style.combinators._, | |
style.io.SLD, io.Sink | |
import org.geotools.filter.text.ecql.ECQL.{ toFilter => cql } | |
import java.awt.Color | |
val states = Shapefile("geoscript/src/test/resources/data/states.shp") | |
val buckets = | |
(states.features.map(_.get[Double]("PERSONS")).toSeq |
This file contains hidden or 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
// Run with 'jrunscript fonts.js' or just copy/paste in the jrunscript interactive interpreter | |
var GraphicsEnvironment = Packages.java.awt.GraphicsEnvironment; | |
var fonts = | |
GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts(); | |
var test = "\u4e00"; // a String, you can replace it with your own test text if you care about a different language. | |
// this value came from http://www.chinesecomputing.com/programming/java.html regarding Chinese text handling in Java | |
for (var i = 0; i < fonts.length; i++) |
This file contains hidden or 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
/** Represents a value of one of two possible types (a disjoint union.) | |
* Instances of Either are either an instance of [[scala.Left]] or [[scala.Right]]. | |
* | |
* A common use of Either is as an alternative to [[scala.Option]] for dealing | |
* with possible missing values. In this usage, [[scala.None]] is replaced | |
* with a [[scala.Left]] which can contain useful information. | |
* [[scala.Right]] takes the place of [[scala.Some]]. Convention dictates | |
* that Left is used for failure and Right is used for success. | |
* | |
* For example, you could use ``Either[Exception, Int]`` to safely parse a String: |
This file contains hidden or 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"?> | |
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="1.1.0" maxFeatures="100" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> | |
<wfs:Query xmlns:feature="http://geonode.org" typeName="feature:conflicts" srsName="EPSG:900913"> | |
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> | |
<ogc:And> | |
<ogc:PropertyIsBetween> | |
<ogc:PropertyName>EpEndDate</ogc:PropertyName> | |
<ogc:LowerBoundary> | |
<ogc:Literal>1946-07-21T04:00:00.000Z</ogc:Literal> | |
</ogc:LowerBoundary> |
This file contains hidden or 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 org.apache.commons |
This file contains hidden or 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"?> | |
<sld:UserStyle xmlns="http://www.opengis.net/sld" | |
xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" | |
xmlns:gml="http://www.opengis.net/gml"> | |
<sld:Name>Default Styler</sld:Name> | |
<sld:Title/> | |
<sld:FeatureTypeStyle> | |
<sld:Name>name</sld:Name> | |
<sld:Rule> | |
<ogc:Filter> |
This file contains hidden or 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
trait Request | |
class RequestVerbs(req: Request) { | |
def <:< (headers: Map[String, String]): Request | |
} | |
implicit def requestsForVerbs(req: Request): RequestVerbs = | |
new RequestVerbs(req) | |
def url(theUrl: String): Request |
This file contains hidden or 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
[MASTER] | |
# Specify a configuration file. | |
#rcfile= | |
# Python code to execute, usually for sys.path manipulation such as | |
# pygtk.require(). | |
#init-hook= | |
# Profiled execution. |
This file contains hidden or 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
* { | |
raster-opacity: 0.7; | |
raster-channel-selection: 1; | |
raster-channel-selection: 1 2 3; | |
raster-contrast-enhancement: normalize; | |
raster-contrast-enhancement: histogram; | |
raster-contrast-enhancement: gamma-value(2); | |
raster-shaded-relief: brightness-only; | |
raster-shaded-relief: relief-factor(55); | |
raster-shaded-relief: brightness-only relief-factor(55); |