Wednesday, April 30, 2014

Building Borges' Map, One Line of Three.js at a Time

It's been so long since there's been a post, I don't know where to start.

Well, let's look a the map, Good idea! unFlatLand R10 has been up for weeks:

Jaanga unFlatland

But it's what off the map where it has really been happening. The goal - the quest - keeps getting to be bigger, deeper, wider. Soon the map will be - like  Jorge Luis Borges' map -  even bigger than the territory it covers. And, unlike most computer games, the closer we get the easier it gets. Well, that's how it feels at the moment. Tomorrow may bring desolation and sorrow, but not if we can keep on the same course.

So what's the goal?

A little background first. There are many mapping apps out there. Some are more accurate. Some are prettier. Some are faster. But they are still all maps. Things that get you from point A to B and other old-timey mappish things. Map apps are crap apps.

The goal is to take something like a 3D programming language and make cartography simply part of the language. Want people dancing in the streets? You can have it. Blue whales swimming up the Gulf stream? Good to go. Adventures on Route 66? Be my guest. Let your imagination go free.

At the same time, how about a dose of reality? Google maps shows that the distance Union Square in San Francisco to the Fairmont Hotel is just four blocks. What Google Maps does not show you is the 500 foot height difference between the two places. Ditto the Spanish Steps in Rome. Or the Peak to the Star Ferry in Hong Kong. From space the world may be flat, but we cyclists know it isn't that flat

The goal therefore
  • Make 3D terrain data insanely free, quick and easy to obtain
  • Build code examples that even dummies can understand
  • Go places nobody has been to
But what do these things mean?

There are dozens of 2D map overlays available - all following the Tile Map Service standard. All these overlays are available at no charge as long as you are not greedy and you know the tricks. We need to de-trickify access. We need to show: "Here are the URLs that work."

3D data is also available at no charge. But it's imprisoned up in all manner of unusual places and strange ways. We need to unlock this data. We need to put the data up on GitHub and say "Come 'n get it!"

And we need take a popular beginner code page - Three.js - and show that instead of standing on a PlaneGeometry object you could be standing on New Jersey.

So future posts will talk about the 2D data with eighteen or more levels of zoom that is available from dozens of sources.

The 3D data that covers the entire world - land and water - to a reasonable level of accuracy will be described. For the moment that is '30 seconds' data - which is about a data point vey kilometer.

Wherever there is better data, us it. Currently that mean everywhere on the globe where there is land there is a data point every ninety meters.

And in same places such locations on Europe and the US, it is possible to get down to '1 Second data or a data point every 30 meters.

And as always, the coding examples will all be on GitHub. [And always with some broken links and stuff that got out of date before it was finished. ;-]

And, as always, the code will be the code of the designer. If you understand what 'if' and 'for' and '=' can do in JavaScript then you are good to go. No maps needed...