Permalink
Browse files

website update

  • Loading branch information...
1 parent 7737515 commit c741764fca66bc5ac196fdb1099b8a30b29b97a3 @gka gka committed Jun 9, 2012
Showing with 13,055 additions and 0 deletions.
  1. 0 source/.html
  2. +33 −0 source/__init__.html
  3. +858 −0 source/cartogram.html
  4. +214 −0 source/cli.html
  5. +94 −0 source/errors.html
  6. +114 −0 source/filter.html
  7. +50 −0 source/geometry/__init__.html
  8. +195 −0 source/geometry/bbox.html
  9. +279 −0 source/geometry/geometry.html
  10. +519 −0 source/geometry/line.html
  11. +141 −0 source/geometry/point.html
  12. +625 −0 source/geometry/polygon.html
  13. +196 −0 source/geometry/utils.html
  14. +226 −0 source/geometry/view.html
  15. BIN source/img/crop-bbox-01.png
  16. BIN source/img/crop-polygon-1.png
  17. BIN source/img/crop-polygon-minarea.png
  18. BIN source/img/crop-polygon.png
  19. BIN source/img/join.png
  20. BIN source/img/logo.png
  21. BIN source/img/simplify.png
  22. +326 −0 source/kartograph.html
  23. +68 −0 source/layersource/__init__.html
  24. +55 −0 source/layersource/layersource.html
  25. +2,669 −0 source/layersource/shapefile.html
  26. +408 −0 source/layersource/shplayer.html
  27. +746 −0 source/map.html
  28. +329 −0 source/maplayer.html
  29. +499 −0 source/options.html
  30. +219 −0 source/proj/__init__.html
  31. +432 −0 source/proj/base.html
  32. +320 −0 source/proj/conic.html
  33. +426 −0 source/proj/cylindrical.html
  34. +1,014 −0 source/proj/pseudocylindrical.html
  35. +186 −0 source/pycco.css
  36. +100 −0 source/renderer/__init__.html
  37. +272 −0 source/renderer/kml.html
  38. +525 −0 source/renderer/svg.html
  39. +85 −0 source/simplify/__init__.html
  40. +108 −0 source/simplify/distance.html
  41. +221 −0 source/simplify/douglas_peucker.html
  42. +133 −0 source/simplify/mpoint.html
  43. +152 −0 source/simplify/unify.html
  44. +218 −0 source/simplify/visvalingam.html
