- Mac OS X 10.10.3
- Python 3.4.2
- Django 1.6.0
- Mysql: Ver 14.14 Distrib 5.6.22
- Linux Ubuntu 14.04.1 LTS
- Python 3.4.0
- Django 1.6.0
- Ver 14.14 Distrib 5.5.41
- Host Name: film.h1994st.com
- Port Number: 8899
- pymysql
- simplejson
- numpy
- scipy
Field | Type | Remark | Description |
---|---|---|---|
id | int(11) | primary key, auto_increment | point identification |
longtitude | decimal(9,4) | longtitued of the point | |
latitude | decimal(9,4) | latitude of the point | |
moisture | decimal(4,1) | soil moisture of the point | |
air_temp | decimal(4,1) | air temperature of the point | |
leaf_temp | decimal(4,1) | leaf temperature of the point | |
humidity | decimal(4,1) | humidity of the point | |
transpiration | decimal(5,2) | calculated by air_temp, leaf_temp and humidity | |
photo | varchar(100) | url of the photo | |
time | datetime | time of acquisition |
- DateTime Format: yyyy-MM-dd hh:mm:ss
- Http Response Format: JSON
-
TestHttpConnection
- Method:
POST
- HTTP request:
/farm/testnetwork
- Parameters:
- message: text string
- photo: file picture
- Description: test network connection
- Return:
- Success
- Success: TestHttpConnection
- Failed
- Fail: TestHttpConnection
- Success
- Method:
-
NewSample
- Method:
POST
- HTTP request:
/farm/newsample
- Parameters:
- longtitude: text number ±xxx.xxxx
- latitude: text numer ±xx.xxxx
- moisture: text number ±xxx.x
- transpiration: text number ±xxx.xx
- air_temp: text number ±xxx.x
- leaf_temp: text number ±xxx.x
- humidity: text number ±xxx.x
- datetime: text datetime
- photo: file picture
- Description: update new sample
- Return:
- Success
- Success: NewSample
- Failed
- Fail: NewSample
- Success
- Method:
-
GetDataPoints
- Method:
GET
- HTTP request:
/farm/getdata
- Parameters:
- Description: get recent samples(in 2 days or nearest 20 points)
- Return:
- Success
- Success: NewSample
- Failed
- Fail: NewSample
- Success
- Method:
-
GetPointDetail
- Method:
GET
- HTTP request:
/farm/getdetail
- Parameters:
- id: text number integer >0
- Description: get point detail by id
- Return
- Success
- data:
- longtitude: text number ±xxx.xxxx
- latitude: text numer ±xx.xxxx
- moisture: text number ±xxx.x
- transpiration: text number ±xxx.xx
- air_temp: text number ±xxx.x
- leaf_temp: text number ±xxx.x
- humidity: text number ±xxx.x
- datetime: text datetime
- photo: file picture
- max-x: text numer ±xx.xxxx max latitude
- min-x: text numer ±xx.xxxx min latitdue
- max-y: text number ±xxx.xxxx max longtitude
- min-y: text number ±xxx.xxxx min longtitude
- max_m: text number ±xxx.x max soil moisture
- max_t: text number ±xxx.x max transpiration
- min_m: text number ±xxx.x min soil moisture
- min_t: text number ±xxx.x min transpiration
- all-moist: two dimentional array represents interpolated value of soil moisture
- all-trans: two dimentional array represents interpolated value of transpiration
- data:
- Failed
- Fail: GetPointDetail
- Success
- Method:
-
GetHistoryData
- Method:
GET
- HTTP request:
/farm/gethistory
- Parameters:
- time_from: text datetime
- time_to: text datetime
- Description: get points in a time range(if no points in this range, return nearest 20 points)
- Return
- Success
- data:
- longtitude: text number ±xxx.xxxx
- latitude: text numer ±xx.xxxx
- moisture: text number ±xxx.x
- transpiration: text number ±xxx.xx
- air_temp: text number ±xxx.x
- leaf_temp: text number ±xxx.x
- humidity: text number ±xxx.x
- datetime: text datetime
- photo: file picture
- data:
- Failed
- Fail: GetHistoryData
- Success
- Method:
-
GetImportantData
- Method:
GET
- HTTP request:
/farm/getimpodata
- Parameters:
- Description: get recent issues points
- Return
- Success
- longtitude: text number ±xxx.xxxx
- latitude: text numer ±xx.xxxx
- moisture: text number ±xxx.x
- transpiration: text number ±xxx.xx
- air_temp: text number ±xxx.x
- leaf_temp: text number ±xxx.x
- humidity: text number ±xxx.x
- datetime: text datetime
- photo: file picture
- Failed
- Fail: GetImportantData
- Success
- Method:
-
GetHeatMap
- Method:
GET
- Http request:
/farm/getheatmap
- Parameters:
- type: text 'moisture' or 'transpiration'
- Description: generate heat map data
- Return
- Suncess
- max-x: text numer ±xx.xxxx max latitude
- min-x: text numer ±xx.xxxx min latitdue
- max-y: text number ±xxx.xxxx max longtitude
- min-y: text number ±xxx.xxxx min longtitude
- max_z: text number ±xxx.x max soil moisture or transpiration
- max_z: text number ±xxx.x max soil moisture or transpiration
- all-image: two dimentional array represents interpolated value of soil moisture or transpiration
- Failed
- Fail: GetHeatMap
- Suncess
- Method: