Leveraging AgroSense, GeoViewer, and Maven

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:

<dependency>
    <groupId>nl.cloudfarming.client</groupId>
    <artifactId>geoviewer-api</artifactId>
    <version>1.0.24</version>
</dependency>
<dependency>
    <groupId>nl.cloudfarming.client</groupId>
    <artifactId>geoviewer-jxmap</artifactId>
    <version>1.0.24</version>
</dependency>

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:

http://java.net/projects/agrosense/sources/core/show

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

Comments:

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?

Posted by Javier Ortiz on May 09, 2012 at 11:48 AM PDT #

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/).

Posted by Timon Veenstra on May 11, 2012 at 01:02 AM PDT #

Are you still looking for developers?

Posted by Frantisek on May 18, 2012 at 05:13 AM PDT #

Yes!

Posted by Geertjan on May 18, 2012 at 06:23 AM PDT #

i want to join this project.

Posted by guest on April 07, 2014 at 12:41 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today