Showing posts with label code. Show all posts
Showing posts with label code. Show all posts

Friday, July 01, 2011

Touristy spots of Istanbul

Coming across the World touristiness map and The Geotaggers' World Atlas by Eric Fischer online, I wondered Istanbul’s popularity map. While Eric Fischer’s map for Istanbul could give an idea about the popular spots, what it really provides is the mobility map of the photographers.

The different colors represent different modes of transportation: Black is walking (less than 7mph), Red is bicycling or equivalent speed (less than 19mph), Blue is motor vehicles on normal roads (less than 43mph); Green is freeways or rapid transit.

While world touristiness map provides the popularity info, the resolution is too low to check the popularity at the city level.

Inspired with both ideas I downloaded the locations of all 100K+ geotagged pictures taken around Istanbul at Flickr. Below is the heatmap produced with pictures since the beginning of 2010. While it would be faster to create small grids of the city and download only the number of pictures for each grid (like what "world touristiness map" did possibly), this would not be able to create a high precision map. Because of this, I tried to download all the picture coordinates.


It is no surprise that the most hot area is the historical part of the city and by Bosphorus. The spots on the sea are mostly on the route of ferry lines.


Knowing the city a bit, you could expect this result before trying to plot the pictures. But still if you do not know the city very well, it can teach you new spots close to the city to see like those small red dots at northern part.

Thursday, June 30, 2011

Turkey's earthquake density map

Last year, while checking GoogleMaps' API I used Kandilli Observatory and EarthQuake Research Institute's recent earthquakes data to plot on the map.

For some time I was thinking to implement a heatmap layer for Google Maps, but could not have a chance to do so. Coming across Patrick Wied's code for the same purpose, I tried to play with his code a bit. Remembering the old earthquake map, I used Patrick's code to create a earthquake density map for Turkey using the Kandilli's data.



Above is a snapshot for the produced map. Colors changing blue to red implies increasing earthquake magnitude or more earthquakes around that area. Click the image to see the active version of the map.

Wednesday, March 10, 2010

playing more with maps

Below is another google maps app using the latest Turkish earthquakes from Kandilli.


And here is a bigger version.



Update
Just read some about Google Maplets for such needs with a similar and sure better example.

Update, Jul '11
Just noticed that there is a website doing almost the same

Sunday, February 21, 2010

Having custom maps with labelled markers

I checked it first when I thought about having a map with some data/markers on that to provide some information. I checked Google Maps and Google Maps API for that and saw that it is really easy to have a map with markers on it but having some text on the markers is not in the standart API.

Here it is talking about having a LabeledMarker, with an extension from Mike Purvis. I took one of his examples and modified to have a basic mechanism to load a datafile and show it on the map. The original example was showing data from Google docs retrieved in JSON format. As I wanted to keep data locally in a format I know, I modified his example a bit to load data from a file provided as a parameter to the webpage.

Below is an example of that, with for the list of spots I might like to see. I just passed SpotsToSee as data file to the page.



Or, here it is shown with another data file showing some operators I've been working with.



Saturday, February 20, 2010

converting Cell ID to coordinates

You know you do not need to have a GPS capable phone in order to enjoy location based capabilities on mobile phones, thanks to Google. Since 2007, Google mobile maps can plot your location without need of GPS with some reasonable precision (sure it is using GPS if it is available). That's how, you can check your location and what is around using your mobile phone. Google is being able to find your location using its internal database of cellular antenna IDs and their locations. Google maps application on the mobile set can query this database as the it knows the ID of the cellular antenna it is talking to.

I'm not aware if that cellular tower to coordinate database is available to developers, but here basics are examplified with a code for Windows mobile platform. There are examples around in C# or PHP around, possibly based on the original reverse engineering work.

These examples are considered to work on the mobile terminal as you have the required data on the terminal. If you have access to the GSM network, you can get this data using MAP messages. Yes, you do not need Google's database if you have access to the GSM network as it means you're possibly the GSM operator's itself :)

Below is a PHP code, a mix of C# and PHP examples; letting you to query coordinates of a LAC/CID pair for any country/network. You can play with it or download the code. Though MCC/MNC is sent as parameters, it looks like the result does not depend on them. This is weird as LAC/CID pair is unique only within a certain GSM operator. I have to be making a mistake which I could not figure out :) Still, I used LAC/CID pairs for two different countries without MCC/MNC, and Google still could point the correct spot.



Related post: Drawing GSM cells on Google Maps