PostGIS and Agribotics
Gary Evans
Agriculture in Australia
Interest grew in Agribotics from my hobbies
where spatial awareness is very important:
Outline
 Agriculture in Australia
 Potential of RPASs in Agriculture
 Current capabilities (imaging)
 An example scenario that utilises PostgreSQL:
 JSON
 Import capabilities (Geospatial Data Abstraction Library)
 Vector Geometry functions
 Raster functions
Agriculture in Australia
 Australian farmers produce enough food to feed 80
million people
 93% of the domestic food supply is meet by
Australian farmers
 Export market is valued at $42 Billion per annum
 Agriculture and related services represent 12% of
Australia's GDP
 Significant new investment in this sector
Challenges
 Climate change resulting in unpredictable rainfall
 Falling/Unpredictable commodity prices
 Skill shortages
 Lower dollar resulting in higher cost of fertilisers and
farming machinery
 High wastage in the supply chain (estimated > 30%)
Common Direction
 Natural Resources
 Agriculture Within Society
 Competitiveness
 Innovation, Research, Development
Drones in Agriculture
 Use of Remotely Piloted Aircraft Systems (RPAS) is
not really new:
 Radio controlled target drones were used in the military in the
1930’s
 Electronic information gathering and dropping of propaganda
leaflets was utilised in the 1960’s
 The availability of hobby grade kits has accelerated
use of RPAS in commercial applications
Scout Aerial and Media
Drones in Agriculture
 Why RPAS in agriculture?
Drones in Agriculture
 Why RPAS in agriculture?
 Large and remote
 Largest = 23,677sq km 50th largest = 5,334 sq km
Drones in Agriculture
Types of Systems
 Fixed Wing
 Multirotor
Current Capabilities
 Data - Detailed information
 Sensor information
 Temperatures
 Moisture
 Co2
 Payloads
 Cameras
Current Capabilities
 Data:
 Flight plans
 Flight tracks
 Telemetry data
 Sensor/Imaging data:
• Obstacle mapping
• Yield estimates
• Ground cover profiling
• Temp/Pressure profiling
• Spore, pollen counts
• C02, ammonia sensing
• Data capture from ground sensors
• Water quality/survey
• Vegetation status
• Pest damage
• Dam/Drainage survey
• Topography
• Pathogen/weed tracking
• Wind/shear profiles
• Detassel assessment
Capabilities - Next
 Protection – Protecting crops from harm
 Precision herbicides, pesticides and fungicides
 Disease detection and tracking
 Identification of wildlife threats and thwarting them
 Birds
 Rabbits
 Insect/worm identification
Capabilities - Future
 Seeding and Harvesting
 Crop planting
 Feeding
 Harvesting
Why is PostgreSQL/PostGIS useful
 Organisation of lots of information
 Integrated toolset
 Flexibility and extensibility
A scenario
 Import a mission plan into PostgreSQL for future use
 Find stored mission plans that are within a distance
of where I need to collect data from on next trip
 Importing logged track, telemetry data, sensor data
and images after performing a survey flight
 Process a set of collected images to extract useful
data
 Identify and export waypoints of problem areas
requiring further investigation by agricultural
consultants
Flight Plans and Tracks
Flight Plans and Tracks
 Tracking information – GPS exchange format
Flight Plans and Tracks
 OGR2OGR
 -lco GEOMETRY_NAME – sets column name
 -lco LAUNDER – makes more PostgreSQL compatible
 -nln tablename – Sets the table name to be created
 -f “PostgreSQL” (or “TIGER” “ESRI Shapefile” “GML”
 OGRInfo
Imagery
 The combination of Drones and todays digital
camera is enabling smaller organisation to offer
NDVI services
 Much higher resolution
 Cloudy days aren’t so much an issue
 Reflected radiation doesn’t have to travel so far
(NIR-VIS)/(NIR+VIS)
Imagery
 Layers found on the back of healthy leaves reflect
higher levels of near infrared
NIR
NIR
Unhealthy
leaves
Healthy
leaves
Landsat Program
 Longest running program for acquiring satellite
imagery of the earth
 Landsat 1: Visible light (RGB) & near infrared
 Landsat 8: GeoTIFF with pixel size to 30 meters
NDVI Image
 Band values from -1 to 1
 High levels of reflected NIR closer to 1
 Low levels of reflected NIR closer to -1
 -1 to 0 normally non living material
 Colour coded image with legend is often the final
representation
Rasters
Landsat8 handbook
 Raster2pgsql
 Import single or multiple rasters
 Break up rasters
 Create thumbnails/overviews
 Gdal_translate
 Modify resolution
 Gdalwarp
 Modify spatial reference system
Index Accuracy
 Variations during the year…..
CanolaCorn
NDVI Image from a multi spectral camera
Image from a multi spectral camera
ndvi
CCDs in cameras
capture
frequencies up to
around 1300 nm
(Near Infrared)
(Channel 1) Red
(Channel 2) Blue
(Channel 3) Green
IR filter blocks
700nm upwards
Camera Modification
(Channel 1) NIR
(Channel 2) Blue
(Channel 3)
ndvi
(NIR-VIS)
(NIR+VIS)
NIR = Channel 1
VIS = Channel 2
Image processing
 Generate OrthoMosaic
Image Processing
Beyond NDVI
Map Algebra
 ST_MapAlgebra
 ST_Colormap
 ST_PixelAsPoint
 ST_Contains
 ST_Intersection
 ST_Histogram
 ST_AsJPEG
Summary
 Main capability of RPASs in Agriculture (imaging)
 Typical image processing
 Current features of PostgreSQL that are useful
 Next:
 How to capture and represent the data required to produce
useful results
 Automation of the process

Use Case: PostGIS and Agribotics

  • 1.
  • 2.
    Agriculture in Australia Interestgrew in Agribotics from my hobbies where spatial awareness is very important:
  • 3.
    Outline  Agriculture inAustralia  Potential of RPASs in Agriculture  Current capabilities (imaging)  An example scenario that utilises PostgreSQL:  JSON  Import capabilities (Geospatial Data Abstraction Library)  Vector Geometry functions  Raster functions
  • 4.
    Agriculture in Australia Australian farmers produce enough food to feed 80 million people  93% of the domestic food supply is meet by Australian farmers  Export market is valued at $42 Billion per annum  Agriculture and related services represent 12% of Australia's GDP  Significant new investment in this sector
  • 5.
    Challenges  Climate changeresulting in unpredictable rainfall  Falling/Unpredictable commodity prices  Skill shortages  Lower dollar resulting in higher cost of fertilisers and farming machinery  High wastage in the supply chain (estimated > 30%)
  • 6.
    Common Direction  NaturalResources  Agriculture Within Society  Competitiveness  Innovation, Research, Development
  • 7.
    Drones in Agriculture Use of Remotely Piloted Aircraft Systems (RPAS) is not really new:  Radio controlled target drones were used in the military in the 1930’s  Electronic information gathering and dropping of propaganda leaflets was utilised in the 1960’s  The availability of hobby grade kits has accelerated use of RPAS in commercial applications
  • 8.
  • 9.
    Drones in Agriculture Why RPAS in agriculture?
  • 10.
    Drones in Agriculture Why RPAS in agriculture?  Large and remote  Largest = 23,677sq km 50th largest = 5,334 sq km
  • 11.
  • 12.
    Types of Systems Fixed Wing  Multirotor
  • 13.
    Current Capabilities  Data- Detailed information  Sensor information  Temperatures  Moisture  Co2  Payloads  Cameras
  • 14.
    Current Capabilities  Data: Flight plans  Flight tracks  Telemetry data  Sensor/Imaging data: • Obstacle mapping • Yield estimates • Ground cover profiling • Temp/Pressure profiling • Spore, pollen counts • C02, ammonia sensing • Data capture from ground sensors • Water quality/survey • Vegetation status • Pest damage • Dam/Drainage survey • Topography • Pathogen/weed tracking • Wind/shear profiles • Detassel assessment
  • 15.
    Capabilities - Next Protection – Protecting crops from harm  Precision herbicides, pesticides and fungicides  Disease detection and tracking  Identification of wildlife threats and thwarting them  Birds  Rabbits  Insect/worm identification
  • 16.
    Capabilities - Future Seeding and Harvesting  Crop planting  Feeding  Harvesting
  • 17.
    Why is PostgreSQL/PostGISuseful  Organisation of lots of information  Integrated toolset  Flexibility and extensibility
  • 18.
    A scenario  Importa mission plan into PostgreSQL for future use  Find stored mission plans that are within a distance of where I need to collect data from on next trip  Importing logged track, telemetry data, sensor data and images after performing a survey flight  Process a set of collected images to extract useful data  Identify and export waypoints of problem areas requiring further investigation by agricultural consultants
  • 19.
  • 20.
    Flight Plans andTracks  Tracking information – GPS exchange format
  • 21.
    Flight Plans andTracks  OGR2OGR  -lco GEOMETRY_NAME – sets column name  -lco LAUNDER – makes more PostgreSQL compatible  -nln tablename – Sets the table name to be created  -f “PostgreSQL” (or “TIGER” “ESRI Shapefile” “GML”  OGRInfo
  • 22.
    Imagery  The combinationof Drones and todays digital camera is enabling smaller organisation to offer NDVI services  Much higher resolution  Cloudy days aren’t so much an issue  Reflected radiation doesn’t have to travel so far (NIR-VIS)/(NIR+VIS)
  • 23.
    Imagery  Layers foundon the back of healthy leaves reflect higher levels of near infrared NIR NIR Unhealthy leaves Healthy leaves
  • 24.
    Landsat Program  Longestrunning program for acquiring satellite imagery of the earth  Landsat 1: Visible light (RGB) & near infrared  Landsat 8: GeoTIFF with pixel size to 30 meters
  • 25.
    NDVI Image  Bandvalues from -1 to 1  High levels of reflected NIR closer to 1  Low levels of reflected NIR closer to -1  -1 to 0 normally non living material  Colour coded image with legend is often the final representation
  • 26.
    Rasters Landsat8 handbook  Raster2pgsql Import single or multiple rasters  Break up rasters  Create thumbnails/overviews  Gdal_translate  Modify resolution  Gdalwarp  Modify spatial reference system
  • 27.
    Index Accuracy  Variationsduring the year….. CanolaCorn
  • 28.
    NDVI Image froma multi spectral camera
  • 29.
    Image from amulti spectral camera
  • 30.
    ndvi CCDs in cameras capture frequenciesup to around 1300 nm (Near Infrared) (Channel 1) Red (Channel 2) Blue (Channel 3) Green IR filter blocks 700nm upwards
  • 31.
  • 32.
    (Channel 1) NIR (Channel2) Blue (Channel 3) ndvi (NIR-VIS) (NIR+VIS) NIR = Channel 1 VIS = Channel 2
  • 33.
  • 34.
  • 35.
  • 36.
    Map Algebra  ST_MapAlgebra ST_Colormap  ST_PixelAsPoint  ST_Contains  ST_Intersection  ST_Histogram  ST_AsJPEG
  • 37.
    Summary  Main capabilityof RPASs in Agriculture (imaging)  Typical image processing  Current features of PostgreSQL that are useful  Next:  How to capture and represent the data required to produce useful results  Automation of the process