A Java library for rendering 2D Euclidean spatial data using ccg-v2d for vector (point, line, polygon) data and ccg-grids for raster data.
Visualising geometry helps develop ccg-v2d. The work in 2D is helping develop 3D geometry libraries: ccg-v3d and ccg-r3d. Some example static renderings of data are shown below.
GSHHS low resolution land/sea polygons, 825 x 2000:
Three rotated overlapping large triangles (one colour for the triangle and a different colour for each respective edge):
Multiple small rotated triangles some overlapping with their circumcircle outlines drawn in white (one colour for all triangles and a different colour for each respective edge:
Triangle rotated 48 times with increasing angle (the last triangle draw has just one colour for it's edge):
Triangle rotated a bit, then the result rotated a bit - 48 times (the last triangle has just one colour for it's edge):
A triangle on a couple of randomly coloured grids (one grid underlies the other, the top grid is located in the upper right of the image):
Two rotated triangles with a two triangle intersection:
Two rotated triangles with a four triangle intersection:
Polygon with a polygon internal hole. The external edge of the polygon is coloured red and the edge of the hole is coloured blue:
GSHHS land polygons
The geography data come in five resolutions:
- full resolution: Original (full) data resolution.
- high resolution: About 80 % reduction in size and quality.
- intermediate resolution: Another ~80 % reduction.
- low resolution: Another ~80 % reduction.
- crude resolution: Another ~80 % reduction.
Heirarchy ignored revealing the convex hulls with darker shade for edges:
Without some of antarctica revealing holes:
165 x 400:
660 x 1600:
825 x 2000:
45 x 42:
90 x 84:
150 x 140:
150 x 140:
160 x 212
160 x 212
- Java SE 21
- Mainly ccg-v2d for vectors and ccg-grids for rasters. Both of thesehave few light weight dependencies.
- Please see the POM for details.
- Calculate and show some example polygon-polygon intersections.
- Create some animations with geometries moving relative to others.
- Generate some more example renderings of geographical data:
- Global Self-Consistent Hierarchical High-Resolution Shoreline (GSHHS) data
- Surface elevation
- Land cover
- Temperature
- Rainfall
- National boundaries and human population
- Make a versioned release on Maven Central.
- Investigate ways to speed up rendering.
- Community development:
- Raise awareness
- Develop use cases
- Reach out to developers of (GMT, Apache SIS, JTS).
- Thanks for thinking about this.
- For a collaborative project, there should be a Code of Conduct and Contributor Guide based on something like this: Open Source Guide
- Meanwhile if you want instructions or there is an issue, please report this in the usual way :)
- APACHE LICENSE, VERSION 2.0
- Other licences are possible!
- The University of Leeds has indirectly supported this work by employing me over the years and encouraging me to develop the skills necessary to produce this library.
- Thank you Eric for the BigMath library.