Skip to main content

Join attributes by location (summary)

ProcessId : c2613bae18c54918881c7208

Join attributes by location (summary) เป็นเครื่องมือสำหรับเชื่อมข้อมูลตาราง ซึ่งใช้ข้อมูล 2 ส่วน คือข้อมูล Input และข้อมูล Overlay โดย Module จะประมวลผลหาค่าทางสถิติ (count, sum, mean)โดยใช้ข้อมูลที่อยู่ในฟิลด์หรือคอลัมน์ที่ตรงกันทั้ง 2 ส่วน ที่ผู้ใช้งานทำการระบุ ผลลัพธ์จะได้ข้อมูลคุณสมบัติ (Features) ของข้อมูล Input ข้อมูลในตารางจะเพิ่มข้อมูลของ Overlay เข้ามาด้วย

วิธีการใช้งาน

Input

  • Input : ระบุข้อมูลคุณลักษณะ (Attributes Data)ที่จะนำมาเป็นข้อมูลตั้งต้น โดยจะเป็นข้อมูลประเภท Vector (Point, Line, Polygon) ซึ่งสามารถนำ Features Collection ที่เคยนำเข้ามาแล้วมาสร้างและสามารถนำข้อมูล GeoJSON มาใช้ในการสร้างได้
  • Overlay เป็นข้อมูลคุณลักษณะ (Attributes Data) ที่นำมา Join กับข้อมูลในส่วนของ Input ซึ่งต้องเป็นข้อมูล Polygon เท่านั้น

Parameter

  • Geometric predicate เลือกรูปแบบของการของการซ้อนทับกับของข้อมูล

     0 = intersects        
    1 = contains
  • Column ระบุคอลัมน์ที่ต้องนำมาหาผลลัพธ์

  • Summaries to calculate กำหนดรูปแบบในการ Summary

    0 = count          5 = sum,
    6 = mean

Result ทำการเลือกประเภทของผลลัพธ์ซึ่งมีอยู่ 2 ประเภท คือ Vallaris Feature GeoJSON

  • Vallaris Feature จะต้องทำการสร้าง Features Collection ไว้สำหรับเก็บข้อมูลผลลัพธ์
  • GeoJSON จะได้ผลลัพธ์ออกมาเป็น GeoJSON
ตัวอย่างข้อมูล GeoJSON : Input
input.geojson
{
"type": "FeatureCollection",
"name": "point",
"features": [
{
"type": "Feature",
"properties": {
"data": 2
},
"geometry": {
"type": "Point",
"coordinates": [
99.68027451261905,
14.0803602942941
]
}
},
{
"type": "Feature",
"properties": {
"data": 4
},
"geometry": {
"type": "Point",
"coordinates": [
100.56322044876401,
13.805271610671046
]
}
},
{
"type": "Feature",
"properties": {
"data": 5
},
"geometry": {
"type": "Point",
"coordinates": [
102.01852832341501,
13.840766924686925
]
}
},
{
"type": "Feature",
"properties": {
"data": 3
},
"geometry": {
"type": "Point",
"coordinates": [
101.37517575687723,
14.240089207365552
]
}
}
]
}
ตัวอย่างข้อมูล GeoJSON : Overlay
overlay.geojson
{
"type": "FeatureCollection",
"name": "example_polygon",
"features": [
{
"type": "Feature",
"properties": {
"data": 20
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[
100.97645526256841,
14.52848863374456
],
[
100.96403261172851,
13.177525354906454
],
[
99.21883543041264,
13.179666701141198
],
[
99.23658308742057,
14.52848863374456
],
[
100.97645526256841,
14.52848863374456
]
]
]
]
}
},
{
"type": "Feature",
"properties": {
"data": 10
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[
100.96403261172851,
13.177525354906454
],
[
100.97645526256841,
14.52848863374456
],
[
102.84379437428417,
14.52848863374456
],
[
102.83492054578021,
13.175229786889213
],
[
100.96403261172851,
13.177525354906454
]
]
]
]
}
}
]
}