spacetimeid

spacetimeid is very simple web application to encode and decode unique 64-bit numeric identifiers for a combined set of x, y and z coordinates.

Another way to think about it is as a unique ID for any given point at a specific time anywhere on Earth.

For example, the corner of 16th and Mission, in San Francisco, at around midnight the night/morning of March 17, 2010 would be encoded like this:

GET http://spacetimeid.appspot.com/encode/-122.419304/37.764832/1268809061

<rsp stat="ok">
	<spacetime y="37.764832" x="-122.419304" z="1268809061" id="4726418083411316312844298485971"/>
</rsp>

To decode a unique ID back in to space and time coordinates, you'd do this:

GET http://spacetimeid.appspot.com/decode/4726418083411316312844298485971

<rsp stat="ok">
	<spacetime y="37.764832" x="-122.419304" z="1268809061" id="4726418083411316312844298485971"/>
</rsp>

You can also encode WOE IDs and time by going to the /woe endpoint. Here is The Mission, early morning of the 17th:

GET http://spacetimeid.appspot.com/woe/encode/55970963/1268809061

<rsp stat="ok">
	<spacetime woeid="55970963" id="4236329328336141596" timestamp="1268809061"/>
</rsp>

It is also possible encode IP addresses. Here is (more or less) the same corner, at the same time, in IP space:

GET http://spacetimeid.appspot.com/ip/encode/173.164.158.185/1268809061

<rsp stat="ok">
	<spacetime ip="173.164.158.185" id="2372987648121137443" timestamp="1268809061"/>
</rsp>

Decoding WOE IDs and IP adddresses the same as decoding coordinates but just make sure you go to the correct endpoint: /woe/decode and /ip/decode respectively.

some details

further reading