Skip to content

zeevogels/s2map

 
 

Repository files navigation

<html>

<body>

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-37132882-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

s2map is a simple geo visualizer <br/>
<a href="https://github.com/blackmad/s2map">source code on gitbhub</a>

</p>

I find I have one or more lat/lngs, and I want to put them on a map and not worry about formatting, writing a file, etc, so I just paste it into s2map.com

<ul>

<li>
<a href="http://cl.ly/image/1n2o1p0Y2e0A">
example of pasting in a bounding box from some json
</a>
</li>

<li>
<a href="http://s2map.com/#40.74,-74,40.75,-74.05">
using it via url params (doesn't support all the options yet)
</a>
</li>

<li>
<a href="http://cl.ly/image/1s12263h0X3r">
rendering some geojson coordinates in lng/lat format
</a>
</li>

</ul>

I'm curious if other people find this useful or have feature suggestions.

<p/>

oh, and just for kicks alt/ctrl/meta+click pops up a balloon with lat/lng info

<p/>

Additionally, s2map demonstrates the power of google's s2 (spherical geometry library) available for <a href="http://code.google.com/p/s2-geometry-library/">C++</a> (which doesn't compile publicly, the version in <a href="https://github.com/blackmad/s2map">my github repo</a> does) and <a href="http://code.google.com/p/s2-geometry-library-java/">java</a> (in extensive use at <a href="http://foursquare.com">foursquare</a>). We use it as a very robust geohashing library with a number of great properties (skip-level indexing, prefix parents). Read the code, it's beautiful and well documented and a pretty good intro to the concepts. <a href="https://docs.google.com/presentation/d/1Hl4KapfAENAOf4gv-pSngKwvS_jwNVHRPZTTDzXXn6Q/view?pli=1#slide=id.i0">Presentaion</a> on the algorithms and features.

<ul>
<li>
<a href="/img/demo/default_covering.png">
Generating the default s2 covering for a bounding box
</a>
</li>

<li>
<a href="/img/demo/100cells.png">
S2 covering with 100 cells
</a>
</li>

<li>
<a href="/img/demo/polygon_covering.png">
Polygons work too!
</a>
</li>


<li>
<a href="/img/demo/cells.png">
Visualizing some cell ids (tries to guess if you're visualizing cell ids or tokens)
</a>
</li>

</ul>

</body>
</html>

About

quick and dirty latlng visualizer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 39.9%
  • C++ 26.2%
  • Shell 25.4%
  • Makefile 6.4%
  • Python 1.2%
  • JavaScript 0.5%
  • Other 0.4%