Migrating from Bzr to Git (Single branch)

We migrated the ChaloBEST Repository from bzr to git. While migration is not a rocket science any more and there are a lot of blogs and threads about this. This post is a simple step as how to and also as self note.

Step 1. Branch out your bzr repo.

<code> $ bzr branch "url to your bzr repo"</code>

Step 2.cd into your new branch and do the following

<code> $ git init </code>
<code> $ git remote add origin "url to git report" </code>
<code> $ bzr fast-export `something`|git fast-import</code>

Step 3. In case your original git repo is not empty, please do a

<code> $ git pull </code>

Step 4.  Now do a

<code>$ git reset --hard  HEAD</code>

Step 5. Now commit the changes using

<code> $git commit -m "some message"</code>

Step 6.  Push the changes

<code> $git push </code>

Here are some links that helps out with migrating both branches and master.

API parsing with Backbone.js

The next part of the self note series, this time I have to parse JSON using backbone.js.
So in order to parse an API that returns result in JSON you can do the following(not necessarily the best way but it works for me)

(function($) {
var API_BASE = 'your url here';

var parser = Backbone.Model.extend({});

var apiColl = Backbone.Collection.extend({
model: parser,
url: 'form your url here'

var apiView = Backbone.View.extend({
el: $('#collection'),
initialize: function() {
_.bindAll(this, "render");
this.collection.bind("all", this.count);

render: function() {
$(this.el).html(this.counter = this.collection.length);
return this;

events = new apiColl(),
eventView = new apiView({

collection: events

success: function() {

and yes, my ultimate target will be to parse the API and integrate with some open maps.

Even though Backbone’s code is pretty well explained, the main help if stuck comes from stack overflow. So really appreciate the help that I got.

Ouch! My Bad

JavaScript is powerful and Backbone.js is a nice small utility that makes it even more powerful. I was playing with Backbone and Open layers thrown over a Django system.
However there is something weird that I faced and took a good amount of my time to figure out the problem.
This blog post is kind of self note so that I notice this the first place when I face such problem again.

What was I trying to do : Write a small backbone code to display Open layers(OSM) Map.
How was I trying to do :

(function($) {
var Map = Backbone.Model.extend({});

var MapView = Backbone.View.extend({

initialize: function() {
_.bindAll(this, 'initMap');

initMap: function() {
// Initialize Basic Openlayers;
var center = new OpenLayers.LonLat(8110203.9998955, 2170000.4068373);
map = new OpenLayers.Map(this.el, {
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326")
var layers = [];
layers[0] = new OpenLayers.Layer.OSM(); //some more layer will go here
map.setCenter(center, 12);

var map_view = new MapView({ el: $("#mapCol") });

The problem faced here was I am trying to access the DOM element even before it is ready.
Result : A webpage which shows the HTML elements, shows some access to Openlayers but no map.

Solution : I modified my code to this

(function($) {
var Map = Backbone.Model.extend({});

var MapView = Backbone.View.extend({
el: '#mapCol',

initialize: function() {
_.bindAll(this, 'initMap');


initMap: function() {
// Initialize Basic Openlayers;
var center = new OpenLayers.LonLat(8110203.9998955, 2170000.4068373);
//alert("you are here");
map = new OpenLayers.Map(this.el, {
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326")

var layers = [];
layers[0] = new OpenLayers.Layer.OSM(); //some more layer will go here
map.setCenter(center, 12);

$(function() {
var map_view = new MapView();


Here mapCol is the div element where I want my Openlayers map to be displayed. For more details on Backbone and el, there is a beautiful blog post here.

P.S : There may be certain errors in the codes above. please feel free to correct me anytime.

Post Ranathambore et.al.

My last post was on my first wildlife trip to Ranathambhore. Well it was an amazing trip, I did so many things that I never imagined to have done before.

Nevertheless I got hooked to wildlife photography, even leaving the photography part aside it is pretty amazing to watch wildlife at their best(in the wild).

I came back from Ranathambhore on 4th of April but I was so hooked to the whole thing going around me,I joined the same group again on a trip to Corbett national park(16th to 21st April 2011).

What I felt, the way I reacted been there remains treasure in my memory and there is no way I can explain that in a blog post. for that you have to be in Corbett.

Took some snaps which goes here :

My current action item is to create my own gear consisting 550D, Sigma 150 – 500 OS and a telephoto mic.

P.S : I manage to get GPS traces of about 700KM (in the jungle plus some rail track) in these two trips. Hope these goes to OSM soon.e

GSOC 2011/OpenStreetMap/Projects

Like every year this years mentoring organizations for Google Summer of Code 2011 has been announced and OpenStreetMap is in this years list as well.

Now as a lot of cheap phones has the capability to click pictures in high resolution,make GPS traces,shoot videos and have a internet connection via WIFI/GPRS or mobile broadband connection. I would really love to see a mobile based OSM mapping application that can utilize this facility and able to do photo tag/Video tag with GPS traces,upload to OSM/Flickr/Youtube, create and edit basic maps.

The idea by Zhijie Shen is here. So in case if you are interested in developing such an application do get in touch with the OSM community.

Apart from this you can find a lot of interesting project ideas here.

Student application for GSOC 2011 starts from March 29th.

Mapping party@ Durgapur and neighboring places (16th and 17th Oct 2009)

There has been a discussion between Indranil Das Gupta and us regarding the problem we face due to lack of GPS devices and some more mapping parties in Durgapur area.

On 16th and 17th we decided  to map  Durgapur and neighboring places. Primarily Kushal wanted to map his village and we decided to help him to map his village Ukhra and also map Durgapur . IOTA resource center at WBSU(Barasat) extended us a  helping hand by lending us three Garmin Etrex Vista H. So with the new gps’s in our hand we now had a total of 5 GPS.

On 16-OCT-2009 :We went to Ukhra on 16th to map the village.Me,Arindam,Kushal and another guy from that village joined the party. Since we had two bikes and the village was small.We completed all major roads and even some narrowest living streets within  an hour.

Here is how Ukhra looks like now as compared a complete blank previously.

On 17th Oct 2009 : A resource person from WBSU was suppose to come during the event but he didn’t make it though .So We started around 1 Pm. I was a little late but Arindam,Harsh,Sonu,Ratnadeep and Bama started.



Ratnadeep and Bama became the local team.They mapped Fuljhore (where they live) along with neighboring areas.While the rest of the team went on cycling covering edges of Bidhanagar area.



I met them in Muchipara and on my way I mapped some of the important point of interest.

IMG_0728 2

I had the etrex H GPS devices, so distributed them and we split into individual teams.

IMG_0730 2

I had a Moped while rest were in cycles.I tried and mapped some far away place like PCBL,Durgapur Bazaar etc. Arindam and rest took charge of mapping the area with details. Sonu knew the place very well and helped us a lot with that.My GPS clocked 34.4 KM after more than an hour of mapping. Our meeting point was BCET gate.

IMG_0736 2

We met and decided to head over for some food as day long traveling was taking toll on us. We accumulated the total distance covered which was something around 100KM’s. Bama requested us to take a GPS to map his city in Bankura so we lent one of ours. So some good  amount of data was accumulated  during the session. Since it was a festival day we decided not to do a editing session and it was dark already. Me and Arindam took care of the edits which will keeping pouring  during the weekends.

Here’s some of what has been done.

Durgapur before edits :


And here is durgapur after basic edits of 17102009 data


Here are some pics of Edit in progress.


Another Edit in Progress screenshot:


There will be a follow up post soon as edits are done.

Mapping party in Kolkata_Aug 2009

On August 9th,2009(Sunday) we are having a mini mapping party in Sontoshpur/Jadavpur area of Kolkata.Its a 8hr mapping spree with socializing afterward.

Check http://wiki.openstreetmap.org/wiki/Kolkata_Mini_Mapping_Party_August_2009

So If you are in Kolkata at that time and have interest in OSM, Please do join the party

Random Scriblings

Tommorow I will be going to Jamshedpur(India) to attend my brother’s wedding, Since Jamshedpur has almost no data for openstreetmap . I am taking  my GPS with me. Hope to do some traces.

On the other news :

1 ) openstreetmap.org home is now available in 4 languages : German, French,Icelandic ,Slovanian and some partial spanish .

Thanks to london hack weekend .Many more have started working on their native languages. However  no Indian languages support till now.

2) JOSM has a good amount of foreign language support, Me and Meejan has started to work on the bengali interface and some work has been done.

3) Potlatch and Openstreetmap wiki translation is also ongoing

If you are interested in seeing Indian languages in these tools , We would be happy to accept your help .Visit here for more details.

4) Arun Ganesh and H.S Rai will be representing OpenStreetMap India in upcoming State of the map 2009 to be  held in Amsterdam(Netherlands) from July.

5) Now osm.org routes to openstreetmap.org as well

Random Scriblings

Theres quite lot to  say :

1. Gave one more talk on OSM at mukti 09

2. Visited Kolkata Book Fair and help folks at IOTA stall .It was awesome .Detailed blog coming up

3. Fedora talk at mukti 09 on 6th .Event page up (need suggestions)

4.Visited bijra today and had lot of feedback (complaints) from them .

5. Got a lit of petrol almost decades after recent price cut for RS 50.

6. Harman Baweja still cant act .

7. Sign of twitter becoming mainstream in India .Read here.

First Barcamp and Tweetup at Kolkata

At last kolkata got its way to barcamp and tweetup , Though situation of the city made its presence on the people attending the barcamp.

I reached barcamp venue at IITKGP EXT center at around 10:15 AM .The preparation were still going on , However people started coming only after 11 . However organiser decided to wait for a little long for some more people to come up .

At around 11:30 AM things started , Sessions were superb , the timeline can be found here .

I did a session named “fun with JOSM” in which i introduced OpenStreetMap and JOSM and it did  earned some attention .

Some of the interesting session were by Shwetank Dixit , Amitabh Choudhary,YuYu Din,etc .

At around 6Pm things packed up .

on the note : IIT KGP guys did a good organising on there part ,wifi were working ,and food was good .

The Barcamp twitter followup can be found under hashtag #bckol ,

And hey #bckol is a trend in twitter : see here .

After Barcamp we decided to had a tweetup , There was a little confusion over the place but we decided to move to Mani Square for the Tweetup .There were seven people ,@subhodip,@aritra_m ,@indradg,@imba ,@epandu ,@yuyudin and @tathagata .

The tweetup followup can be searched under hashtag #tweetupkol

Indradg wasnt a twitter user but after the tweetup he is :)

The tweetup was superb as we come to know many people and it was fun .

Group Photo

So , The barcamp has finally started in kolkata and its our turn to keep the momentum up .