View Single Post
Saturn's Avatar
Posts: 1,648 | Thanked: 2,122 times | Joined on Mar 2007 @ UNKLE's Never Never Land
#4
Here is also some code that could be plugged if someone want to use other services.

This one is for the www.opencellid.org. It doesn't seem to have a restriction but the DB is quite limited and the results are even worse.
Code:
wget -O geocoord2.tmp "http://www.opencellid.org/cell/get?key=$KEY_OPENCELLID&mnc=$MNC&mcc=$MCC&lac=$LAC&cellid=$CELLID" 1>/dev/null 2>&1;
LATb=`grep lat geocoord2.tmp | cut -f 6 -d " " | cut -f 2 -d "\""`;
LONb=`grep lon geocoord2.tmp | cut -f 9 -d " " | cut -f 2 -d "\""`;
echo "Geocoordinates  : LAT=$LATb; LON=$LONb";
This one is for the https://labs.ericsson.com/apis/mobile-location/
The database is quite good but also has a trial period of 1000 requests.
Code:
wget -O geocoord3.tmp "http://cellid.labs.ericsson.net/xml/lookup?cellid=$CELLID&mnc=$MNC&mcc=$MCC&lac=$LAC&base=10&key=$KEY_ERICSSON" 1>/dev/null 2>&1;
LATc=`grep lat geocoord3.tmp | cut -f 6 -d \< | cut -f 2 -d \>`;
LONc=`grep lon geocoord3.tmp | cut -f 8 -d \< | cut -f 2 -d \>`;
echo "Geocoordinates  : LAT=$LATc; LON=$LONc";
If anyone has found a good one which is not a trial please let us know.
There is also a hidden google API for cellids but didn't tried it yet.

Hope it's usefull.
 

The Following 3 Users Say Thank You to Saturn For This Useful Post: