Apr 21, 2008

GPS 記錄器、相簿、工具、節點編輯...

GPS應用廣泛,尤其整合了網路資源後能擴展的方向很多,本篇是一則實作測試文,為了偷懶不多作說明與修飾,若你有進一步的興趣請勤奮的點選連結,有很多DEMO可以把玩。

20080412阿里山出遊路線分享(I-gotU GT-100)

[旅程中2個大斷層,跟沒結尾的冏況,所以出現大橫貫與圖片辜兒等精采結局請勿受到驚嚇]
step 1. 安裝i-gotU Desktop
step 2. 將 *.mdb(Link) 放至 C:\Documents and Settings\******\Application Data\MobileAction\GPSTracer 取代 Tracer.mdb
step 3. 選取兩筆track→合併
---------- (分隔線)繼續下列步驟或匯出*.gpx(Link)使用其它軟體後製(edit、gpscoding、gpstagging…)---------
step 4. 於下方的"相簿"右鍵→新增圖片
step 5. 選取圖片右鍵→儲存GPS
step 6. 點選上片track 會重新載入Google Map(Ps. i-gotU Desktop圖片太多(大)可能會當)
step 7. 匯出html,gpx,kml…
clip_image002
(相關討論請參考:[Mobile01分享]i-gotU(GT-100)旅程紀錄i-gotU操作手冊)

Geocode aware

GPicSync
Automatically geocode pictures from your camera and a GPS track log.
Picasa:
Picasa is a software application for organizing and editing digital photos, Google began offering Picasa for free download.
Google Earth
Google Earth lets you fly anywhere on Earth to view satellite imagery, maps, terrain, 3D buildings and even explore galaxies in the Sky. You can explore rich geographical content, save your toured places and share with others.
Friendly.Flickr:
一個整合Flickr上下傳的編輯工具

Geotagging Albums

clip_image003

(Demo)

clip_image005clip_image007
clip_image009clip_image011
clip_image013

(DEMO)

clip_image015clip_image017
clip_image018

(DEMO)

上傳圖片前先注意有無允許自動匯入GPS資訊(否則就要手動調整囉)
You→Your Account→Privacy & Permissions→Import EXIF location data
clip_image020clip_image022
clip_image024
除了在photostream 頁面下方的KML(僅單頁)
Subscribe to parkghost's photostream – Latest | geoFeed | KML
也有第三方做的 http://kmlphotos.metaltoad.com/
clip_image026
點選clip_image027就會啟動Google Earth,紅點即是Flickr的圖片位址
clip_image029
clip_image030

(DEMO)

整體來說還有很大的進步空間…
clip_image032

整合Flickr與 Urmap與Google Map/Earth

(來源請參考:UrKML / UrGPX照片軌跡整合線上地圖的小工具)
匯出KMZ
clip_image034
Flickr with Google Earth
clip_image036
KML with Google Map(DEMO)
clip_image038
Flickr with Google Map(DEMO)
1: 5mi
clip_image040
1:2000ft
clip_image042
Flickr with Urmap(DEMO)
1:6.4km
clip_image044
1:200m
clip_image046

Editor

JOSM
File→Open→*.gpx
clip_image048
使用Google Map圖資
(Ps.基本上空照圖是要收費的,所以大部份OpenSource是沒有空照圖的)
clip_image050clip_image052
clip_image054clip_image056
左手邊垃圾桶按鈕→刪點
clip_image058
(隨便玩玩~呵) 繞圈圈
clip_image060clip_image062
Desktop Componet

swinglabs > swingx-ws > JXMapViewer

image

一些詞條 (Wikipedia)

GPS tracking
A GPS tracking unit is a device that uses the Global Positioning System to determine the precise location of a vehicle, person, or other asset to which it is attached and to record the position of the asset at regular intervals. The recorded location data can be stored within the tracking unit, or it may be transmitted to a central location data base, or internet-connected computer, using a cellular (GPRS), radio, or satellite modem embedded in the unit. This allows the asset's location to be displayed against a map backdrop either in real-time or when analysing the track later, using customized software. Such systems are not new; amateur radio operators have been operating their free GPS based nationwide realtime Automatic Position Reporting System since 1982.

