Geertjan's Blog

  • May 8, 2012

Leveraging AgroSense, GeoViewer, and Maven

Geertjan Wielenga
Product Manager

AgroSense is a Java open-source services platform for farm management. It looks like an extremely cool and well-designed app, on top of SwingX, GeoTools, the Flamingo Ribbon bar, the NetBeans Platform, and many other libraries. Click to enlarge the image to get a better view: 

As an open source project, the team is constantly looking for new developers to work with them, especially if you're interested in farm software. In fact, forget about creating your own farm software, just port your code to plugins for AgroSense. Come one, come all and join this truly useful Java project. (One simple way to join is to leave a message at the end of this blog entry and then you'll be contacted.)

The project is built via Maven. Here's the source structure in the IDE, from a Mercurial check out that I did today:

(Tushar Joshi from India should recognize part of the above project structure!) 

Artifacts from AgroSense are checked into Maven central, so parts of the above application can very easily be reused within your own Maven-based NetBeans Platform applications. For example, let's assume we want to reuse the mapping functionality from AgroSense, as provided by the "geoviewer" suite in the project structure above.

Here's what you need to do to achieve the above. 

1. Create a new Maven based NetBeans Platform application:

2. Give the application a name and other Maven properties:

3. Add these dependencies in the POM file of the NetBeans Platform application module:


4. Build and run the application and you should see this:

Note: An example of AgroSense API usage for the GeoViewer is included in the "examples" folder in the Mercurial repository:


I intend to discuss this example in an upcoming blog entry soon.

Join the discussion

Comments ( 5 )
  • Javier Ortiz Wednesday, May 9, 2012

    What are the differences/benefits of this one vs. OpenMap you discussed in a previous blog?

    I want to use this sort of components for my game application so each implementation can define their own map. Stuff like localize objects in the map and stuff like that.

    Any thoughts?

  • Timon Veenstra Friday, May 11, 2012

    The AgroSense geoviewer is basically the jxmap geoviewer (http://java.net/projects/swingx-ws) with extended functionality (layers). We needed to be able to draw custom geographical object on the map that did not come from a standard source (wms service, shapefile etc). None of the standard viewers provided this functionality, so we decided to build it ourselves. Of the available viewer jxmap was the easiest to extend.

    A farmers fields have polygons, a tractor has a point describing its location etc. All this data we only have available as domain objects and not as geo specific source.

    With the AgroSense geoviewer you can just build up your data tree like you would often do in a netbeans platform application, with nodes in a node tree. By letting your domain objects implement the Geographical interface, and putting them in the node's lookup, together with a layer object, you are able to display them on the map.

    The background map source is currently not configurable in the agrosense geoviewer, but since it is in jxmap, this can easily be provided. Setting up a map server with your own world map might be a challenge, but it has been done before (http://mapwow.com/).

  • Frantisek Friday, May 18, 2012

    Are you still looking for developers?

  • Geertjan Friday, May 18, 2012


  • guest Monday, April 7, 2014

    i want to join this project.

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.