Download - group work
![Page 1: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/1.jpg)
เร่ิมแรกท ำกำรเกบ็พิกดั แลว้น ำค่ำพิกดัท่ีไดม้ำใส่ในตำรำง Excel
จำกนั้นให้ท ำกำร save > ตั้งช่ือและเลือกชนิดไฟลเ์ป็นแบบ CSV (Comma delimited)
![Page 2: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/2.jpg)
จำกนั้นเปิดโปรแกรม QGIS Desktop ข้ึนมำ จำกนั้นไปท่ี Add Delimited Text Layer เพื่อน ำเขำ้
ตำรำงให้อยูใ่นรูปของ shapefile
ให้เลือกไฟลค่์ำพิกดั แลว้เซตค่ำต่ำงๆ ให้ครบ รวมถึงค่ำพิกดั x ค่ำพิกดั y จำกนั้นกด OK
![Page 3: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/3.jpg)
ท ำกำรเลือกระบบพิกดัให้เป็นแบบ WGS 84/ UTM zone 47N แลว้กด OK
6. จะได้ชัน้ข้อมลูที่มีลกัษณะเป็น shapefile ดงัภาพ
![Page 4: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/4.jpg)
จำกนั้นคลิกขวำท่ีชั้นขอ้มูล > save as
เลือกท่ีเกบ็ตั้งช่ือ coffee บนัทึกในรูปแบบของ shapefile เลือกระบบพิกดัแบบ WGS 84/ zone 47N แลว้กด
OK
![Page 5: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/5.jpg)
จะไดช้ั้นขอ้มูลใหม่ข้ึนมำจำกนั้นให้เรำกด Remove ชั้นขอ้มูลท่ีน ำเขำ้จำกตำรำงไปไดเ้ลย
![Page 6: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/6.jpg)
กำรน ำเขำ้ขอ้มูล Shapefile ไวใ้น Database
1. เปิดโปรแกรม pgAdmin III ข้ึนมำ จำกนั้นให้สร้ำง Database ข้ึนมำใหม่ ตั้งช่ือ GIS_ONLINE
2. จำกนั้นคลิก active ท่ี Database ท่ีพึ่งสร้ำงข้ึนมำแลว้ไปท่ี SQL แลว้พิมพ ์ CREATE
EXTENSION POSTGIS;จำกนั้นคลิกท่ี play เสร็จแลว้จะข้ึนขอ้ควำม successfully
![Page 7: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/7.jpg)
3. ท ำกำรน ำเขำ้ชั้นขอ้มูล shapfile ไปท่ี รูปจิกซอว ์> PostGIS Shapefile and DBF loader2.1
4. คลิก Add file จำกนั้นเลือกชั้นขอ้มูลท่ีเรำตอ้งกำรเขำ้มำ แลว้กด Open
![Page 8: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/8.jpg)
5. คลิกท่ี Options แลว้ท ำกำรเปล่ียนเป็น TIS-620 เพื่อให้สำมำรถอ่ำนภำษำไทยได ้จำกนั้นกด OK
6. กด Import อีกครั้ ง จะไดข้อ้มูลท่ีเพิ่มเขำ้มำดงัภำพ
![Page 9: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/9.jpg)
7. ไปท่ี Database แลว้ท ำกำรกด Refresh เพื่อให้ขอ้มูลเขำ้มำอยูใ่น Table
8. ไปท่ี geoserver เพื่อท ำกำรสร้ำงชั้นขอ้มูลท่ีจดัเกบ็ Database ของเรำ คลิกท่ี Workspaces > Add New
workspaces
![Page 10: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/10.jpg)
9. ตั้งช่ือ workspaces แลว้กด submit
10. จำกนั้นไปท่ี Stores > Add new stores
![Page 11: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/11.jpg)
11. คลิกเลือก PostGIS Database
12. จำกนั้นให้ท ำกำรเซตค่ำต่ำงๆให้ครบ แลว้กด save
![Page 12: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/12.jpg)
13. จะไดช้ั้นขอ้มูลท่ีเพิ่มเขำ้
ขั้นต่อไปให้เปิดโปรแกรม QGIS Desktop เพื่อน ำเขำ้ขอ้มูลจำก Database ไปท่ี Add PostGIS Layers
![Page 13: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/13.jpg)
ในหนำ้ต่ำงน้ีให้คลิกท่ี New เพื่อท ำกำรเช่ือมต่อกบั Database จำกนั้นเซตค่ำให้ตรงกบั Database ท่ีสร้ำงไว้
ตอนแรก จำกนั้นกด OK
จำกนั้นไปท่ี connect > GIS_ONLINE เลือกขอ้มูลแลว้กด Add
![Page 14: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/14.jpg)
จะมีหนำ้ต่ำงข้ึนมำให้ก ำหนดพิกดัของชั้นขอ้มูลให้ท ำกำรเลือกพิกดัแบบ WGS 84/ UTM zone 47N ให้ครบ
ทุกชั้นขอ้มูลจำกนั้นกด OK
ท ำกำรปรับตกแต่งสีและสญัลกัษณ์ให้เรียบร้อยจำกนั้น คลิกท่ี Style > Save Style > SLD File ท ำแบบน้ีกบั
ทุกชั้นขอ้มูล
![Page 15: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/15.jpg)
จำกนั้นเลือกท่ีเกบ็ ตั้งช่ือแลว้เลือกนำมสกลุแบบ .sld
ให้เรำกลบัไปท่ี geoserver อีกครั้ ง โดยไปท่ี Style > Add a new style
![Page 16: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/16.jpg)
ท ำกำรน ำเขำ้ไฟล ์sld ให้ครบทุกไฟลโ์ดยเร่ิมจำก boundary building road waterโดยไปท่ี เลือกไฟล ์คลิก
Upload > Previe Legend จำกนั้นกด Submit
เลือกไฟล ์coffee ท ำกำรเปล่ียนรูปแบบกำรแสดงผลขอ้มูลจำกจุดได ้โดยกำรดำวนโ์หลดภำพไอคอนมำ ให้
ไปท่ีเวบ็ไซต ์ https://www.iconfinder.com/ จำกนั้นคน้หำ caffee เลือกรูปแบบเป็น png แลว้ดำวนโ์หลด
![Page 17: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/17.jpg)
ขั้นต่อไปท ำกำรแกไ้ขโคด้ โดยพิมพโ์คด้ในบรรทดัท่ี 11-22 เป็น
<se:Graphic>
<se:ExternalGraphic>
<se:OnlineResource xlink:type="simple" xlink:href="file:/D:/56170233/ caffee.png"/>
(<se:Format>image/png</se:Format>
</se:ExternalGraphic>
<se:Size>15</se:Size>
</se:Graphic>
![Page 18: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/18.jpg)
เม่ือท ำกำรน ำเขำ้ไฟล ์sld ครบทุกไฟลแ์ลว้ให้ไปท่ี Layers > Add a new resource > เลือกจำกworkspaces
ของเรำ จำกนั้นคลิกท ำกำรเผยแพร่แผนท่ีโดยไปท่ี Publish
ไปท่ี Coordinate Reference Systems > Find เลือกระบบพิกดั 32647 > compute from native bounds
![Page 19: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/19.jpg)
ขั้นต่อไปคือไปท่ี แถบPublishing > Default Style เลือก boundary แถบ Available Style เลือก boundary ไป
ไวใ้นช่องทำงขวำ จำกนั้นกด save
จำกนั้นให้เรำท ำกำรเผยแพร่แผนท่ีให้กบัทุกชั้นขอ้มูล ซ่ึงจะแสดงไดโ้ดยไปท่ี Later Preview > เลือกชั้น
ขอ้มูลแลว้กด OpenLayers ซ่ึงจะมีลกัษณะดงัภำพ
![Page 20: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/20.jpg)
ขั้นต่อไปให้ไปท่ี C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\GIS3 สร้ำง
โฟลเดอร์เพื่อรองรับไฟล ์html , googlemap ตั้งช่ือว่ำ Online
จำกนั้นไปท่ี โปรแกรม Editplus ท ำกำรสร้ำงโคด้ html ดงัน้ี
![Page 21: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/21.jpg)
ท ำกำร save ไปท่ี File > Save as ไปท่ี D:\GIS_58 สร้ำงโฟลเดอร์ท่ีจะเกบ็งำน ตั้งช่ือว่ำ backup ให้เรำ save
ไวใ้นโฟลเดอร์ backup ตั้งช่ือว่ำ online เลือกเป็นนำมสกลุ html จำกนั้นกด OK
จำกนั้นกดเพิ่มเอกสำรมำหนำ้ใหม่แลว้ให้ท ำกำรใส่โคด้ googlemap ลงไป ท ำกำรแกไ้ขต ำแหน่งของ
localhost ใหต้รงกบั workspace ท่ีเรำสร้ำงใน geoserver อยำ่งเช่น
var bound = new OpenLayers.Layer.WMS("ขอบเขตม.บูรพำ",
"http://localhost:8080/geoserver/ GIS_ONLINE /wms",
{
layers: " GIS_ONLINE:boundary ",
และท ำกำรเพิ่มชั้นขอ้มูลดงัต่อไปน้ี คือ coffee road water
![Page 22: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/22.jpg)
ท ำกำร save ไปท่ี File > Save as ไปท่ี D:\GIS_58 \backup ให้เรำ save ไวใ้นโฟลเดอร์ backup ตั้งช่ือว่ำ
googlemap เลือกเป็นนำมสกลุ .js จำกนั้นกด OK
เม่ือเสร็จแลว้ไปไปท่ี D:\GIS_58 \backup ท ำกำร copy ไฟลท์ั้งสองท่ีมีอยู ่
![Page 23: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/23.jpg)
วำงไวใ้น C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\GIS3\Online
ขั้นต่อไปไปท่ี http://localhost:8080/GIS3/Online/online.html เพื่อท ำกำรแสดงแผนท่ีของเรำ
![Page 24: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/24.jpg)
กำรท ำ QGIS Cloud
- เขำ้ไปท่ีโปรแกรม QGIS Desktop
ท ำกำรเพิ่มชั้นขอ้มูลแบบเวคเตอร์เขำ้ ไปท่ี Add Vector Layer
เลือกขอ้มูลมำ 5 ชั้นขอ้มูลคือ boundary , building , road , water, coffee จำกนั้นกด OK
![Page 25: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/25.jpg)
เม่ือเลือกเสร็จแลว้ คลิก Open
ท ำกำรจดัเรียงชั้นขอ้มูล และปรับสีตกแต่งสญัลกัษณ์ให้ดูสวยงำม
![Page 26: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/26.jpg)
จำกนั้น ไปท่ีค ำสัง่ Cloud setting
ท ำกำร Login ให้เรียบร้อยแลว้ในแถบ Account กด create
![Page 27: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/27.jpg)
จำกนั้นเล่ือนมำท่ีแถบ Upload Data คลิก Upload data
ให้ท ำกำร Save ตั้งช่ือว่ำ online จำกนั้นกด Save
![Page 28: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/28.jpg)
จำกนั้นท ำกำรเผยแพร่ โดยไปท่ีแถบ Map คลิก Publish Map
จะไดล้ิ้งท่ีเรำสำรถเลือกเขำ้ดูได ้
![Page 29: group work](https://reader031.vdocuments.pub/reader031/viewer/2022021922/58aa86801a28ab2e448b5811/html5/thumbnails/29.jpg)
ล้ิงในกำรเขำ้ดูแผนท่ี
Webmap http://qgiscloud.com/56170233/online
Mobilemap http://m.qgiscloud.com/56170233/online
Public WMS http://wms.qgiscloud.com/56170233/online
Map Admin http://qgiscloud.com/maps
Support mailto:[email protected]?subject=QGISCloud support
ท ำกำรเขำ้ไปท่ีเวบ็ http://qgiscloud.com/56170233/online แสดงผลดงัภำพ