<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Bannk Bank on Medium]]></title>
        <description><![CDATA[Stories by Bannk Bank on Medium]]></description>
        <link>https://medium.com/@bannkbank?source=rss-93f9652303f9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*YKWxsXkPXgKchzP6</url>
            <title>Stories by Bannk Bank on Medium</title>
            <link>https://medium.com/@bannkbank?source=rss-93f9652303f9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 07:01:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bannkbank/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[GIS Back-end Engineer #1]]></title>
            <link>https://medium.com/@bannkbank/gis-back-end-engineer-1-5049ce63e51?source=rss-93f9652303f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/5049ce63e51</guid>
            <category><![CDATA[gis]]></category>
            <category><![CDATA[vallaris-maps]]></category>
            <category><![CDATA[rain]]></category>
            <category><![CDATA[maps]]></category>
            <category><![CDATA[processing]]></category>
            <dc:creator><![CDATA[Bannk Bank]]></dc:creator>
            <pubDate>Thu, 21 Jul 2022 06:53:11 GMT</pubDate>
            <atom:updated>2022-07-21T07:16:31.958Z</atom:updated>
            <content:encoded><![CDATA[<p>GIS Back-end Engineer #1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CD0RiGRVNsLWPhCswXw0Qg.png" /><figcaption>Rain Maps</figcaption></figure><p>มาเริ่มต้นเป็น GIS Back-end Engineer กันเถอะ มาดูกันว่า พวกเขาทำอะไรกันบ้าง</p><p>ถ้าพูดถึงการทำงานสาย Back-end หลายคนก็คิดว่าต้องเขียน Code เยอะแน่เลย ถ้าย้อนไปเมื่อสักประมาณ 5–10 ปีก่อนก็อาจจะใช่ แต่ปัจจุบัน เรามีเครื่องมือมากมายที่ช่วยให้เราสามารทำงาน Back-end ได้อย่างง่าย โดยใช้เครื่องมือที่มีความเหมาะสม ถ้าเจาะลึกลงไปในงานด้านสาย GIS การทำงานด้านนี้ก็จะยิ่งเพิ่มความยากขึ้นไปอีก แต่ผมไปเจอเครื่องหนึ่งที่ ทำให้เราสามารถทำงาน GIS Back-end Engineer ได้อย่างง่ายและตอบโจทย์ใจนัก GIS แบบพวกเรา</p><p>เครื่องมือที่ผมใช้งานเครื่อง Vallaris Maps สามารถเข้าไปศึกษารายละเอียดก่อนใช้งานได้ที่ <a href="https://vallarismaps.com/home/">https://vallarismaps.com/home</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OvfVuPsYj9ayFF2nuBJvLg.png" /><figcaption>Vallaris Maps</figcaption></figure><p>ลองคิดดูนะ ว่าเราจะประมวลผลข้อมูลประมาณน้ำฝนราย 3 ชั่วโมง จากกรม อุตุนิยมวิทยา เราต้องทำอย่างไรบ้าง แต่ใน Vallaris Maps สามารถทำได้ง่ายเพียงไม่กี่ขั้นตอนดังนี้</p><ol><li>ขอข้ามขั้นตอนการสมัครใช้งานไปนะครับ ซึ่งมันง่ายเกินไปที่จะมาเขียนบอกว่าสมัครใช้งานยังไง มีแบบสมัครทดลองใช้งาน 30 วัน และสำหรับนักศึกษา ส่วนถ้าใครอยากใช้งานกันยาว ๆ ก็ต้องซื้อ licence ไปใช้งานกันนะครับ</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w_W8BwYfubcAsWv7FB2x_g.png" /><figcaption>สมัครใช้งาน</figcaption></figure><p>2. เราต้องสร้าง Collection Feature เปล่าโดยไม่ต้องเพิ่มข้อมูลเข้าไป สำหรับการจัดเก็บข้อมูลจากการเชื่อมต่อ API และจากการวิเคราะห์ข้อมูล Point IDW</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BB9ND8zvfrTftBXk559BVA.png" /><figcaption>Collection Feature</figcaption></figure><p>3. สร้าง Collection Vector Tiles สำหรับการจัดเก็บข้อมูล Vector Tiles จากการเชื่อมต่อ API และจากการวิเคราะห์ข้อมูล Point IDW (การทำ Tile ถ้าไม่มีข้อมูลข้อมูลใน Collection Feature จะมีการ Error ตรงนี้ไม่ต้องตกใจสร้างรอไว้ก่อนเลย)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wh3vs6Bq1Ix1cPU9k9BNlg.png" /><figcaption>Collection Vector Tiles</figcaption></figure><p>4. เขียน Pipeline สำหรับการ Process ข้อมูล</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*acUNyY6ZD7-yW4oGECkYdg.png" /><figcaption>Pineline Processing Data</figcaption></figure><p>5. ตั้งค่าการประมวลผลข้อมูลทุก ๆ 3 ชั่วโมง 20 นาที</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*42ypMyR0h13elzbwyYs0Rg.png" /></figure><p>6. ออกแบบ Style แผนที่เพื่อให้เห็นปริมาณของน้ำฝน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fxd4xNH7K0JleR2FqNRE7A.png" /><figcaption>Style Edit</figcaption></figure><p>7. service ที่ให้บริการในหน้า Style</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zsczGmlrPQuD2_vYiz6K3A.png" /><figcaption>service</figcaption></figure><p>8. สามารถดูตัวอย่าง Map Embed ได้ที่</p><p><a href="https://edu.vallarismaps.com/management/studio/embed/629488994ccd9e7e1b30e5db?api_key=P0f11dg4aoYBr77ODKdzmiziFmCdNfLiE2FFjLKMOkeHcC3ZiVQE4q3JoTyzcIOP&amp;q=103.31083422444704,13.104879113973269&amp;z=4.408100210193602&amp;p=0&amp;b=0"><em>https://edu.vallarismaps.com/management/studio/embed/629488994ccd9e7e1b30e5db?api_key=P0f11dg4aoYBr77ODKdzmiziFmCdNfLiE2FFjLKMOkeHcC3ZiVQE4q3JoTyzcIOP&amp;q=103.31083422444704,13.104879113973269&amp;z=4.408100210193602&amp;p=0&amp;b=0</em></a></p><p>บทความนี้ขอจบไว้เท่านี้ก่อน บทความถัดไปในเรื่อง GIS Back-end Engineer จะเขียนอธิบายในแต่ละส่วนว่ามีการตั้งค่าและใช้งานอย่างไร อย่าลืมมาติดตามกันได้นะ</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5049ce63e51" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GeoServer(2)]]></title>
            <link>https://medium.com/i-bitz-company-limited/geoserver-2-6f5cf7abc475?source=rss-93f9652303f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f5cf7abc475</guid>
            <category><![CDATA[rest]]></category>
            <category><![CDATA[geoserver]]></category>
            <category><![CDATA[rest-geoserver]]></category>
            <dc:creator><![CDATA[Bannk Bank]]></dc:creator>
            <pubDate>Fri, 20 Sep 2019 04:21:34 GMT</pubDate>
            <atom:updated>2019-09-30T10:12:42.100Z</atom:updated>
            <content:encoded><![CDATA[<h3>REST module GeoServer</h3><p>การใช้ REST module สำหรับการการจัดการชั้นข้อมูล โดยใช้คำสั่งผ่าน cURL</p><p>cURL คือ เครื่องมือที่ไม่มีหน้า Graphic User Interface ที่เอาไว้รับ/ส่งข้อมูลจาก Server ผ่านโปรโตคอลต่าง ๆ ได้เช่น FTP, HTTP, HTTPS ส่วนใหญ่แล้วก็เอาไว้ทดสอบ API ดู Request/Response</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*suAw_qxor_7GGpD6vxFggQ.png" /></figure><p>คำสั่งสร้าง workspaces</p><pre>curl -u admin:geoserver -v -XPOST -H “Content-type: text/xml” -d “&lt;workspace&gt;&lt;name&gt;data&lt;/name&gt;&lt;/workspace&gt;” <a href="http://eecweb.gistda.or.th:30801/geoserver/rest/workspaces">http://i-bitz/geoserver/rest/workspaces</a></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hYKUcbIX1KbKcFfwQlQY-w.png" /><figcaption>คำสั่ง cURL ที่ใช้ผ่าน terminal</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JOPENl8GrgXN3-K_zn118w.png" /><figcaption>Workspaces ใน GeoServer</figcaption></figure><p>คำสั่งไว้ดู Workspaces จะได้ไฟล์ในรูปแบบ xml.</p><pre>curl -u admin:geoserver -XGET -H “Accept: text/xml” <a href="http://eecweb.gistda.or.th:30801/geoserver/rest/workspaces/myworkspace.xml">http://i-bitz/geoserver/rest/workspaces/data.xml</a></pre><p>คำสั่งสร้าง Layer จากข้อมูล Shapefile</p><pre>curl -u admin:geoserver -H “Content-type: application/zip” -T LabGIS/point.zip <a href="http://eecweb.gistda.or.th:30801/geoserver/rest/workspaces/myworkspace/datastores/pointcc/file.shp">http://i-bitz/geoserver/rest/workspaces/data/datastores/pointcc/file.shp</a></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2_dVGKO9GFUg9wae3Q06AA.png" /><figcaption>Data Stores ข้อมูลใน GeoServer</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A7rC_YK0S5temrJP1CMhJQ.png" /><figcaption>Layer ใน GeoServer</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mvXOQ5AXNaJTjX5tvrCHFg.png" /><figcaption>แสดงผลผ่านฟังก์ชั่น OpenLayers ใน GeoServer</figcaption></figure><p>คำสั่งไว้ดู Layer ใน GeoServer</p><pre>curl -u admin:geoserver -XGET <a href="http://eecweb.gistda.or.th:30801/geoserver/rest/layers/myworkspace:cc.xml">http://i-bitz/geoserver/rest/layers/data:point.xml</a></pre><p>คำสั่งกำหนด Default Style</p><pre>curl -u admin:geoserver -XPUT -H &quot;Content-type: text/xml&quot; -d &quot;&lt;layer&gt;&lt;defaultStyle&gt;&lt;name&gt;landmark&lt;/name&gt;&lt;/defaultStyle&gt;&lt;enabled&gt;true&lt;/enabled&gt;&lt;/layer&gt;&quot; <a href="http://localhost:8083/geoserver/rest/layers/myworkspace:pointlands">http://i-bitz/geoserver/rest/layers/myworkspace:point</a></pre><p>ดูเพิ่มเติมได้ที่ :</p><ul><li><a href="https://geoserver.geo-solutions.it/edu/en/rest/using_rest.html">Using REST module - GeoServer Training</a></li><li><a href="https://docs.geoserver.org/latest/en/user/rest/stores.html">Stores - GeoServer 2.17.x User Manual</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f5cf7abc475" width="1" height="1" alt=""><hr><p><a href="https://medium.com/i-bitz-company-limited/geoserver-2-6f5cf7abc475">GeoServer(2)</a> was originally published in <a href="https://medium.com/i-bitz-company-limited">i-bitz Company Limited.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Line Notify Using Python]]></title>
            <link>https://medium.com/i-bitz-company-limited/line-notify-using-python-fb8fbfa0e299?source=rss-93f9652303f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb8fbfa0e299</guid>
            <category><![CDATA[line-notify]]></category>
            <category><![CDATA[using-python]]></category>
            <category><![CDATA[แจ้งเตือน]]></category>
            <category><![CDATA[line]]></category>
            <dc:creator><![CDATA[Bannk Bank]]></dc:creator>
            <pubDate>Wed, 13 Mar 2019 10:22:03 GMT</pubDate>
            <atom:updated>2019-03-13T10:22:03.558Z</atom:updated>
            <content:encoded><![CDATA[<h3>สำหรับการเขียนโปรแกรมภาษา Python เพื่อส่งข้อความแจ้งเตือน (Notify) ผ่านโปรแกรม LINE นั้นจะต้องใช้ไลบรารี่ของ requests</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3cczIEYDqZs5_X0rCdgF_w.png" /></figure><pre>pip install requests</pre><p>อ่านรายละเอียดเพิ่มเติม <a href="https://github.com/mrolarik/simple-iot/wiki/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%AA%E0%B9%88%E0%B8%87%E0%B8%82%E0%B9%89%E0%B8%AD%E0%B8%A1%E0%B8%B9%E0%B8%A5%E0%B8%A3%E0%B8%B0%E0%B8%AB%E0%B8%A7%E0%B9%88%E0%B8%B2%E0%B8%87-client-%E0%B9%81%E0%B8%A5%E0%B8%B0-server-%E0%B8%9C%E0%B9%88%E0%B8%B2%E0%B8%99-socket">การส่งข้อมูลระหว่าง client และ server ผ่าน socket</a></p><h3>การขอ token จาก LINE</h3><p>เข้าไปที่เว็บไซต์ <a href="https://notify-bot.line.me/">https://notify-bot.line.me</a> เพื่อเข้าไปขอ token ผมขอข้ามวิธีการขอ token ไปนะครับ</p><h3>คำสั่ง Python สำหรับการส่งข้อความแจ้งเตือน</h3><pre><strong>import</strong> requests<br>url = &#39;https://notify-api.line.me/api/notify&#39;</pre><pre>token = &#39;keys&#39;</pre><pre>headers = {&#39;content-type&#39;:&#39;application/x-www-form-urlencoded&#39;,&#39;Authorization&#39;:&#39;Bearer &#39;+token}</pre><pre>msg = &#39;Data TMD Ready&#39;</pre><pre>r = requests.post(url, headers=headers, data = {&#39;message&#39;:msg})</pre><pre>print r.text</pre><p>ผลลัพธ์ที่ได้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*u7kCBVE0A9ACN-Eu26j9Uw.png" /></figure><p>ไม่เกิดข้อผิดพลาดใด ๆ</p><pre>{“status”:200,”message”:”ok”}</pre><p>หาก token ผิดพลาด</p><pre>{“status”:401,”message”:”Invalid access token”}</pre><p>สามารถอ่านเพิ่มเติมได้ที่ : <a href="https://github.com/mrolarik/simple-iot/wiki/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%AA%E0%B9%88%E0%B8%87%E0%B8%82%E0%B9%89%E0%B8%AD%E0%B8%84%E0%B8%A7%E0%B8%B2%E0%B8%A1-Line-Notify-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2%E0%B8%A0%E0%B8%B2%E0%B8%A9%E0%B8%B2-Python">คลิก</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb8fbfa0e299" width="1" height="1" alt=""><hr><p><a href="https://medium.com/i-bitz-company-limited/line-notify-using-python-fb8fbfa0e299">Line Notify Using Python</a> was originally published in <a href="https://medium.com/i-bitz-company-limited">i-bitz Company Limited.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OpenLayer]]></title>
            <link>https://medium.com/i-bitz-company-limited/openlayer-43424410a9cc?source=rss-93f9652303f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/43424410a9cc</guid>
            <category><![CDATA[lo]]></category>
            <category><![CDATA[gis]]></category>
            <category><![CDATA[wms]]></category>
            <category><![CDATA[openlayers-3]]></category>
            <category><![CDATA[wmt]]></category>
            <dc:creator><![CDATA[Bannk Bank]]></dc:creator>
            <pubDate>Sun, 24 Feb 2019 12:46:55 GMT</pubDate>
            <atom:updated>2019-02-27T17:22:56.547Z</atom:updated>
            <content:encoded><![CDATA[<p>บทความนี้จะเขียนเกี่ยวกับนำข้อมูลจาก GeoServer มาแสดงบน OpenLayer ถ้าอยากรู้เกี่ยวกับ OpenLayer ดูเพิ่มเติมที่ <a href="https://openlayers.org/">https://openlayers.org</a> ผมจะเขียนตัวอย่างการแสดงผลข้อมูลเบื้องต้นสำหรับผู้ที่สนใจ</p><p>การแสดงผลข้อมูลในรูปของ Map Map Servics ในปัจจุบันไม่ใช่เรื่องยาก แต่นัก GIS หลาย ๆ คนยังคงติดปัญหานี้อยู่ ผมจะยกตัวอย่าง Code อย่างง่าย ๆ ให้ทุกคนสามารถเริ่มเขียน OpenLayer เพื่อแสดงข้อมูลของตัวเองได้</p><p>เริ่มต้นกัน</p><p>ให้หา ลองหา Service WMS จากโปรแกรม GeoServer ที่ใช้งานอยู่ในปัจจุบัน เช่น <a href="https://floodtiles.gistda.or.th/geoserver/web/">https://floodtiles.gistda.or.th/geoserver/web/</a></p><p>การดึง Service WMS มาแสดงบน OpenLayer</p><pre>&lt;!doctype html&gt;</pre><pre>&lt;html lang=&quot;en&quot;&gt;</pre><pre>&lt;head&gt;</pre><pre>&lt;link rel=&quot;stylesheet&quot; href=&quot;https://openlayers.org/en/v4.6.5/css/ol.css&quot; type=&quot;text/css&quot;&gt;</pre><pre>&lt;script src=&quot;https://openlayers.org/en/v4.6.5/build/ol.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</pre><pre>&lt;title&gt;Sattawat&lt;/title&gt;</pre><pre>&lt;/head&gt;</pre><pre>&lt;body&gt;</pre><pre>&lt;div id=&quot;map&quot; class=&quot;map&quot;&gt;&lt;/div&gt;</pre><pre>&lt;script type=&quot;text/javascript&quot;&gt;</pre><pre>var wmsLayerProvince;</pre><pre>var map = new ol.Map({</pre><pre>target: &#39;map&#39;,</pre><pre>layers: [</pre><pre>new ol.layer.Tile({</pre><pre>source: new ol.source.OSM()</pre><pre>})</pre><pre>],</pre><pre>view: new ol.View({</pre><pre>center: ol.proj.fromLonLat([100, 13]),</pre><pre>zoom: 6</pre><pre>})</pre><pre>});</pre><pre>var wmsSourceProvince = new ol.source.ImageWMS({</pre><pre>url: &#39;https://floodtiles.gistda.or.th/geoserver/FloodOnline/wms?&#39;,</pre><pre>params: {</pre><pre>&#39;LAYERS&#39;: &#39;FloodOnline:RepeatFloodRaster&#39;</pre><pre>}</pre><pre>});</pre><pre>wmsLayerProvince = new ol.layer.Image({source: wmsSourceProvince});</pre><pre>map.addLayer(wmsLayerProvince);</pre><pre>&lt;/script&gt;</pre><pre>&lt;/body&gt;</pre><pre>&lt;/html&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6SRzgbOjs7dulR0bgQtMtg.png" /><figcaption>WMS</figcaption></figure><p>การดึง Service WMTS มาแสดงบน OpenLayer</p><pre>&lt;!DOCTYPE html&gt;</pre><pre>&lt;html&gt;</pre><pre>&lt;head&gt;</pre><pre>&lt;title&gt;WMTS&lt;/title&gt;</pre><pre>&lt;link rel=&quot;stylesheet&quot; href=&quot;https://openlayers.org/en/v4.6.5/css/ol.css&quot; type=&quot;text/css&quot;&gt;</pre><pre>&lt;!-- The line below is only needed for old environments like Internet Explorer and Android 4.x --&gt;</pre><pre>&lt;script src=&quot;https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL&quot;&gt;&lt;/script&gt;</pre><pre>&lt;script src=&quot;https://openlayers.org/en/v4.6.5/build/ol.js&quot;&gt;&lt;/script&gt;</pre><pre>&lt;/head&gt;</pre><pre>&lt;body&gt;</pre><pre>&lt;div id=&quot;map&quot; class=&quot;map&quot;&gt;&lt;/div&gt;</pre><pre>&lt;script&gt;</pre><pre>var projection = ol.proj.get(&#39;EPSG:4326&#39;);</pre><pre>var projectionExtent = projection.getExtent();</pre><pre>var mapExtent =  [98.500000,5.500000,105.500000,19.500000];</pre><pre>var matrixIds = new Array(22);</pre><pre>for (var z = 0; z &lt; 22; ++z) {</pre><pre>matrixIds[z] = &quot;EPSG:4326:&quot; + z;;</pre><pre>}</pre><pre>resolutions = [</pre><pre>0.703125, 0.3515625, 0.17578125, 0.087890625,</pre><pre>0.0439453125, 0.02197265625, 0.010986328125,</pre><pre>0.0054931640625, 0.00274658203125, 0.001373291015625,</pre><pre>6.866455078125E-4, 3.4332275390625E-4, 1.71661376953125E-4,</pre><pre>8.58306884765625E-5, 4.291534423828125E-5, 2.1457672119140625E-5,</pre><pre>1.0728836059570312E-5, 5.364418029785156E-6, 2.682209014892578E-6,</pre><pre>1.341104507446289E-6, 6.705522537231445E-7, 3.3527612686157227E-7</pre><pre>];</pre><pre>var map = new ol.Map({</pre><pre>layers: [</pre><pre>new ol.layer.Tile({</pre><pre>source: new ol.source.OSM(),</pre><pre>opacity: 0.7</pre><pre>}),</pre><pre>new ol.layer.Tile({</pre><pre>opacity: 0.7,</pre><pre>source: new ol.source.WMTS({</pre><pre>url: &#39;https://floodtiles.gistda.or.th/gwc/service/wmts?&#39;,</pre><pre>layer: &#39;FloodOnline:201710Flood&#39;,</pre><pre>matrixSet: &#39;EPSG:4326&#39;,</pre><pre>format: &#39;image/png&#39;,</pre><pre>projection: projection,</pre><pre>tileGrid: new ol.tilegrid.WMTS({</pre><pre>origin: ol.extent.getTopLeft(projectionExtent),</pre><pre>resolutions: resolutions,</pre><pre>matrixIds: matrixIds</pre><pre>}),</pre><pre>style: &#39;&#39;,</pre><pre>wrapX: true</pre><pre>})</pre><pre>}),</pre><pre>new ol.layer.Tile({</pre><pre>opacity: 0.9,</pre><pre>source: new ol.source.WMTS({</pre><pre>url: &#39;http://localhost:8082/geoserver/gwc/service/wmts?&#39;,</pre><pre>layer: &#39;sattwat:SubDistrict&#39;,</pre><pre>matrixSet: &#39;EPSG:4326&#39;,</pre><pre>format: &#39;image/png&#39;,</pre><pre>projection: projection,</pre><pre>tileGrid: new ol.tilegrid.WMTS({</pre><pre>origin: ol.extent.getTopLeft(projectionExtent),</pre><pre>resolutions: resolutions,</pre><pre>matrixIds: matrixIds</pre><pre>}),</pre><pre>style: &#39;&#39;,</pre><pre>wrapX: true</pre><pre>})</pre><pre>})</pre><pre>],</pre><pre>target: &#39;map&#39;,</pre><pre>controls: ol.control.defaults({</pre><pre>attributionOptions: {</pre><pre>collapsible: false</pre><pre>}</pre><pre>}),</pre><pre>view: new ol.View({</pre><pre>center: ol.proj.fromLonLat([100, 13]),</pre><pre>zoom: 4</pre><pre>})</pre><pre>});</pre><pre>&lt;/script&gt;</pre><pre>&lt;/body&gt;</pre><pre>&lt;/html&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZSLjX5pOlQkaWlcBTLe8AQ.png" /><figcaption>WMTS</figcaption></figure><p>การเพิ่มปุ่มฟังก์ชั่นสำหรับควบคุมการแสดงผลข้อมูล WMS</p><pre>&lt;!doctype html&gt;</pre><pre>&lt;html lang=&quot;en&quot;&gt;</pre><pre>&lt;head&gt;</pre><pre>&lt;link rel=&quot;stylesheet&quot; href=&quot;https://openlayers.org/en/v4.6.5/css/ol.css&quot; type=&quot;text/css&quot;&gt;</pre><pre>&lt;style&gt;</pre><pre>html, body, .map {</pre><pre>height: 100%;</pre><pre>width: 100%;</pre><pre>padding: 0;</pre><pre>margin: 0;</pre><pre>}</pre><pre>#panel {</pre><pre>position: absolute;</pre><pre>top: 10px;</pre><pre>left: 50px;</pre><pre>}</pre><pre>.btn-map {</pre><pre>height: 40px;</pre><pre>background: #7b98bc;</pre><pre>color: white;</pre><pre>border: 2px solid white;</pre><pre>border-radius: 4px;</pre><pre>font-size: 14px;</pre><pre>opacity: 0.9;</pre><pre>font-weight: bold;</pre><pre>}</pre><pre>&lt;/style&gt;</pre><pre>&lt;script src=&quot;https://openlayers.org/en/v4.6.5/build/ol.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</pre><pre>&lt;title&gt;My first application&lt;/title&gt;</pre><pre>&lt;/head&gt;</pre><pre>&lt;body&gt;</pre><pre>&lt;div id=&quot;map&quot; class=&quot;map&quot;&gt;&lt;/div&gt;</pre><pre>&lt;div id=&quot;panel&quot;&gt;</pre><pre>&lt;button id=&quot;showWms&quot; class=&quot;btn-map&quot;&gt;Show wms&lt;/button&gt;</pre><pre>&lt;button id=&quot;hideWms&quot; class=&quot;btn-map&quot;&gt;Hide wms&lt;/button&gt;</pre><pre>&lt;button id=&quot;showCountry&quot; class=&quot;btn-map&quot;&gt;Thailand&lt;/button&gt;</pre><pre>&lt;/div&gt;</pre><pre>&lt;script type=&quot;text/javascript&quot;&gt;</pre><pre>var wmsLayerProvince;</pre><pre>var map = new ol.Map({</pre><pre>target: &#39;map&#39;,</pre><pre>layers: [</pre><pre>new ol.layer.Tile({</pre><pre>source: new ol.source.OSM()</pre><pre>})</pre><pre>],</pre><pre>view: new ol.View({</pre><pre>center: ol.proj.fromLonLat([100, 13]),</pre><pre>zoom: 6</pre><pre>})</pre><pre>});</pre><pre>var btnShowWms = document.getElementById(&#39;showWms&#39;);</pre><pre>var btnHideWms = document.getElementById(&#39;hideWms&#39;);</pre><pre>var showCountry = document.getElementById(&#39;showCountry&#39;);</pre><pre>btnShowWms.onclick =  function() {</pre><pre>removeExistingWms();</pre><pre>var wmsSourceProvince = new ol.source.ImageWMS({</pre><pre>url: ‘https://floodtiles.gistda.or.th/geoserver/web/wms?’</pre><pre>params: {</pre><pre>‘LAYERS’: ‘FloodOnline:RepeatFloodRaster‘</pre><pre>},</pre><pre>crossOrigin: &#39;anonymous&#39;</pre><pre>});</pre><pre>wmsLayerProvince = new ol.layer.Image({source: wmsSourceProvince});</pre><pre>map.addLayer(wmsLayerProvince);</pre><pre>map.getView().fit(ol.proj.transformExtent([98.464198, 8.182077, 98.250123, 7.723311], &#39;EPSG:4326&#39;, &#39;EPSG:3857&#39;));</pre><pre>}</pre><pre>btnHideWms.onclick =  function() {</pre><pre>removeExistingWms();</pre><pre>}</pre><pre>showCountry.onclick =  function() {</pre><pre>map.setView(</pre><pre>new ol.View({</pre><pre>center: ol.proj.fromLonLat([100.4833, 13.7500]),</pre><pre>zoom: 6</pre><pre>})</pre><pre>);</pre><pre>}</pre><pre>function removeExistingWms() {</pre><pre>if (typeof wmsLayerProvince === &#39;object&#39;) {</pre><pre>map.removeLayer(wmsLayerProvince);</pre><pre>}</pre><pre>}</pre><pre>&lt;/script&gt;</pre><pre>&lt;/body&gt;</pre><pre>&lt;/html&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3AL_B7xjVD3d9aP1a2aJ7A.png" /><figcaption>WMS</figcaption></figure><p>การเขียนเว็บไซด์แสดงผลข้อมูล GIS</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vT56uVhdoBmAHuJoFoRsKQ.png" /><figcaption>เว็บแสดงผลข้อมูลทางด้าน GIS</figcaption></figure><p>ผมมีตัวอย่างการเขียนไว้ใน githup สามารถศึกษาข้อมูลเพิ่มเติมได้ที่ : <a href="https://github.com/sattawatarab/onedaysharing_MSU.git">https://github.com/sattawatarab/onedaysharing_MSU.git</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43424410a9cc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/i-bitz-company-limited/openlayer-43424410a9cc">OpenLayer</a> was originally published in <a href="https://medium.com/i-bitz-company-limited">i-bitz Company Limited.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GeoServer(1)]]></title>
            <link>https://medium.com/i-bitz-company-limited/geoserver-1-761d20d06515?source=rss-93f9652303f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/761d20d06515</guid>
            <category><![CDATA[wms]]></category>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[qgis]]></category>
            <category><![CDATA[geoserver]]></category>
            <dc:creator><![CDATA[Bannk Bank]]></dc:creator>
            <pubDate>Wed, 20 Feb 2019 15:10:25 GMT</pubDate>
            <atom:updated>2019-09-30T10:13:32.750Z</atom:updated>
            <content:encoded><![CDATA[<h3>Workshop GeoServer FOSS4G Thailand 2018</h3><p>เนื้อหาที่ผมจะเขียนต่อไปนี้เป็นเนื้อหาจากส่วนหนึ่งของการ Workshop GeoServer FOSS4G Thailand 2018 ผมจะไม่อธิบายในรายละเอียดเยอะนะครับ แต่ถ้าใครสนใจก็หลังไมค์มาถามกันได้ครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pHbFD1rKYK7w3Karif0WLA.png" /><figcaption>GeoServer</figcaption></figure><p><strong>แนะนำให้ดาวน์โหลดโปรแกรม</strong></p><p>ถ้าต้องการเวอร์ชั่นที่ผมใช้อบรมเลยครับ Download Software For Workshop URL : <a href="https://goo.gl/Ankrkt">https://goo.gl/Ankrkt</a></p><p><strong>การติดตั้งโปรแกรม GeoServer</strong></p><p><strong>การติดตั้งในระบบปฏิบัติการ Windows<br></strong>การติดตั้งมีให้ผู้เข้า Workshop 2 วิธี คือติดตั้งแบบไฟล์ war กับ ไฟล์ exe โดยการติดตั้งทั้งสองแบบสามารถใช้สำหรับการ Workshop ครั้งนี้ได้เหมือนกันแต่มีข้อแตกต่างดังนี้<br>1. ไฟล์ war (แนะนาสาหรับท่านที่มีพื้นฐานการทางด้านคอมพิวเตอร์ที่ดี)</p><ul><li>ประสิทธิภาพการใช้งานดีกว่า</li><li>มี extensions ให้ใช้งานมากกว่า</li><li>วิธีการติดตั้งยุ่งยากและมีหลายขั้นตอน</li></ul><p>2. ไฟล์ exe (แนะนาสาหรับท่านที่ต้องการทดลองใช้โปรแกรม)</p><ul><li>ติดตั้งได้รวดเร็วเพียงไม่กี่ขั้นตอน</li><li>ใช้งานฟังก์ชันพื้นฐานได้ครบทุกฟังก์ชัน</li></ul><p><em>ผมได้เขียนวิธีติดตั้งโปรแกรม GeoServer , PosgreSQL, QGIS ไว้ใน github ดูวิธีการติดตั้งโปรแกรมได้ที่ </em><a href="https://github.com/sattawatarab/GeoServer.git"><em>https://github.com/sattawatarab/GeoServer.git</em></a></p><p><strong>ความรู้เบื้องต้นก่อนใช้งาน GeoServer</strong></p><p><strong>การเรียกใช้บริการแผนท่ี Request map</strong></p><p>1.WMS:WebMapService จะเป็นการใช้งานร้องขอข้อมูลลักษณะของแผนท่ีต่างๆท่ีมีค่าพิกัดของข้อมูลแผนที่อยู่ด้วย Format ต่าง ๆ ประกอบด้วย PNG, GIF หรือ JPEG</p><p>2. WFS: Web Feature Service จะเป็นการร้องขอข้อมูลท่ีเป็นข้อมูลลักษณะแผนท่ีท่ีเปน็ ขอ้ มูลShapefile โดยผู้ใช้สามารถท่ีบันทึกข้อมูลและนําไปปรับแก้ข้อมูลได้</p><p>3. WCS: Web Coverage Service จะเป็นการร้องขอข้อมูลที่เป็นข้อมูล Raster เช่น ข้อมูล ภาพถ่ายดาวเทียม</p><p>มีการเรียกใช้งานบริการอื่น ๆ อีกแต่ในบทความนี้ขอยกตัวอย่างเพียงเท่านี้</p><p><strong>การร้องขอบริการจากผู้ใช้ WMS: Web Map Service</strong></p><p>1. GetCapabilities จะส่งค่าการให้บริการ ในส่วนของ Metadata ซึ่งเป็นตัวอธิบายเกี่ยวกับ รายละเอียดของ ข้อมูลท่ีให้บริการและการยอมรับค่าตัวแปรต่าง ๆ</p><p>2. GetMap จะเป็นการส่งภาพแผนที่ซึ่งสามารถระบุช้ันข้อมูล ขนาดของภาพแผนท่ีและลักษณะ ของภาพ แผนที่ได้ ซึ่งรูปแผนที่แสดงภาพในรูปแบบ PNG, GIF หรือ JPEG</p><p>3. GetFeatureInfo มาตรฐานตัวนี้จะเป็น Option ในการร้องขอข้อมูลเก่ียวกับรายละเอียดของ ข้อมูลในแผนที่ การร้องขอการให้บริการต้องระบุเงื่อนไขทางตําแหน่ง เพื่อทําการสืบค้นข้อมูลของ แผนที่มาแสดงผล</p><p><strong>Reques GetCapabilities</strong></p><p>http://localhost:8082/geoserver/ows?service=wms&amp;version=1.1.1 &amp;request=GetCapabilities</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I7rHQyI7bzIwdZRO_pDGNA.png" /><figcaption><strong>GetCapabilities</strong></figcaption></figure><p><strong>Request GetMap</strong></p><p>http://localhost:8082/geoserver/Training/wms?service=WMS&amp;version=1.1.0&amp;request=GetMap&amp;layers=Training:subdistrict&amp;styles=&amp;bbox=97.9187777744332,7.47852287304961,98.6346948110513,8.20031251759669&amp;width=761 &amp;height=768&amp;srs=EPSG:4326 &amp;format=application/openlayers</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*7mPTT6VfqXEUvRAbRv37WQ.png" /><figcaption><strong>GetMap</strong></figcaption></figure><p><strong>Request GetFeatureInfo</strong></p><p>http://localhost:8082/geoserver/Training/wms?SERVICE=WMS&amp;VERSION=1.1.1 &amp;REQUEST=GetFeatureInfo &amp;FORMAT=image/png&amp;TRANSPARENT=true&amp;QUERY_LAYERS=Training:subdistrict&amp;STYLES&amp;LAYERS=Training:subdistrict&amp;info_format=application/json&amp;X=50&amp;Y=50&amp;SRS=EPSG:4326&amp;WIDTH=101&amp;HEIGHT=101&amp;BBOX=98.26309203682467,7.7834014892578125,98.4017944294028,7. 9221038818359375</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lkOShIFZf94pNTc4yhV1Rw.png" /><figcaption><strong>GetFeatureInfo</strong></figcaption></figure><p><strong>เริ่มต้นใช้งานโปรแกรม</strong></p><ul><li>เปลี่ยน Password</li><li>ลบ Layer , Stores , Workspaces</li><li>ลบ Styles ที่ไม่จําเป็นออก เหลือไว้เฉพาะ generic ,line ,point ,polygon ,raster</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pHbFD1rKYK7w3Karif0WLA.png" /><figcaption>GeoServer</figcaption></figure><p><strong>การนําข้อมูล Shapefile/Raster</strong></p><p>นําข้อมูล Shapefile/Raster ไปวางไว้ท่ี (Data directory)</p><p>C:\Program Files\Apache Soft ware Foundation\Tomcat8.5\webapps\geoserver\data\data</p><p><strong>Connect Shapefile Data Sources</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*Ls51W5wBcrjZ7is_92kVig.png" /><figcaption>Connect Shapefile</figcaption></figure><p><strong>Connect Raster Data Sources</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*jpeKjAbj23AbetcnVFul7g.png" /><figcaption><strong>Connect Raster</strong></figcaption></figure><p><strong>Styled Layer Descriptor Vector</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a8HBW9eKQS3mTjffleNU4A.png" /><figcaption><strong>Styled Layer Descriptor Vector</strong></figcaption></figure><p><strong>Styled Layer Descriptor Raster</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ul0fYfIIgAo5LDBtMYzUIg.png" /><figcaption><strong>Styled Layer Descriptor Raster</strong></figcaption></figure><p>ผมได้เขียนเนื้อหาแบบเต็มและข้อมูลตัวอย่างดูได้ที่ : <a href="https://github.com/sattawatarab/GeoServer.git"><em>https://github.com/sattawatarab/GeoServer.git</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=761d20d06515" width="1" height="1" alt=""><hr><p><a href="https://medium.com/i-bitz-company-limited/geoserver-1-761d20d06515">GeoServer(1)</a> was originally published in <a href="https://medium.com/i-bitz-company-limited">i-bitz Company Limited.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python For GIS (3)]]></title>
            <link>https://medium.com/i-bitz-company-limited/python-for-gis-3-d5709888eb90?source=rss-93f9652303f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5709888eb90</guid>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[pm25]]></category>
            <dc:creator><![CDATA[Bannk Bank]]></dc:creator>
            <pubDate>Tue, 05 Feb 2019 10:09:43 GMT</pubDate>
            <atom:updated>2019-09-30T10:15:11.697Z</atom:updated>
            <content:encoded><![CDATA[<h3>Python PM2.5</h3><h3>คุณภาพอากาศ PM 2.5 โดยใช้ Python</h3><p>ต้องขอบคุณ <a href="https://medium.com/@ipat.georobot">chaipat ncm</a> ที่เขียน “การวิเคราะห์ข้อมูลคุณภาพอากาศ PM2.5 ด้วยสถิติเชิงพื้นที่ ตอนที่ 1” ทำผมให้ผมอยากลองดึงข้อมูลผ่าน Python ดูบาง ผมจึง ส่งไปให้นักศึกษาฝึกงาน 2 คน (FB: Teerawat Khongloet และ FB:Thanawat Chaiyo)ที่มาฝึกงานที่บริษัท i-bitz company น้องทั้งสองคนผมเคยสอนเขียนดึงข้อมูล api ของกรมอุตุมาก่อนหน้านี้แล้ว ผลสรุปที่ได้เป็นยังไงมาลองติดตามกัน ลืมบอกไปข้อมูลที่ใช้จากเว็บ <a href="http://air4thai.pcd.go.th/webV2/">http://air4thai.pcd.go.th/webV2/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QK7-nlYIsTQeLaZd4bd12A.png" /><figcaption>map data open in QGIS</figcaption></figure><p>ต่อไปจะเป็นคำสั่งสำหรับการดึงข้อมูล ถ้าไม่เข้าใจคำสั่งที่ผมใช้ลองกลับไปอ่านบทความก่อนหน้านี้ได้นะครับ</p><pre>print(&quot;Running : requests&quot;)<br>import requests</pre><pre>url = &quot;<a href="http://air4thai.pcd.go.th/services/getNewAQI_JSON.php">http://air4thai.pcd.go.th/services/getNewAQI_JSON.php</a>&quot;</pre><pre>headers = {<br>    &#39;Content-Type&#39;: &quot;application/json&quot;,<br>    &#39;cache-control&#39;: &quot;no-cache&quot;,<br>    &#39;Postman-Token&#39;: &quot;keys&quot;<br>    }</pre><pre>response = requests.request(&quot;GET&quot;, url, headers=headers)<br>print(&quot;Running : response.json&quot;)<br>data = response.json()<br>print(&quot;Running : dict&quot;)<br>dict_1=data<br>print(&quot;Running : pandas&quot;)<br>import pandas as pd<br>df1 = pd.DataFrame()<br>list_branch_stationID=[]<br>for item in dict_1[&#39;stations&#39;] :<br>            list_branch_stationID.append(item[&#39;stationID&#39;])<br>df1[&#39;stationID&#39;]=list_branch_stationID<br>list_branch_nameEN=[]<br>for item in dict_1[&#39;stations&#39;] :<br>            list_branch_nameEN.append(item[&#39;nameEN&#39;])<br>df1[&#39;nameEN&#39;]=list_branch_nameEN<br>list_branch_nameTH=[]<br>for item in dict_1[&#39;stations&#39;] :<br>            list_branch_nameTH.append(item[&#39;nameTH&#39;])<br>df1[&#39;nameTH&#39;]=list_branch_nameTH<br>list_branch_areaTH=[]<br>for item in dict_1[&#39;stations&#39;] :<br>            list_branch_areaTH.append(item[&#39;areaTH&#39;])<br>df1[&#39;areaTH&#39;]=list_branch_areaTH<br>list_branch_areaEN=[]<br>for item in dict_1[&#39;stations&#39;] :<br>            list_branch_areaEN.append(item[&#39;areaEN&#39;])<br>df1[&#39;areaEN&#39;]=list_branch_areaEN<br>list_branch_stationType=[]<br>for item in dict_1[&#39;stations&#39;] :<br>            list_branch_stationType.append(item[&#39;stationType&#39;])<br>df1[&#39;stationType&#39;]=list_branch_stationType<br>list_date=[]<br>for item in dict_1[&#39;stations&#39;] :<br>           list_date.append(item[&#39;LastUpdate&#39;][&#39;date&#39;])<br>df1[&#39;date&#39;] = list_date<br>list_time=[]<br>for item in dict_1[&#39;stations&#39;] :<br>           list_time.append(item[&#39;LastUpdate&#39;][&#39;time&#39;])<br>df1[&#39;time&#39;] = list_time<br>list_PM25=[]<br>for item in dict_1[&#39;stations&#39;] :<br>           list_PM25.append(item[&#39;LastUpdate&#39;][&#39;PM25&#39;][&#39;value&#39;])<br>df1[&#39;PM25&#39;] = list_PM25<br>list_unitPM25=[]<br>for item in dict_1[&#39;stations&#39;] :<br>           list_unitPM25.append(item[&#39;LastUpdate&#39;][&#39;PM25&#39;][&#39;unit&#39;])<br>df1[&#39;unitPM25&#39;] = list_unitPM25<br>list_PM10=[]<br>for item in dict_1[&#39;stations&#39;] :<br>           list_PM10.append(item[&#39;LastUpdate&#39;][&#39;PM10&#39;][&#39;value&#39;])<br>df1[&#39;PM10&#39;] = list_PM10<br>list_unitPM10=[]<br>for item in dict_1[&#39;stations&#39;] :<br>           list_unitPM10.append(item[&#39;LastUpdate&#39;][&#39;PM10&#39;][&#39;unit&#39;])<br>df1[&#39;unitPM10&#39;] = list_unitPM10<br>list_O3=[]<br>for item in dict_1[&#39;stations&#39;] :<br>           list_O3.append(item[&#39;LastUpdate&#39;][&#39;O3&#39;][&#39;value&#39;])<br>df1[&#39;O3&#39;] = list_O3<br>list_unitO3=[]<br>for item in dict_1[&#39;stations&#39;] :<br>           list_unitO3.append(item[&#39;LastUpdate&#39;][&#39;O3&#39;][&#39;unit&#39;])<br>df1[&#39;unitO3&#39;] = list_unitO3<br>df1[&#39;unitO3&#39;] = list_unitO3<br>list_CO=[]<br>for item in dict_1[&#39;stations&#39;] :<br>           list_CO.append(item[&#39;LastUpdate&#39;][&#39;CO&#39;][&#39;value&#39;])<br>df1[&#39;CO&#39;] = list_CO<br>list_unitCO=[]<br>for item in dict_1[&#39;stations&#39;] :<br>           list_unitCO.append(item[&#39;LastUpdate&#39;][&#39;CO&#39;][&#39;unit&#39;])<br>df1[&#39;unitCO&#39;] = list_unitCO<br>list_NO2=[]<br>for item in dict_1[&#39;stations&#39;] :<br>           list_NO2.append(item[&#39;LastUpdate&#39;][&#39;NO2&#39;][&#39;value&#39;])<br>df1[&#39;NO2&#39;] = list_NO2<br>list_unitNO2=[]<br>for item in dict_1[&#39;stations&#39;] :<br>           list_unitNO2.append(item[&#39;LastUpdate&#39;][&#39;NO2&#39;][&#39;unit&#39;])<br>df1[&#39;unitNO2&#39;] = list_unitNO2<br>list_SO2=[]<br>for item in dict_1[&#39;stations&#39;] :<br>           list_SO2.append(item[&#39;LastUpdate&#39;][&#39;SO2&#39;][&#39;value&#39;])<br>df1[&#39;SO2&#39;] = list_SO2<br>list_unitSO2=[]<br>for item in dict_1[&#39;stations&#39;] :<br>           list_unitSO2.append(item[&#39;LastUpdate&#39;][&#39;SO2&#39;][&#39;unit&#39;])<br>df1[&#39;unitSO2&#39;] = list_unitSO2<br>list_AQILevel=[]<br>for item in dict_1[&#39;stations&#39;] :<br>           list_AQILevel.append(item[&#39;LastUpdate&#39;][&#39;AQI&#39;][&#39;Level&#39;])<br>df1[&#39;AQILevel&#39;] = list_AQILevel<br>list_AQIaqi=[]<br>for item in dict_1[&#39;stations&#39;] :<br>           list_AQIaqi.append(item[&#39;LastUpdate&#39;][&#39;AQI&#39;][&#39;aqi&#39;])<br>df1[&#39;AQIaqi&#39;] = list_AQIaqi<br>list_lat=[]<br>for item in dict_1[&#39;stations&#39;] :<br>            list_lat.append(item[&#39;lat&#39;])<br>df1[&#39;lat&#39;] = list_lat<br>list_long=[]<br>for item in dict_1[&#39;stations&#39;] :<br>           list_long.append(item[&#39;long&#39;])<br>df1[&#39;long&#39;] = list_long<br>print(&quot;Running : to_csv&quot;)<br>df1.to_csv(&#39;C:/Users/sattawat.a/Desktop/Python/PM25/PM25/PM25/outputPM25.csv&#39;)</pre><p>ผมลองเขียนแล้วใช้งานได้จริง ผลลัพข้อมูลที่ได้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YvGa860jF3OFty6uAUPt9w.png" /><figcaption>Attribute data</figcaption></figure><p>ถ้าใครสนใจก็ลองไป Clone จาก github ที่ผม push code ไว้ไปศึกษาต่อได้นะครับ ถ้าใครนำไปใช้ก็อย่างลืมมาแบ่งปันกันได้นะครับ</p><p>github : <a href="https://github.com/sattawatarab/Python.git">https://github.com/sattawatarab/Python.git</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5709888eb90" width="1" height="1" alt=""><hr><p><a href="https://medium.com/i-bitz-company-limited/python-for-gis-3-d5709888eb90">Python For GIS (3)</a> was originally published in <a href="https://medium.com/i-bitz-company-limited">i-bitz Company Limited.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Task scheduler python file]]></title>
            <link>https://medium.com/i-bitz-company-limited/python-for-gis-2-12216cdd18e0?source=rss-93f9652303f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/12216cdd18e0</guid>
            <dc:creator><![CDATA[Bannk Bank]]></dc:creator>
            <pubDate>Wed, 16 Jan 2019 12:26:19 GMT</pubDate>
            <atom:updated>2019-09-30T10:17:46.382Z</atom:updated>
            <content:encoded><![CDATA[<p>การดึงข้อมูลน้ำฝน อุณหภูมิ จาก API กรมอุตุนิยมวิทยา มาจัดเก็บไว้ในรูปแบบตารางไฟล์.csv โดยจะตั้งค่าให้รัน task scheduler สำหรับการรันข้อมูลทุก ๆ วัน</p><p>ถ้าใครยังไม่สามารถดึงข้อมูลมาเก็บไว้ในรูปแบบของ csv. ก็ให้ลองกลับไปอ่านที่ <a href="https://medium.com/i-bitz-company-limited/python-for-gis-f9c723f83cc2">Python For GIS</a> ถ้าเข้าใจในเรื่องดังกล่าวแล้วก็มาเริ่มทำขั้นตอนต่อไปกันเลย จะทำอย่างไรให้เราได้ข้อมูลใหม่ ๆ ทุกๆ วัน โดยที่เราไม่ต้องมานั่งเขียน code ใหม่ทุกครั้ง คุณมาถูกทางแล้วครับ ผมจะมาบอกวิธีการดังนี้</p><ol><li>เตรียม code python สำหรับการดึงค่าข้อมูลจากรมอุตุยมวิทยาให้เรียบร้อย</li></ol><pre>print(&quot;Running : requests&quot;)<br>import requests</pre><pre>url = &quot;<a href="http://data.tmd.go.th/api/WeatherToday/V1/">http://data.tmd.go.th/api/WeatherToday/V1/</a>&quot;</pre><pre>payload = &quot;&quot;<br>headers = {<br>    &#39;cache-control&#39;: &quot;no-cache&quot;,<br>    &#39;Postman-Token&#39;: &quot;keys&quot;<br>    }</pre><pre>response = requests.request(&quot;GET&quot;, url, data=payload, headers=headers)<br>print(&quot;Running : response.json&quot;)<br>data = response.json()<br>print(&quot;Running : dict&quot;)<br>dict_1=data<br>print(&quot;Running : pandas&quot;)<br>import pandas as pd<br>df1 = pd.DataFrame()<br>list_branch_name=[]<br>for item in dict_1[&#39;Stations&#39;] :<br>            list_branch_name.append(item[&#39;StationNameTh&#39;])<br>df1[&#39;name&#39;]=list_branch_name</pre><pre>list_lat=[]<br>for item in dict_1[&#39;Stations&#39;] :<br>            list_lat.append(item[&#39;Latitude&#39;][&#39;Value&#39;])<br>df1[&#39;lat&#39;] = list_lat</pre><pre>list_long=[]<br>for item in dict_1[&#39;Stations&#39;] :<br>           list_long.append(item[&#39;Longitude&#39;][&#39;Value&#39;])<br>df1[&#39;long&#39;] = list_long</pre><pre>list_Rain=[]<br>for item in dict_1[&#39;Stations&#39;] :<br>           list_Rain.append(item[&#39;Observe&#39;][&#39;Rainfall&#39;][&#39;Value&#39;])<br>df1[&#39;rain&#39;] = list_Rain</pre><pre>list_Temp=[]<br>for item in dict_1[&#39;Stations&#39;] :<br>           list_Temp.append(item[&#39;Observe&#39;][&#39;Temperature&#39;][&#39;Value&#39;])<br>df1[&#39;temp&#39;] = list_Temp</pre><pre>list_Time=[]<br>for item in dict_1[&#39;Stations&#39;] :<br>           list_Time.append(item[&#39;Observe&#39;][&#39;Time&#39;])<br>df1[&#39;time&#39;] = list_Time<br>print(&quot;Running : to_csv&quot;)<br>df1.to_csv(&#39;C:/Users/sattawat.a/Desktop/Python/TMD/bbbb.csv&#39;)</pre><p>2. เขียน .bat สำหรับการดึงข้อมูล คือ เขียนขึ้นมาเพื่อให้รันไฟล์ code python หรือพูดง่าย ๆ บ้าน ๆ ว่าคนที่จะทำงานแทนเรานั้นเอง</p><pre>C:\Users\sattawat.a\Anaconda3\envs\bb\python.exe C:\Users\sattawat.a\Desktop\Python\TMD\TMD.py %*</pre><pre>โปรแกรมที่ใช้รัน C:\python.exe<br>ไฟล์ Python ที่ต้องการรัน C:\Users\sattawat.a\Desktop\Python\TMD\TMD.py</pre><p>3. ตั้งค่า task scheduler ให้รันข้อมูลทุก ๆ วัน คือการกำหนดเวลาให้รันข้อมูลนั้นเอง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QHqYtWMETGklWF6lnlV_Xw.png" /><figcaption>task scheduler</figcaption></figure><p>ถ้าใครสนใจก็ลองไป Clone จาก github ที่ผม push code ไว้ไปศึกษาต่อได้นะครับ ถ้าใครนำไปใช้ก็อย่างลืมมาแบ่งปันกันได้นะครับ</p><p>github : <a href="https://github.com/sattawatarab/Python.git">https://github.com/sattawatarab/Python.git</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12216cdd18e0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/i-bitz-company-limited/python-for-gis-2-12216cdd18e0">Task scheduler python file</a> was originally published in <a href="https://medium.com/i-bitz-company-limited">i-bitz Company Limited.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python For GIS]]></title>
            <link>https://medium.com/i-bitz-company-limited/python-for-gis-f9c723f83cc2?source=rss-93f9652303f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9c723f83cc2</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[tmd]]></category>
            <dc:creator><![CDATA[Bannk Bank]]></dc:creator>
            <pubDate>Tue, 15 Jan 2019 12:10:52 GMT</pubDate>
            <atom:updated>2019-09-30T10:19:41.888Z</atom:updated>
            <content:encoded><![CDATA[<h3>Python Call data TMD API</h3><p>TMD API</p><p>สามารถเข้าไปศึกษาได้ที่ <a href="http://data.tmd.go.th/api/index1.php">http://data.tmd.go.th/api/index1.php</a></p><p>API ที่จะทำการสร้างและทดสอบครั้งนี้คือ <a href="http://data.tmd.go.th/api/WeatherToday/V1/">WeatherToday</a> ผลการตรวจวัดลักษณะอากาศรายวัน เวลา 07.00 น. ประกอบด้วยข้อมูล ณ เวลา 07.00 น. และค่าทางสถิติของ 24 ชั่วโมงที่ผ่านมาแสดงข้อมูลทุกวันเวลา 07.00 น.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*51OIKqZovUDFIErcMGugHA.png" /><figcaption>ตัวอย่างข้อมูลที่ได้</figcaption></figure><p>ต่อไปจะเป็นคำสั่งที่ผมได้เขียนขึ้นมาเพื่อดึงข้อมูลจาก API</p><pre># import requests<br>import requests</pre><pre>url = &quot;<a href="http://data.tmd.go.th/api/WeatherToday/V1/">http://data.tmd.go.th/api/WeatherToday/V1/</a>&quot;</pre><pre>payload = &quot;&quot;<br>headers = {<br>    &#39;cache-control&#39;: &quot;no-cache&quot;,<br>    &#39;Postman-Token&#39;: &quot;keys&quot;<br>    }</pre><pre>response = requests.request(&quot;GET&quot;, url, data=payload, headers=headers)<br>print(response.text)</pre><pre>#กำหนด data<br>data = response.json()</pre><pre>#สร้าง dict<br>dict_1=data</pre><pre>#พยายาม print keys และหาข้อมูลที่เราต้องการให้เจอ<br>print(data.keys())<br>print(data[&#39;Stations&#39;])<br>print(dict_1[&#39;Stations&#39;])</pre><pre>#import pandas สำหรับใช้สร้างตาราง<br>import pandas as pd</pre><pre>#สร้างตาราง<br>df1 = pd.DataFrame()</pre><pre>#สร้างคอลัมน์และเก็บข้อมูล<br>list_branch_name=[]<br>for item in dict_1[&#39;Stations&#39;] :<br>            list_branch_name.append(item[&#39;StationNameTh&#39;])<br>df1[&#39;name&#39;]=list_branch_name</pre><pre>#การบันทึกข้อมูล .csv<br>df1.to_csv(&#39;bbbb.csv&#39;)</pre><p>ถ้าใครสนใจก็ลองไป Clone จาก github ที่ผม push code ไว้ไปศึกษาต่อได้นะครับ ถ้าใครนำไปใช้ก็อย่างลืมมาแบ่งปันกันได้นะครับ</p><p>github : <a href="https://github.com/sattawatarab/Python.git">https://github.com/sattawatarab/Python.git</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f9c723f83cc2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/i-bitz-company-limited/python-for-gis-f9c723f83cc2">Python For GIS</a> was originally published in <a href="https://medium.com/i-bitz-company-limited">i-bitz Company Limited.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ogr2ogr (1)]]></title>
            <link>https://medium.com/i-bitz-company-limited/ogr2ogr-1-64066026adfb?source=rss-93f9652303f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/64066026adfb</guid>
            <category><![CDATA[ogr2ogr]]></category>
            <category><![CDATA[gdel]]></category>
            <category><![CDATA[postgresql]]></category>
            <dc:creator><![CDATA[Bannk Bank]]></dc:creator>
            <pubDate>Wed, 02 Jan 2019 11:29:04 GMT</pubDate>
            <atom:updated>2019-01-02T11:29:04.925Z</atom:updated>
            <content:encoded><![CDATA[<h3>ogr2ogr คืออะไร</h3><p><strong><em>GDAL (Geospatial Data Abstraction Library)</em></strong> เป็น Library แบบ opensource ใช้จัดการอ่านและเขียนภาพ (Raster) ที่อ้างอิงกับระบบพิกัดภูมิศาสตร์ ไลบรารีพัฒนาด้วยภาษา glibc/glibc++ OGR ก็เช่นเดียวกันเป็นส่วนหนึ่งของ GDAL แต่ใช้กับจัดการกับไฟล์ Vector ถ้าอ่านแล้วยังไม่เข้าใจก็ลองนำ Keyword ไปหาใน Google ดูนะครับอาจจะเข้าใจมากขึ้น</p><p>การเขียนคำสั่ง ogr2ogr ถ้าใครได้ลองใช้แล้วจะพูดว่าทำไมง่ายจัง…ง่ายจริงหรือเปล่าลองมาดูตัวอย่างการเขียนกันดีกว่า</p><p>การแปลงไฟล์ ESRI Shapefile to GeoJSON</p><pre>ogr2ogr -f GeoJSON D:\B_test\bb\geojson2.geojson D:\B_test\bb\shapefile.shp -lco ENCODING=UTF-8</pre><p>การสร้างไฟล์ vrt</p><pre>#no geometry<br>&lt;OGRVRTDataSource&gt;<br>    &lt;OGRVRTLayer name=&quot;testtt2&quot;&gt;<br>        &lt;SrcDataSource&gt;D:\B_test\testtt2.csv&lt;/SrcDataSource&gt;<br>    &lt;/OGRVRTLayer&gt;<br>&lt;/OGRVRTDataSource&gt;</pre><pre>#geometry<br>&lt;OGRVRTDataSource&gt;<br>    &lt;OGRVRTLayer name=&quot;sheet1&quot;&gt;<br>        &lt;SrcDataSource&gt;test.csv&lt;/SrcDataSource&gt;<br>        &lt;GeometryType&gt;wkbPoint&lt;/GeometryType&gt;<br>        &lt;LayerSRS&gt;WGS84&lt;/LayerSRS&gt;<br>        &lt;GeometryField encoding=&quot;PointFromColumns&quot; x=&quot;LONGITUDE&quot; y=&quot;LATITUDE&quot;/&gt;<br>    &lt;/OGRVRTLayer&gt;<br>&lt;/OGRVRTDataSource&gt;</pre><p>ก่อนที่จะ import csv to postgreSQL ให้สร้างไฟล์ vrt ก่อนนะ</p><pre>ogr2ogr -f &quot;PostgreSQL&quot; -lco GEOMETRY_NAME=the_geom -lco FID=gid PG:&quot;host=localhost user=postgres dbname=foss4g password=123456&quot; D:\B_test\testtt2.vrt -nln table</pre><p>Export gdb to ESRI Shapefile</p><pre>ogr2ogr -f &quot;ESRI Shapefile&quot; -lco ENCODING=UTF-8 D:\B_test\bb D:\B_test\bb.gdb TMDValue</pre><p>Export data from postgreSQL</p><pre>#to GeoJSON<br>ogr2ogr -f &quot;GeoJSON&quot; D:\B_test\bb\output2b.geojson PG:&quot;host=localhost user=postgres password=123456 dbname=foss4g&quot; -sql &quot;select ap_en, ap_tn, geom from &quot;&quot;Amphoe&quot;&quot;&quot; -lco ENCODING=UTF-8</pre><pre>#to ESRI Shapefile<br>ogr2ogr -f &quot;ESRI Shapefile&quot; D:\B_test\bb\output2b.shp PG:&quot;host=localhost user=postgres password=123456 dbname=foss4g&quot; -sql &quot;select ap_en, ap_tn, geom from &quot;&quot;Amphoe&quot;&quot;&quot; -lco ENCODING=UTF-8</pre><pre>#to csv<br>ogr2ogr -f &quot;csv&quot; D:\B_test\bb\output2bc.csv PG:&quot;host=localhost user=postgres password=123456 dbname=foss4g&quot; -sql &quot;select * from &quot;&quot;test&quot;&quot;&quot; -lco ENCODING=UTF-8</pre><p>ถ้าใครสนใจก็ลองไป Clone จาก github ที่ผม push code ไว้ไปศึกษาต่อได้นะครับ ถ้าใครนำไปใช้ก็อย่างลืมมาแบ่งปันกันได้นะครับ</p><p>github : <a href="https://github.com/sattawatarab/ogr2ogr.git">https://github.com/sattawatarab/ogr2ogr.git</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64066026adfb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/i-bitz-company-limited/ogr2ogr-1-64066026adfb">ogr2ogr (1)</a> was originally published in <a href="https://medium.com/i-bitz-company-limited">i-bitz Company Limited.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ogr2ogr (2)]]></title>
            <link>https://medium.com/i-bitz-company-limited/ogr2ogr-2-e9be60b5873b?source=rss-93f9652303f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9be60b5873b</guid>
            <category><![CDATA[gdal]]></category>
            <category><![CDATA[qgis]]></category>
            <category><![CDATA[interpolation]]></category>
            <category><![CDATA[ogr2ogr]]></category>
            <dc:creator><![CDATA[Bannk Bank]]></dc:creator>
            <pubDate>Wed, 02 Jan 2019 11:23:53 GMT</pubDate>
            <atom:updated>2019-01-16T09:43:57.343Z</atom:updated>
            <content:encoded><![CDATA[<h4>ความจริงบทความนี้ต้องตั้งชื่อว่า gdal แต่ต้องการให้สอดคล้องกับบทความก่อนหน้านี้ที่เขียนเกี่ยวกับ ogr2ogr (1) ไว้ จึงตั้งชื่อว่า ogr2ogr (2) ถ้าใครยังไม่ได้อ่านก็ลองกลับไปอ่านกันก่อนได้ครับ บทความนี้จะเป็นการนำข้อมูลปริมาณน้ำฝนมาประยุกต์ใช้งานนะครับ โดยผมจะสร้าง web map service (wms) การประมาณน้ำฝนไว้บน GeoServer แล้วให้ข้อมูลเปลี่ยนแปลงทุกครั้งที่มีการรันคำสั่งข้อมูลใหม่</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*djllYaxco9ArqHoW2smsVw.png" /><figcaption>ข้อมูล wms การประมาณค่าปริมาณน้ำฝน</figcaption></figure><p>สิ่งที่ต้องมี<br>1. Shapefile ปริมาณน้ำฝน<br>2. Shapefie ขอบเขตจังหวัด<br>3. ติดตั้งโปรแกรม QGIS <br>4. ติดตั้งโปรแกรม GeoServer</p><p>มาเริ่มกันเลยดีกว่าแต่ก่อนจะเริ่มต้นอาจจะมีคำศัพท์ทางด้านเทคอยู่บ้างผมไม่ขออธิบายนะครับ ถ้าอยากรู้ google ให้คำตอบคุณได้<br>… เริ่มต้นจากการเตรียมข้อมูลทางด้าน GIS ให้เรียบร้อยแล้วใช้คำสั่งการประมาณค่าน้ำฝนแบบ IDW ให้รันคำสั่งผ่าน OSGeo4W</p><pre># input data ==&gt; D:\B_test\bb\TMDValue.shp <br># output data  ==&gt; D:/B_test/QGIS/idw/test2.tif <br># field ค่า Z = ObserveVal</pre><pre>gdal_grid -l TMDValue -zfield ObserveVal -a invdistnn:power=2.0:smothing=0.0:radius=1.0:max_points=12:min_points=0:nodata=0.0 -ot Float32 -of GTiff D:\B_test\bb\TMDValue.shp D:/B_test/QGIS/idw/test2.tif</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*wAY3sy-g6hdySmP9B13avw.png" /><figcaption>ผลลัพธ์จาการใช้คำสั่ง gdal_grid</figcaption></figure><p>ต่อมาเราจะใช้คำสั่ง Clip สำหรับการตัดขอบเขตข้อมูลตามที่เราต้องการ</p><pre># Shapefile area ==&gt; D:\Admin\Province.shp<br># tiff file data ==&gt; D:/B_test/QGIS/idw/test2.tif<br># outpput data ==&gt; D:/B_test/QGIS/idw/test3.tif</pre><pre>gdalwarp -of GTiff -cutline D:\Admin\Province.shp -crop_to_cutline D:/B_test/QGIS/idw/test2.tif D:/B_test/QGIS/idw/test3.tif</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*-RHj_xdbOFaHzAwqW5OPxg.png" /><figcaption>ผลลัพธ์จาการใช้คำสั่ง gdalwarp</figcaption></figure><p>มาถึงขั้นตอนนี้เราได้ขอมูล tiff การประมาณค่าน้ำฝน เรียบร้อยแล้ว ต่อไปเราจะสร้าง map service ข้อมูลนี้ ไว้บน GeoServer ผมจะไม่เขียนขั้นต้อนการนำไฟล์ไปไว้บน GeoServer นะครับแต่ผมจะเขียนแยกไว้อีกบทความหนึ่งรออ่านกันได้ครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*4neIoEIYq90NPW2YkhQMRw.png" /><figcaption>ชั้นข้อมูลการประมาณค่าน้ำฝนที่อยู่ยน GeoServer</figcaption></figure><p>ตัวอย่าง service wms ชั้นข้อมูลการประมาณค่าน้ำฝน</p><p><a href="http://localhost:8082/geoserver/sattawat/wms?service=WMS&amp;version=1.1.0&amp;request=GetMap&amp;layers=sattawat:test3&amp;styles=&amp;bbox=97.34369928895268,5.612737642374384,105.63702493555678,20.464925515841433&amp;width=428&amp;height=768&amp;srs=EPSG:4326&amp;format=application/openlayers#toggle">http://localhost:8082/geoserver/sattawat/wms?service=WMS&amp;version=1.1.0&amp;request=GetMap&amp;layers=sattawat:test3&amp;styles=&amp;bbox=97.34369928895268,5.612737642374384,105.63702493555678,20.464925515841433&amp;width=428&amp;height=768&amp;srs=EPSG:4326&amp;format=application/openlayers</a></p><p>ทดสอบเรียก service wms ผ่านโปรแกรม QGIS</p><p>url : <a href="http://localhost:8082/geoserver/sattawat/wms">http://localhost:8082/geoserver/sattawat/wms</a>?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rw04DSpUCMRmY0vvLFDHNQ.png" /><figcaption>เรียก service wms ผ่านโปรแกรม QGIS</figcaption></figure><p>ทดลองรันคำสั่งอีกครั้ง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*DMC2xFmPujN3BZ6Sr8HhzA.png" /><figcaption>ผลลัพธ์จาการใช้คำสั่ง gdalwarp ครั้งที่ 1</figcaption></figure><p>คำสั่งสำหรับลบไฟล์</p><pre>#สำหรับ windows<br>DEL D:\B_test\QGIS\idw\test3.tif</pre><p>คำสั่งสำหรับคัดลอกไฟล์</p><pre>#สำหรับ windows<br>copy D:\B_test\QGIS\idw\test3.tif D:\B_test\QGIS\idw2\test3.tif</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/1*BgRWM5M78okaxSBAak42iw.png" /><figcaption>ผลลัพธ์จาการใช้คำสั่ง gdalwarp ครั้งที่ 2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*77rz_5t34abno3PzY4OSsQ.png" /><figcaption>ตัวอย่างจากหน้า OSGeo4w</figcaption></figure><p><em>จากตัวอย่างข้างต้นสามารถนำไปประยุกต์ต่อให้สามารถเขียนเป็นแบบ .bat ให้สามารถรันข้อมูลแบบอัตโนมัติได้ โดยใช้ฟังก์ชั่นของ </em>task scheduler windows</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9be60b5873b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/i-bitz-company-limited/ogr2ogr-2-e9be60b5873b">ogr2ogr (2)</a> was originally published in <a href="https://medium.com/i-bitz-company-limited">i-bitz Company Limited.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>