abidinamdar / gmapcatcher

Automatically exported from code.google.com/p/gmapcatcher
1 stars 0 forks source link

Off line searching #91

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What new or enhanced feature are you proposing?

It would be great to be able to search for locations or street names while
off line for the areas that are downloaded. Coordinates should be
searchable even if no detailed map is available.

What goal would this enhancement help you achieve?

It would enable one to find a road in a city or a town when on the road
without an internet connection. 

Temporary solution for place names

I think this feature request is so needed it is hardly worth pointing out.
However, I managed to implement a temporary solution for my problem with my
Linux installation, which I thought I would share. It won't help with
street names but works nicely with most towns and major landmarks.

- I downloaded a relevant database from the US government site:
http://earth-info.nga.mil/gns/html/namefiles.htm  
  which contains world wide names and coordinates,

- I wrote a basic bash script to take a coordinate as its input, save the
result to a one line NMEA coordinate log and invoke gpsfake to read the
NMEA log.

e.g.:
#------------placefind------------------------
#!/bin/bash

echo "\$GPGLL,$1,N,$2,E,,A,*1D" > ~/tmp/placelocation.tmp
gpsfake -c 0.5 ~/tmp/placelocation.tmp
#--------------------------------------

Note I hard coded North and East. I couldn't be bothered to do this
properly as I will only need North and East coords...  For the USA you just
need to change the E to a W or script could be written to calculate them
from the decimal coordinates.

- I then wrote another bash script to search for a place name and return
the coordinate and name of the place and added the option for it to invoke
my first bash script to process its first result:

#--------------placeshow--------------------------
#!/bin/bash

if [ "$2" == s ]; then
   placeshow `grep "$1" ~/.googlemaps/places/in.txt | cut -f6,7,24 | cut
-c1-4,7-11,14-100 | expand`
else
   grep "$1" ~/.googlemaps/places/in.txt | cut -f6,7,24 | cut
-c1-4,7-11,14-100 | expand
fi

#-----------------------------------------

where in.txt is the database - India in this example.

- I stick the bash scripts in my path, and to search for Delhi as an example:

$ placefind Delhi
2835    7711    Delhi Safdar-Jung
2841    7712    Delhi Sabzimandi
2845    7715    Union Territory of Delhi
2840    7712    Delhi Kishangunj
2840    7713    Old Delhi
2836    7712    New Delhi
2840    7713    Delhi
2842    7713    Delhi Ridge
2840    7711    Delhi Sarāi Rohilla
2840    7711    Delhi Serai Rohilla
2848    7702    Bawana Delhi
2836    7708    Delhi Cantonment
2845    7715    Delhi
2845    7715    National Capital Territory of Delhi
2845    7715    State of Delhi
2837    7713    Delhi Paharganj

Note, the last two diggits of a number are minutes and the remaining digits
to the left are degrees.

- I want to know where New Delhi is so this time I enter:

$ placefind "New Delhi" s

where s stands for show, and invokes my first bash script that invokes gpsfake

- I then open GMapCatcher. If the GPS marker is on it takes me to New Delhi.

Let me know if you have any better ideas how to do this. Do you know any
other data bases that are free? I'm sorry if the Bash is very crude. I had
to look it up specifically to solve this problem so am no expert.

Chris

Original issue reported on code.google.com by cjre...@gmail.com on 6 Oct 2009 at 9:29

GoogleCodeExporter commented 8 years ago
I just noticed a bug that would require my "placeshow" sript to be modified if 
the
angle goes over 99 degrees: the numbers -c1-4,7-11,14 would have to be 
modified. I
guess this is another reason to calculate the coords from the decimal. Or does 
anyone
know how else I can drop the 0's or insert a '.' in a grep result that looks 
like:
283600  771200  New Delhi?

Original comment by cjre...@gmail.com on 6 Oct 2009 at 10:02

GoogleCodeExporter commented 8 years ago
This will be a very very nice feature!

Another database could be OpenStreetMaps:
http://wiki.openstreetmap.org/wiki/POI

Original comment by heldersepu on 7 Oct 2009 at 1:23

GoogleCodeExporter commented 8 years ago

Original comment by heldersepu on 14 Oct 2009 at 12:50

GoogleCodeExporter commented 8 years ago
TomTom POI by country, GPX POI by country:

http://downloads.cloudmade.com/

Original comment by heldersepu on 20 Oct 2009 at 4:30

GoogleCodeExporter commented 8 years ago

Original comment by heldersepu on 28 Oct 2009 at 1:15

GoogleCodeExporter commented 8 years ago
Well done, if the milestone means you've got a plan about how to do it.

Original comment by cjre...@gmail.com on 28 Oct 2009 at 1:55

GoogleCodeExporter commented 8 years ago
Yes I sort of have an idea/plan, looking in CloudMade I noticed that the POI in 
the GPX 
format should be fairly easy to search, sample attached:
http://downloads.cloudmade.com/north_america/cuba#breadcrumbs

...but I got distracted with the maps, I'm now busy adding more and more map 
providers.

Original comment by heldersepu on 28 Oct 2009 at 2:26

Attachments:

GoogleCodeExporter commented 8 years ago
I was looking at the logic of your bash script and you could also add markers 
Just add a couple of markers using the interface and then take a look at the 
file:
~/.googlemaps/markers

Original comment by heldersepu on 28 Oct 2009 at 2:38

GoogleCodeExporter commented 8 years ago
I replied by email, but I don't think it worked:

That's a good idea. My bash script has advanced a bit since I posted it, but it 
might
be nice to add markers automatically. My main think I have been trying to fix 
though
is that I have to restart gmapcatcher each time I restart gpsd or gpsfake. I 
expect
there must be a way around this?

As to CoudMade file, yes it looks easy enough to decipher. What about street 
names? I
didn't get very far with the binary files you posted earlier. I'm off to India
tomorrow so I'm not sure when I'll be online again next. Good luck! C 

Original comment by cjre...@gmail.com on 28 Oct 2009 at 10:03

GoogleCodeExporter commented 8 years ago
Sorry but I did not get your email... try again my email is 
heldersepu(at)gmail.com

I added a new issue to incorporate your suggestion, see Issue 98.

Original comment by heldersepu on 29 Oct 2009 at 2:08

GoogleCodeExporter commented 8 years ago

Original comment by heldersepu on 22 Nov 2009 at 2:24

GoogleCodeExporter commented 8 years ago

Original comment by heldersepu on 8 Dec 2009 at 3:18

GoogleCodeExporter commented 8 years ago

Original comment by heldersepu on 17 Apr 2010 at 2:06

GoogleCodeExporter commented 8 years ago
is there any script that will invoke gmapcatcher when we click the link or 
button

Original comment by renjuren...@gmail.com on 16 Dec 2010 at 6:19

GoogleCodeExporter commented 8 years ago
Issue 317 has been merged into this issue.

Original comment by heldersepu on 24 Apr 2012 at 12:28

GoogleCodeExporter commented 8 years ago

Original comment by heldersepu on 29 Sep 2012 at 12:11