Data loggers
A GPS logger simply logs the position of the device at regular intervals in its internal memory. Modern GPS loggers have either a memory card slot, or internal flash memory and a USB port. Some act as a USB flash drive. This allows downloading of the data for further analysis in a computer.

GPX
GPX, or GPS eXchange Format is an XML schema designed for transferring GPS data between software applications. It can be used to describe waypoints, tracks, and routes. The format is open and can be used without the need to pay licence fees.
Geotagging:
Geotagging, sometimes referred to as Geocoding, is the process of adding geographical identification metadata to various media such as websites, RSS feeds, or images and is a form of geospatial metadata. This data usually consists of latitude and longitude coordinates, though it can also include altitude, bearing, and place names.
Geocode:
Geocoding is the process of assigning geographic identifiers (e.g., codes or geographic coordinates expressed as latitude-longitude) to map features and other data records
Waypoint
Waypoints are sets of coordinates that identify a point in physical space. For the purposes of terrestrial navigation, these coordinates usually include longitude and latitude, and sometimes altitude (particularly for air navigation).

Track、Route
An ordered collection of points may be expressed as a track or a route. Conceptually, tracks are a record of where a person has been, routes are suggestions about where they might go in the future. So, for instance, there might be timestamps for each point in a track (because someone is recording where and when they were there), but timestamps for each point in a route are unlikely to be provided, because the author is suggesting it, and nobody might ever have travelled it.
KML
Keyhole Markup Language (KML) is an XML-based language schema for expressing geographic annotation and visualization on existing or future Web-based, two-dimensional maps and three-dimensional Earth browsers. KML was developed for use with Google Earth, which was originally named Keyhole Earth Viewer. It was created by Keyhole, Inc, which was acquired by Google in 2004. The name "Keyhole" is an homage to the KH reconnaissance satellites, the original eye-in-the-sky military reconnaissance system first launched in 1976.

KMZ
KML files are very often distributed as KMZ files, which are zipped KML files with a .kmz extension

Mar 28, 2008

自動分割大型檔案備份至GMail

前陣子還有一台Lab的備份主機可以放系統備份,可惜在當兵期間系統就蒙主恩招,現在沒有異地備份總有一種不踏實的感覺,要定期下載備份存檔總會忘記,好在網路上也有許多免費空間可以利用,尤其是GMail這樣好用又大碗的選擇不好好利用實在是太浪費了 :P

1.申請GMail

2.安裝軟體(Postfix、Mutt、Rar)
選擇Rar的原因是只用Tar加split哪怕是傳輸中+-1Byte,就完了,rar有的加入還原資訊的選項,比較保險!!!。
Ps.執行rar指令若出現下行訊息
rar: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.4' not found (required by rar)
表示需要GLIBC_2.4。如果沒有GLIBC_2.4可以使用rar_static
cp rar_static /usr/local/bin/rar

3.Script
#!/bin/bash
#backup to local and mail
#Author: Brandon Chen
#Email: parkghost@gmail.com

src_path=/var/www/html
dst_path=/var/www/alumni/backup/

bak_file="alumni"`date +%Y%m%d%H%M`
bak_data_recovery=15%
bak_split_size=19m
bak_mail_to=*****@gmail.com

db_user=*****
db_name=*****
db_password=*****

if ! test -d $dst_path"/mail"
then
mkdir -p $dst_path"/mail"
fi

cd $dst_path
mysqldump -u$db_user -p$db_password $db_name > $bak_file".sql"
tar --exclude .svn -zcf $bak_file".tar.gz" $src_path

