richiethom / Minigeo

Ultra-simple Java library for plotting geographical data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minigeo

Minigeo is a lightweight Java library that allows one to plot geographical data (namely lines between points determined by geographic coordinates — a latitude-longitude pair), using Universal Transverse Mercator (UTM) projections.

The display is done using a Swing JFrame. The user may pan and zoom with the mouse à la Google Maps (i.e. drag to pan, scroll to zoom).

It is especially useful for educators, as students can very easily use this library during practical sessions.

Mini tutorial

Using Minigeo is really straightforward:

  1. Create a map window:
MapWindow window = new MapWindow();
  1. Add segments to the window:
window.addSegment(
    new Segment(
        new Point(48, 2),
        new Point(45, -1),
        Color.RED));
...
  1. Make the window visible:
window.setVisible(true);

That's it.

Have a look at MinigeoDemo.java: it loads coordinates from a text file (france.poly) and draws a polygon (France's borders and coast lines) using Minigeo.

About

Ultra-simple Java library for plotting geographical data


Languages

Language:HTML 89.4%Language:Java 9.8%Language:CSS 0.8%