View
No changes.
View
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8">
+ <title>__init__.py</title>
+ <link rel="stylesheet" href="pycco.css">
+</head>
+<body>
+<div id="background"></div>
+<div id='container'>
+ <div class='section'>
+ <div class='docs'><h1>__init__.py</h1></div>
+ </div>
+ <div class='clearall'>
+ <div class='section' id='section-0'>
+ <div class='docs'>
+ <div class='octowrap'>
+ <a class='octothorpe' href='#section-0'>#</a>
+ </div>
+
+ </div>
+ <div class='code'>
+ <div class="highlight"><pre><span class="kn">from</span> <span class="nn">kartograph</span> <span class="kn">import</span> <span class="n">Kartograph</span>
+<span class="kn">from</span> <span class="nn">map</span> <span class="kn">import</span> <span class="n">projections</span>
+
+<span class="n">__all__</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;Kartograph&#39;</span><span class="p">,</span> <span class="s">&#39;projections&#39;</span><span class="p">]</span>
+
+</pre></div>
+ </div>
+ </div>
+ <div class='clearall'></div>
+</div>
+</body>
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,94 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8">
+ <title>errors.py</title>
+ <link rel="stylesheet" href="pycco.css">
+</head>
+<body>
+<div id="background"></div>
+<div id='container'>
+ <div class='section'>
+ <div class='docs'><h1>errors.py</h1></div>
+ </div>
+ <div class='clearall'>
+ <div class='section' id='section-0'>
+ <div class='docs'>
+ <div class='octowrap'>
+ <a class='octothorpe' href='#section-0'>#</a>
+ </div>
+ <p>error classes for kartograph</p>
+ </div>
+ <div class='code'>
+ <div class="highlight"><pre></pre></div>
+ </div>
+ </div>
+ <div class='clearall'></div>
+ <div class='section' id='section-1'>
+ <div class='docs'>
+ <div class='octowrap'>
+ <a class='octothorpe' href='#section-1'>#</a>
+ </div>
+ <p>Base class for exceptions in this module.</p>
+ </div>
+ <div class='code'>
+ <div class="highlight"><pre><span class="k">class</span> <span class="nc">KartographError</span><span class="p">(</span><span class="ne">Exception</span><span class="p">):</span></pre></div>
+ </div>
+ </div>
+ <div class='clearall'></div>
+ <div class='section' id='section-2'>
+ <div class='docs'>
+ <div class='octowrap'>
+ <a class='octothorpe' href='#section-2'>#</a>
+ </div>
+
+ </div>
+ <div class='code'>
+ <div class="highlight"><pre> <span class="k">def</span> <span class="nf">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+ <span class="k">return</span> <span class="s">&#39;</span><span class="se">\033</span><span class="s">[0;31;40mKartograph-Error:</span><span class="se">\033</span><span class="s">[0m &#39;</span> <span class="o">+</span> <span class="nb">super</span><span class="p">(</span><span class="n">KartographError</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">__str__</span><span class="p">()</span></pre></div>
+ </div>
+ </div>
+ <div class='clearall'></div>
+ <div class='section' id='section-3'>
+ <div class='docs'>
+ <div class='octowrap'>
+ <a class='octothorpe' href='#section-3'>#</a>
+ </div>
+
+ </div>
+ <div class='code'>
+ <div class="highlight"><pre><span class="k">class</span> <span class="nc">KartographOptionParseError</span><span class="p">(</span><span class="n">KartographError</span><span class="p">):</span>
+ <span class="k">pass</span></pre></div>
+ </div>
+ </div>
+ <div class='clearall'></div>
+ <div class='section' id='section-4'>
+ <div class='docs'>
+ <div class='octowrap'>
+ <a class='octothorpe' href='#section-4'>#</a>
+ </div>
+
+ </div>
+ <div class='code'>
+ <div class="highlight"><pre><span class="k">class</span> <span class="nc">KartographShapefileAttributesError</span><span class="p">(</span><span class="n">KartographError</span><span class="p">):</span>
+ <span class="k">pass</span></pre></div>
+ </div>
+ </div>
+ <div class='clearall'></div>
+ <div class='section' id='section-5'>
+ <div class='docs'>
+ <div class='octowrap'>
+ <a class='octothorpe' href='#section-5'>#</a>
+ </div>
+
+ </div>
+ <div class='code'>
+ <div class="highlight"><pre><span class="k">class</span> <span class="nc">KartographLayerSourceError</span><span class="p">(</span><span class="n">KartographError</span><span class="p">):</span>
+ <span class="k">pass</span>
+
+</pre></div>
+ </div>
+ </div>
+ <div class='clearall'></div>
+</div>
+</body>
View
@@ -0,0 +1,114 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8">
+ <title>filter.py</title>
+ <link rel="stylesheet" href="pycco.css">
+</head>
+<body>
+<div id="background"></div>
+<div id='container'>
+ <div class='section'>
+ <div class='docs'><h1>filter.py</h1></div>
+ </div>
+ <div class='clearall'>
+ <div class='section' id='section-0'>
+ <div class='docs'>
+ <div class='octowrap'>
+ <a class='octothorpe' href='#section-0'>#</a>
+ </div>
+ <p>layer filter</p>
+ </div>
+ <div class='code'>
+ <div class="highlight"><pre></pre></div>
+ </div>
+ </div>
+ <div class='clearall'></div>
+ <div class='section' id='section-1'>
+ <div class='docs'>
+ <div class='octowrap'>
+ <a class='octothorpe' href='#section-1'>#</a>
+ </div>
+
+ </div>
+ <div class='code'>
+ <div class="highlight"><pre><span class="kn">import</span> <span class="nn">re</span></pre></div>
+ </div>
+ </div>
+ <div class='clearall'></div>
+ <div class='section' id='section-2'>
+ <div class='docs'>
+ <div class='octowrap'>
+ <a class='octothorpe' href='#section-2'>#</a>
+ </div>
+
+ </div>
+ <div class='code'>
+ <div class="highlight"><pre><span class="k">def</span> <span class="nf">filter_record</span><span class="p">(</span><span class="n">filt</span><span class="p">,</span> <span class="n">record</span><span class="p">):</span>
+ <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">filt</span><span class="p">,</span> <span class="nb">dict</span><span class="p">):</span>
+ <span class="k">if</span> <span class="s">&#39;and&#39;</span> <span class="ow">in</span> <span class="n">filt</span><span class="p">:</span>
+ <span class="n">res</span> <span class="o">=</span> <span class="bp">True</span>
+ <span class="k">for</span> <span class="n">sfilt</span> <span class="ow">in</span> <span class="n">filt</span><span class="p">[</span><span class="s">&#39;and&#39;</span><span class="p">]:</span>
+ <span class="n">res</span> <span class="o">=</span> <span class="n">res</span> <span class="ow">and</span> <span class="n">filter_record</span><span class="p">(</span><span class="n">sfilt</span><span class="p">,</span> <span class="n">record</span><span class="p">)</span>
+ <span class="k">elif</span> <span class="s">&#39;or&#39;</span> <span class="ow">in</span> <span class="n">filt</span><span class="p">:</span>
+ <span class="n">res</span> <span class="o">=</span> <span class="bp">False</span>
+ <span class="k">for</span> <span class="n">sfilt</span> <span class="ow">in</span> <span class="n">filt</span><span class="p">[</span><span class="s">&#39;or&#39;</span><span class="p">]:</span>
+ <span class="n">res</span> <span class="o">=</span> <span class="n">res</span> <span class="ow">or</span> <span class="n">filter_record</span><span class="p">(</span><span class="n">sfilt</span><span class="p">,</span> <span class="n">record</span><span class="p">)</span>
+ <span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">filt</span><span class="p">,</span> <span class="nb">list</span><span class="p">):</span>
+ <span class="n">res</span> <span class="o">=</span> <span class="n">filter_single</span><span class="p">(</span><span class="n">filt</span><span class="p">,</span> <span class="n">record</span><span class="p">)</span>
+ <span class="k">return</span> <span class="n">res</span></pre></div>
+ </div>
+ </div>
+ <div class='clearall'></div>
+ <div class='section' id='section-3'>
+ <div class='docs'>
+ <div class='octowrap'>
+ <a class='octothorpe' href='#section-3'>#</a>
+ </div>
+
+ </div>
+ <div class='code'>
+ <div class="highlight"><pre><span class="k">def</span> <span class="nf">filter_single</span><span class="p">(</span><span class="n">filt</span><span class="p">,</span> <span class="n">record</span><span class="p">):</span>
+ <span class="n">key</span><span class="p">,</span> <span class="n">comp</span><span class="p">,</span> <span class="n">val</span> <span class="o">=</span> <span class="n">filt</span>
+ <span class="n">prop</span> <span class="o">=</span> <span class="n">record</span><span class="p">[</span><span class="n">key</span><span class="p">]</span>
+ <span class="n">comp</span> <span class="o">=</span> <span class="n">comp</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s">&#39; &#39;</span><span class="p">)</span>
+
+ <span class="k">if</span> <span class="s">&#39;in&#39;</span> <span class="ow">in</span> <span class="n">comp</span><span class="p">:</span>
+ <span class="n">res</span> <span class="o">=</span> <span class="n">prop</span> <span class="ow">in</span> <span class="n">val</span>
+ <span class="k">elif</span> <span class="s">&#39;like&#39;</span> <span class="ow">in</span> <span class="n">comp</span><span class="p">:</span>
+ <span class="n">res</span> <span class="o">=</span> <span class="n">re</span><span class="o">.</span><span class="n">search</span><span class="p">(</span><span class="s">&#39;^&#39;</span> <span class="o">+</span> <span class="n">_escape_regex</span><span class="p">(</span><span class="n">val</span><span class="p">)</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s">&#39;%&#39;</span><span class="p">,</span> <span class="s">&#39;.*&#39;</span><span class="p">)</span> <span class="o">+</span> <span class="s">&#39;$&#39;</span><span class="p">,</span> <span class="n">prop</span><span class="p">)</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span>
+ <span class="k">elif</span> <span class="s">&#39;matches&#39;</span> <span class="ow">in</span> <span class="n">comp</span><span class="p">:</span>
+ <span class="n">res</span> <span class="o">=</span> <span class="n">re</span><span class="o">.</span><span class="n">search</span><span class="p">(</span><span class="n">val</span><span class="p">,</span> <span class="n">prop</span><span class="p">)</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span>
+ <span class="k">elif</span> <span class="s">&#39;is&#39;</span> <span class="ow">in</span> <span class="n">comp</span> <span class="ow">or</span> <span class="s">&#39;=&#39;</span> <span class="ow">in</span> <span class="n">comp</span><span class="p">:</span>
+ <span class="n">res</span> <span class="o">=</span> <span class="n">prop</span> <span class="o">==</span> <span class="n">val</span>
+ <span class="k">elif</span> <span class="s">&#39;greater&#39;</span> <span class="ow">in</span> <span class="n">comp</span> <span class="ow">or</span> <span class="p">(</span><span class="s">&#39;&gt;&#39;</span> <span class="ow">in</span> <span class="n">comp</span><span class="p">):</span>
+ <span class="n">res</span> <span class="o">=</span> <span class="n">prop</span> <span class="o">&gt;</span> <span class="n">val</span>
+ <span class="k">elif</span> <span class="s">&#39;less&#39;</span> <span class="ow">in</span> <span class="n">comp</span> <span class="ow">or</span> <span class="s">&#39;&lt;&#39;</span> <span class="ow">in</span> <span class="n">comp</span><span class="p">:</span>
+ <span class="n">res</span> <span class="o">=</span> <span class="n">prop</span> <span class="o">&lt;</span> <span class="n">val</span>
+ <span class="k">if</span> <span class="s">&#39;not&#39;</span> <span class="ow">in</span> <span class="n">comp</span><span class="p">:</span>
+ <span class="k">return</span> <span class="ow">not</span> <span class="n">res</span>
+ <span class="k">else</span><span class="p">:</span>
+ <span class="k">return</span> <span class="n">res</span></pre></div>
+ </div>
+ </div>
+ <div class='clearall'></div>
+ <div class='section' id='section-4'>
+ <div class='docs'>
+ <div class='octowrap'>
+ <a class='octothorpe' href='#section-4'>#</a>
+ </div>
+
+ </div>
+ <div class='code'>
+ <div class="highlight"><pre><span class="k">def</span> <span class="nf">_escape_regex</span><span class="p">(</span><span class="n">s</span><span class="p">):</span>
+ <span class="n">chars</span> <span class="o">=</span> <span class="p">(</span><span class="s">&#39;.&#39;</span><span class="p">,</span> <span class="s">&#39;*&#39;</span><span class="p">,</span> <span class="s">&#39;?&#39;</span><span class="p">,</span> <span class="s">&#39;+&#39;</span><span class="p">,</span> <span class="s">&#39;(&#39;</span><span class="p">,</span> <span class="s">&#39;)&#39;</span><span class="p">,</span> <span class="s">&#39;[&#39;</span><span class="p">,</span> <span class="s">&#39;]&#39;</span><span class="p">,</span> <span class="s">&#39;-&#39;</span><span class="p">)</span>
+ <span class="k">for</span> <span class="n">c</span> <span class="ow">in</span> <span class="n">chars</span><span class="p">:</span>
+ <span class="n">s</span> <span class="o">=</span> <span class="n">s</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">c</span><span class="p">,</span> <span class="s">&#39;</span><span class="se">\\</span><span class="s">&#39;</span> <span class="o">+</span> <span class="n">c</span><span class="p">)</span>
+ <span class="k">return</span> <span class="n">s</span>
+
+</pre></div>
+ </div>
+ </div>
+ <div class='clearall'></div>
+</div>
+</body>
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8">
+ <title>__init__.py</title>
+ <link rel="stylesheet" href="../pycco.css">
+</head>
+<body>
+<div id="background"></div>
+<div id='container'>
+ <div class='section'>
+ <div class='docs'><h1>__init__.py</h1></div>
+ </div>
+ <div class='clearall'>
+ <div class='section' id='section-0'>
+ <div class='docs'>
+ <div class='octowrap'>
+ <a class='octothorpe' href='#section-0'>#</a>
+ </div>
+ <p>geometry package</p>
+ </div>
+ <div class='code'>
+ <div class="highlight"><pre></pre></div>
+ </div>
+ </div>
+ <div class='clearall'></div>
+ <div class='section' id='section-1'>
+ <div class='docs'>
+ <div class='octowrap'>
+ <a class='octothorpe' href='#section-1'>#</a>
+ </div>
+
+ </div>
+ <div class='code'>
+ <div class="highlight"><pre><span class="n">__all__</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;Feature&#39;</span><span class="p">,</span> <span class="s">&#39;Geometry&#39;</span><span class="p">,</span> <span class="s">&#39;SolidGeometry&#39;</span><span class="p">,</span> <span class="s">&#39;MultiPolygon&#39;</span><span class="p">,</span> <span class="s">&#39;BBox&#39;</span><span class="p">,</span> <span class="s">&#39;Point&#39;</span><span class="p">,</span> <span class="s">&#39;View&#39;</span><span class="p">,</span> <span class="s">&#39;Line&#39;</span><span class="p">,</span> <span class="s">&#39;PolyLine&#39;</span><span class="p">,</span> <span class="s">&#39;create_feature&#39;</span><span class="p">]</span>
+
+<span class="kn">from</span> <span class="nn">feature</span> <span class="kn">import</span> <span class="o">*</span>
+<span class="kn">from</span> <span class="nn">geometry</span> <span class="kn">import</span> <span class="n">Geometry</span><span class="p">,</span> <span class="n">SolidGeometry</span>
+<span class="kn">from</span> <span class="nn">polygon</span> <span class="kn">import</span> <span class="n">MultiPolygon</span>
+<span class="kn">from</span> <span class="nn">point</span> <span class="kn">import</span> <span class="n">Point</span>
+<span class="kn">from</span> <span class="nn">bbox</span> <span class="kn">import</span> <span class="n">BBox</span>
+<span class="kn">from</span> <span class="nn">view</span> <span class="kn">import</span> <span class="n">View</span>
+<span class="kn">from</span> <span class="nn">line</span> <span class="kn">import</span> <span class="n">Line</span><span class="p">,</span> <span class="n">PolyLine</span>
+
+</pre></div>
+ </div>
+ </div>
+ <div class='clearall'></div>
+</div>
+</body>
Oops, something went wrong.

0 comments on commit c741764

Please sign in to comment.