cd mail
rm -rf * #remove old files
rar a -rr$bak_data_recovery -m5 -v$bak_split_size $bak_file".rar" ../$bak_file".tar.gz" > /dev/null
rar a -rr$bak_data_recovery -m5 $bak_file".sql.rar" ../$bak_file".sql" > /dev/null

for name in `ls`
do
mutt -s $bak_file -a $name $bak_mail_to < /dev/null
done

4.修改Postfix的最大寄送郵件大小
[root@alumni ~]# vi /etc/postfix/main.cf
message_size_limit = 40960000 #增加此行

5.加入系統排程
[root@alumni ~]# crontab -e
0 0 15,30 * * /var/www/alumni/scripts/backup.sh

Feb 1, 2008

PHP 的新世代

曾幾何時PHP走入了開發的社群,走進企業的青睞,漸漸其它語言的框架也移植到了PHP,
講究MVC趨勢,PHP也有Template Engine(SmartyFastTemplate...),在講究快速開發的,
PHP的類RoR框架如同雨後春筍一個一個出現,早之前在新興的PHP Framework中評選了Cakephp當作開發框架,
雖然Scaffolding與Bake雛型令人驚艷,可惜早在1.03的版本時,Cake仍缺少許多基礎功能需求(I18n)
與不夠完整(Form validate),穩定性也不夠(@@花了不少時間找Bug),
近期1.2版補足不少功能,BehaviorsAuthenticationSecurity還滿實用的,
社群持續激蕩出新的Idea令人激賞,只是核心部份總看不到下一步的發展(連1.2文件也要藏起來....暈)。

觀看Zend Framework之整體優了不少:
  • 架構彈性(不像Cakephp限定流程)
  • 開發穩定(有穩定的班底、開發週期)
  • 社群層面較廣(廠商、開發人員)
  • 官方支持(IDE、前端Cache)
  • 文件完整(除了core的,還有proposal可以參考)

Zend Framework 1.5.0 Preview Release now available

http://devzone.zend.com/article/3020-Zend-Framework-1.5.0-Preview-Release-now-available
還是沒有看到Zend_Build還是停留在New Proposals

 

Zend Framework

http://framework.zend.com/whyzf/future/


Lifting the Skirt on Zend Framework 1.5 - Zend_Form

http://devzone.zend.com/article/3030-Lifting-the-Skirt-on-Zend-Framework-1.5---Zend_Form

用設定檔來做表單似乎還不錯,看來未來整合Zend_Build會更強大

 

Content Indexing with Zend_Search_Lucene

http://www.slideshare.net/shahar/content-indexing-with-zendsearchlucene/
目前看到最好的例子

Jan 30, 2008

平平都是Google Map,還是差很多....

當初看到Google Map 空照圖橫空出現,現在Street View出來了,從平面多層擴到立體全面,這就像是搜尋後所出現的"o"越來越多,一個比一個精采,不難想像View變成Video,環境與技術遲早會突破。雖然仍只有部份地區有畫面,影像也不即時,縫合的部份不夠細膩,在台鄉民,還是只能說些酸話,努力忍住口水。

台灣的Map還在弄圖資、加商店、補資訊,最最最基本的路途規畫也沒有...。

美國Google的新功能

 http://maps.google.com/support/bin/topic.py?topic=10779

Street View

http://maps.google.com/support/bin/topic.py?topic=11640

http://mashable.com/2007/05/31/top-15-google-street-view-sightings/

 StreetView

 

迎擊風雪 回家過年——谷歌緊急推出春運交通圖幫助出行

http://googlechinablog.com/2008/01/blog-post_30.html

 1-775256

台灣 Google 地圖導覽 ←還停留在 簡單好操作冏!!!

http://www.google.com.tw/intl/zh-TW_tw/help/maps/tour/

引用:

幾張 Google Street View 的「驚鴻一瞥」

Google Map新功能掀隱私權爭議 可採人臉偵測技術解爭端

Google Maps修改隱私政策 街景圖可刪人臉與車牌