|
|
|
|
|
|
BMW Garage | BMW Meets | Register | Today's Posts | Search |
|
BMW 3-Series (E90 E92) Forum
>
Add Whole Foods Market and Costco to your POI
|
|
03-24-2007, 11:17 PM | #1 |
Second Lieutenant
23
Rep 244
Posts |
Add Whole Foods Market and Costco to your POI
I now added all the Whole Foods Market in North America, which is 186 and Costco to my POI.
Before I upgrade to new Progman 25, I guess this will save me some time to search these two favorite locations. (I also added all the Korean Restaurants in SD and Orange County area and yes the letters shown on screen are Korean meaning 'Korean restaurant.' I made it up on Photoshop and writing letters using the mouse was friggin hard and not pretty. ) Anyway, it was fun. BTW, I didn't use the Perl script that was posted in the previous threads here, but I wrote my own codes in Matlab. I made it to include all the phone number so I can actually place a call to any NEW location with Bluetooth. :rocks:
__________________
330i-NAV-Premium
|
03-25-2007, 02:05 AM | #2 |
Private First Class
8
Rep 188
Posts |
|
Appreciate
0
|
03-25-2007, 02:42 AM | #3 |
Second Lieutenant
23
Rep 244
Posts |
I can send you the codes if you're interested.
__________________
330i-NAV-Premium
|
Appreciate
0
|
03-25-2007, 01:22 PM | #4 |
New Member
0
Rep 17
Posts |
|
Appreciate
0
|
03-25-2007, 03:44 PM | #6 |
Private First Class
8
Rep 188
Posts |
|
Appreciate
0
|
03-25-2007, 04:04 PM | #7 |
Chief Warrant Officer 4
53
Rep 726
Posts
Drives: 335I, E46 M3, X5M
Join Date: Feb 2007
Location: Back in the US
|
I too would love to learn this. Where did you get the locations list?
|
Appreciate
0
|
03-26-2007, 01:09 PM | #8 |
Second Lieutenant
23
Rep 244
Posts |
The input file to make idx and url must
1) have one line of header 2) be tab delimited 3) have columns in orders like :1_Address 2_City 3_State 4_ZIP 5_Name 6_Phone 7_lat 8_long After idx and url created 1) Change the numbers on the first lines of each file: ex) SF_####.HTM 2) Change file names of idx and url accordingly. ex) 0223.idx & 0224.URL This code is confirmed working only on Windows, small endian system. In order to run this on Mac or other big endian system, you may need to modifiy it a little. No big deal, though.. Code:
[FileName,PathName] = uigetfile('*.txt','Select the tab-delimited txt-file'); fid = fopen(fullfile(PathName,FileName),'r','b'); C_unsort = textscan(fid,'%s %s %s %s %s %s %11.6f %11.6f','headerlines',1,'delimiter','\t');fclose(fid); % 1_Address 2_City 3_State 4_ZIP 5_Name 6_Phone 7_bg_lat 8_bg_long num_field = length(C_unsort{1}); idx_name = 35; Lat = C_unsort{end-1}.*2^29/45; Lon = C_unsort{end}.*2^29/45; [lon,ILon]=sort(Lon); % sort ascending order in longitude lat = Lat(ILon); C{1}=C_unsort{1}(ILon); C{2}=C_unsort{2}(ILon); C{3}=C_unsort{3}(ILon); C{4}=C_unsort{4}(ILon); C{5}=C_unsort{5}(ILon); C{6}=C_unsort{6}(ILon); cd(PathName) %%%%%%%%%%%%%%%%%%%%% Write idx [idx_file,idx_path]=uiputfile(sprintf('%s_2007.idx',FileName(1:end-4)),'Save idx file'); fidx = fopen(fullfile(idx_path,idx_file),'w','b'); fwrite(fidx,'Glambda- CATIDX-ENG/SF_30003.HTM__','char'); fwrite(fidx,13,'int8'); fwrite(fidx,10,'int8','ieee-be'); % return fwrite(fidx,sprintf('ID:I:%d|POS:P:8|NAME:S:%d|IMPORTANCE:S:1|_:S:1',length(num2str(num_field)),idx_name),'char'); fwrite(fidx,13,'int8'); fwrite(fidx,10,'int8','ieee-be'); % return for i = 1:num_field % write a binary table table_gap = 20; if i==1 fwrite(fidx,[i-1 round(lon(i))],'int32'); if num_field>table_gap,fwrite(fidx,124,'int8');end elseif mod(i,table_gap)==0 fwrite(fidx,[i-1 round(lon(i))],'int32'); if (num_field-i)>=table_gap fwrite(fidx,124,'int8'); % write | after each [number Longitude] else continue end end end fwrite(fidx,0,'int8'); fwrite(fidx,13,'int8'); fwrite(fidx,10,'int8','ieee-be'); % line feed serial = num2str([0:num_field-1]'); POIname = C{5}(:); for j = 1:num_field fwrite(fidx,serial(j,:),'char'); fwrite(fidx,[round(lon(j)) round(lat(j))],'int32'); POI_num = double(POIname{j}); nul_char = zeros(1,idx_name); if length(POI_num) <= idx_name nul_char(1:length(POI_num)) = POI_num; else nul_char = POI_num(1:idx_name); end fwrite(fidx,nul_char,'int8'); fwrite(fidx,double('L'),'int8','b'); % IMPORTANCE fwrite(fidx,double('_'),'int8'); fwrite(fidx,13,'int8'); fwrite(fidx,10,'int8','ieee-be'); % return clear nul_char end fclose(fidx); %%%%%%%%%%%%%%%%%%%%% Write url [url_file,url_path]=uiputfile(sprintf('%s_2007.URL',FileName(1:end-4)),'Save url file'); furl = fopen(fullfile(url_path,url_file),'w','b'); vil_len = 10; city_len= 29; name_len = 35; str_len = 35; house_len = 5; ph_len = 12; postal_len = 5; country_len = 0; brand_len = 0; S_len = 1; fwrite(furl,'CATURL-ENG/SF_30003.HTM_','char'); fwrite(fidx,13,'int8'); fwrite(furl,10,'int8','ieee-be'); % return fwrite(furl, ... sprintf('POSWGS:S:21|VILLAGE:S:%d|CITY:S:%d|NAME:S:%d|STREET:S:%d|HOUSENUMBER:S:%d|PHONE:S:%d|POSTAL_CODE:S:%d|ENTP1:S:0|ENTP2:S:0|COUNTRY:S:%d|BRANDNAME:S:%d|_:S:%d' ... ,vil_len,city_len,name_len,str_len,house_len,ph_len,postal_len,country_len,brand_len,S_len),'char'); fwrite(fidx,13,'int8'); fwrite(furl,10,'int8','ieee-be'); % return for k = 1:num_field coord_url = [num2str(round(lon(k))) ',' num2str(round(lat(k)))]; while length(coord_url)<21,coord_url = [coord_url char(0)];end fwrite(furl,coord_url,'char'); village = char(zeros(1,vil_len)); fwrite(furl,village,'char'); city = C{2}{k}; state = C{3}{k}; city = strtrim(city); state = strtrim(state); % remove leading or trailing spaces (or use deblank) city = [city ', ' state]; % append the state name while length(city)<city_len,city = [city char(0)];end fwrite(furl,city,'char'); res_name = C{5}{k}; while length(res_name)<name_len,res_name = [res_name char(0)];end if res_name > name_len,res_name = res_name(1:name_len);end fwrite(furl,res_name,'char'); house_street = C{1}{k}; ind = regexp(house_street,' ','once'); % first space index separating number and street name street = house_street(ind+1:end); house = house_street(1:ind-1); while length(street)<str_len,street = [street char(0)];end while length(house)<house_len,house = [house char(0)];end fwrite(furl,street,'char'); fwrite(furl,house,'char'); phone_num = C{6}{k}; phone_num = strtrim(phone_num); if isempty(phone_num) fwrite(furl,char(zeros(1,ph_len)),'char'); else fwrite(furl,phone_num,'char'); end postalZIP_num = C{4}{k}; postalZIP_num = strtrim(postalZIP_num); if isempty(postalZIP_num) fwrite(furl,char(zeros(1,postal_len)),'char'); else fwrite(furl,postalZIP_num,'char'); end if country_len~=0 country = 'UNITED STATES'; while length(country)<country_len,country = [country char(0)];end fwrite(furl,country,'char'); end fwrite(furl,'_','char'); fwrite(fidx,13,'int8'); fwrite(furl,10,'int8','ieee-be'); % return end fclose(furl);
__________________
330i-NAV-Premium
Last edited by drfluid; 03-26-2007 at 03:38 PM.. |
Appreciate
0
|
03-26-2007, 01:13 PM | #9 |
Second Lieutenant
23
Rep 244
Posts |
My next goal is to write a code for appending POIs to existing ones.
The codes I wrote is to create a separate idx and url for independent listing shown on POIs menu on Nav screen. Since idx and url must be sorted in ascending order of Longitude, if you want to add POIs to existing ones, you'll have to re-calculate the Longitude and re-create the binary table written in each idx file.
__________________
330i-NAV-Premium
|
Appreciate
0
|
03-26-2007, 01:14 PM | #10 | |
Second Lieutenant
23
Rep 244
Posts |
Quote:
and from the webpage of each store.
__________________
330i-NAV-Premium
|
|
Appreciate
0
|
03-26-2007, 01:21 PM | #11 | |
Second Lieutenant
23
Rep 244
Posts |
Quote:
Only difference is the people in US are not as interested in this matter as the european people because the primary reason for doing this job was initiated by adding the speed camera locations to the POI. Obviously, there are not that many speed cameras in US. I created the red light camera locations onto my nav disc, but they are not that many either, although the number is increasing.
__________________
330i-NAV-Premium
|
|
Appreciate
0
|
03-26-2007, 02:46 PM | #12 |
Major General
571
Rep 7,519
Posts
Drives: 2009 E90 335i MT
Join Date: Mar 2006
Location: Vinton, Virginia
|
How about the Half Foods Market? I'm on a diet.
__________________
2009 E90 335i Montego Blue · Black Leather · Burl Walnut · 6MT · US Spec
SatNav • ZPP • ZCW • 6FL • TPMS • iDrive • PDC • HWS • Xenons • BMW Assist • Power Rear Sunshade • Logic 7 European Taillights • Rear Foglamp • OEM Alarm • PicoTray • DataToys XM-DVR • Multi-view Processor Quaife ATB LSD • Short Shift Knob • Hartge Anti-Roll Bars • AP Racing Front Brakes • 19" Style 269 |
Appreciate
0
|
03-26-2007, 03:19 PM | #13 |
Second Lieutenant
23
Rep 244
Posts |
I'll divide the coordinates (Long/Lat) of the whole foods market by 2 for you.
__________________
330i-NAV-Premium
|
Appreciate
0
|
03-26-2007, 03:25 PM | #14 |
Lieutenant
13
Rep 429
Posts |
I might be missing something obvious here-- I see your code is to translate the data into a format usable in the iDrive SatNav-- but how did you actually LOAD those POI into the SatNav itself?
|
Appreciate
0
|
03-26-2007, 03:28 PM | #15 | |
Second Lieutenant
23
Rep 244
Posts |
Quote:
http://www.e90post.com/forums/showthread.php?t=6727
__________________
330i-NAV-Premium
|
|
Appreciate
0
|
05-10-2007, 09:45 AM | #19 |
Deny everything
219
Rep 11,378
Posts
Drives: 2006 330i; 2015 X6, S1000RR
Join Date: Apr 2006
Location: Beautiful MD
|
has anyone done the speed cam locations?
__________________
I need a drink |
Appreciate
0
|
05-10-2007, 09:52 AM | #20 |
Smiling politely
165
Rep 7,931
Posts |
How did I miss this post earlier? Props to drfluid. Nice work!
__________________
E90 330i Black Sapphire 6MT | 991.1 C4 Platinum Silver 7MT
|
Appreciate
0
|
09-02-2007, 11:26 AM | #21 |
THE Viv
184
Rep 4,743
Posts
Drives: 330i SE
Join Date: May 2005
Location: the North, UK
|
If anyone's interested, I've made a post about creating your own POIs, including using Google Maps to help you.
Have a look here, in the UK forum. However, the info about BMW ConnectedDrive & Google Maps currently only applies to Europe! All the best. Viv |
Appreciate
0
|
Bookmarks |
|
|