Prajna's geographic package, prajna.geo, includes a number of classes and interfaces which provide a variety of geographic functions. They can be grouped into several categories.
The GeoShape classes provide a simple set of geographic shapes. They include simple vector-based drawing for geographic features. The shapes include GeoMarker for single geographic locations, such as a city or a site. GeoPolyline represents open polygonal line segments that can be used for features such as roads. Similarly, GeoPolygon can be used to display closed polygonal areas, such as continents or regions of a map.
The GeoBounds shape represents the bounds of a geographic region. It is essentially similar to a rectangle, specified in latitude and longitude.
GeoEllipse and GeoBearing are convenience shapes which represent an ellipse and line of bearing, respectively. They provide a simple way to construct these common geographic shapes.
The GeoMultiShape is a composite class which allows grouping of geographic shapes. This is particularly useful when multiple objects form one geographic entity. An example of this would be the state of Michigan, which requires multiple polygons to display.
GeoConvexHull is another advanced geographic shape. It uses a set of geographic coordinates, and creates a convex hull of those points. A convex hull is a convex shape which contains all of the points. Points can be added or removed from the GeoConvexHull, and the computed hull shape will update.
GeoShapes are organized in layers of geographic information. Each layer typically represents one type of geographic data, such as states, rivers, or airports. The GeoLayer class provides this functionality.
GeoReaders are classes which access various geographic data formats, reading the data and extracting geographic shapes from them. The geo package provides sample implementations of GeoReaders which read ESRI shapefiles and KML overlay files. The package also includes classes which can write various formats. Currently, only the KML format may be output.
The GeoLocator classes provide the ability to look up a geographic name and derive a geographic shape for the name. This is particularly useful when trying to identify geographic entities. However, GeoLocators are completely subject to their underlying data source, and therefore may not be perfectly accurate. Sample implementations using ESRI shape files, Google Maps, and the GeoNames web service are provided.
The GeoFilter classes provide a simple but useful function - filtering geographic points against a known geographic entity. This is particularly useful when trying to determine whether a particular point is inside or outside of a geographic area such as a country or region of interest.
The projection algorithms transform geographic coordinates into screen coordinates. They also provide the reverse transformation. The projection algorithms depend on a specified window size to project the points into. Therefore, projections are typically attached to geographic displays.
The GeoDisplay classes provide geographic displays, showing maps with various types of data. The GeoDisplay classes can support vector-based drawing, such as ESRI shape files. They can also support image-based rendering, such as Google Maps. They can also support hybrid map displays, allowing the display of ESRI shape files over a Google map, for instance.