Skip to content
Last updated

J/Contour

Release Notes

3.4 Release Notes

The following updates apply to JContour-OGL and now requires at least OpenGL 3.2

  • Added support for stacked cgContourShape objects in cgShapeListLayer or cgStackedPlotView.
  • Added option to disable/enable boundary smoothing when isoline smoothing is enabled using cgContourShape#setSmoothBoundary(boolean)
  • Color map now supports transparency
  • Updated label placement and filtering algorithm to improve accuracy and reduce memory footprint.
  • Isoline smoothing will automatically disable if the input file provided to cgContourShape#setGrid(cgContourGenericGrid) has over 50,000 triangles. cgContourShape#setSmoothIsolines(boolean) can be called after the contour is loaded to re-enable isoline smoothing but it is not recommended.

3.3 Release Notes

Small changes to allow JContour-OGL to use new labelling options.

3.2 Release Notes

  • Added new tutorial, LabelingOptions.
  • Added collision detection/removal for line labels.
  • Added option to orient labels in gradient direction. Previously they were oriented up (which looks bad for isolines that meander around the vertical).
  • Adding line smoothing
  • Added ability of label letters to closely track the contour lines.
  • Changed enum cgContourLabelsDirection.DEFAULT to cgContourLabelsDirection.TOWARDS_TOP_OF_PLOT

Details of the API changes can be found in JContour_32changes.txt.

3.1 Release Notes

For the 3.1 release, J/Contour moved up to JDK 5, and all collections were generified. Many improvements were made to the printing, see the J/CarnacPro release notes. Additionally, the new print to scale feature was completed in this release. This necessitated a change in the requirements that applications must follow in order for printing to work properly.

We encourage customers with large data sets to use cells like the ContourDataSource tutorial (implements the interface cgContourDataSource). Memory consumption is much lower when cells are used . For example, with a grid size of 900, when using cells the memory consumption is 95 MB, but without cells the memory consumption is 630 MB.

Changes for 3.1 are the following:

  • The editors use the JGoodies Forms layout manager which is in forms.jar. You will need to distribute this jar with your application if you want to use our editor dialogs.
  • Removed these deprecated methods: cgContourFaultList.modelToGridTransform, ContourFillVisual.transparentHoles and holeColor, FaultInputProcessor.modelToGridTransform, cgAbstractFillVisual.transparentHoles and holeColor.
  • Fixed bug that caused contour lines to disappear
  • Fixed two errors in the Contour editor
  • Fixed bug causing illegal argument exception.
  • Made gridding API easier to use by making the gridding classes smarter about how they manage state during construction of the grid.
  • Fixed a bug that caused the isolines to hit the level label.
  • Fixed a bug where the level label formats were not being changed.

3.1 Changes

<h1>API Comparison Comparing API changes in jcontour.jar from 3.0 to 3.1. <h2>Classes Changed

com.interactive.jcontour2d.datasource.cgContourDataSource
Methods Changed
  1. Changed query from: public abstract java.util.Iterator query(com.interactive.jcarnac2d.util.cgRect arg1, com.interactive.jcarnac2d.util.cgTransformation arg2) to: public abstract java.util.Iterator query(com.interactive.jcarnac2d.util.cgRect arg1, com.interactive.jcarnac2d.util.cgTransformation arg2) [Signature((Lcom/interactive/jcarnac2d/util/cgRect;Lcom/interactive/jcarnac2d/util/cgTransformation;)Ljava/util/Iterator<Ljava/lang/Integer;>;)]
  2. Changed loadGrid from: public abstract com.interactive.jcontour2d.grid.cgContourAbstractGrid loadGrid(java.util.Iterator arg1) to: public abstract com.interactive.jcontour2d.grid.cgContourAbstractGrid loadGrid(java.util.Iterator arg1) [Signature((Ljava/util/Iterator<Ljava/lang/Integer;>;)Lcom/interactive/jcontour2d/grid/cgContourAbstractGrid;)]
com.interactive.jcontour2d.fault.cgContourFaultList
Methods Deleted
  1. public void modelToGridTransform(com.interactive.jcarnac2d.util.cgTransformation tr) [Deprecated]
com.interactive.jcontour2d.gridder.AbstractGridder
Methods Changed
  1. Changed getMinZValue from: public double getMinZValue() to: public double getMinZValue() throws java.lang.IllegalStateException
  2. Changed getMaxZValue from: public double getMaxZValue() to: public double getMaxZValue() throws java.lang.IllegalStateException
com.interactive.jcontour2d.gridder.BSplineGridder
Methods Added
  1. public double getMinZValue() throws java.lang.IllegalStateException
  2. public double getMaxZValue() throws java.lang.IllegalStateException
com.interactive.jcontour2d.gridder.JBSGridding.JBSGridding
Methods Deleted
  1. public double[] JBSGridding(double[][] dd, com.interactive.jcontour2d.gridder.utilities.GriddingParameters parms, com.interactive.jcontour2d.gridder.utilities.MessageDisplayer m) throws java.lang.InterruptedException
Methods Added
  1. public double[] constructGrid(double[][] dd, com.interactive.jcontour2d.gridder.utilities.GriddingParameters parms, com.interactive.jcontour2d.gridder.utilities.MessageDisplayer m) throws java.lang.InterruptedException
com.interactive.jcontour2d.gridder.JMCGridding.JMCGridding
Methods Deleted
  1. public float[] JMCGridding(double[][] dd, double[][] ff, com.interactive.jcontour2d.gridder.utilities.GriddingParameters parms, com.interactive.jcontour2d.gridder.utilities.MessageDisplayer M, com.interactive.jcontour2d.gridder.utilities.TempFileManager T) throws java.lang.InterruptedException, java.lang.RuntimeException, java.lang.OutOfMemoryError
Methods Added
  1. public float[] constructGrid(double[][] dd, double[][] ff, com.interactive.jcontour2d.gridder.utilities.GriddingParameters parms, com.interactive.jcontour2d.gridder.utilities.MessageDisplayer M, com.interactive.jcontour2d.gridder.utilities.TempFileManager T) throws java.lang.InterruptedException, java.lang.RuntimeException, java.lang.OutOfMemoryError
com.interactive.jcontour2d.gridder.MinCurvatureGridder
Methods Added
  1. public double getMinZValue() throws java.lang.IllegalStateException
  2. public double getMaxZValue() throws java.lang.IllegalStateException
com.interactive.jcontour2d.gridder.utilities.XCordComparator
Methods Added
  1. public int compare(double[] o1, double[] o2)
Methods Changed
  1. Changed compare from: public int compare(Object o1, Object o2) to: public volatile synthetic int compare(Object x0, Object x1)
com.interactive.jcontour2d.internal.ContourDataProcessor
Methods Changed
  1. Changed getIsolines from: public java.util.Iterator getIsolines() to: public java.util.Iterator getIsolines() [Signature(()Ljava/util/Iterator<Lcom/interactive/jcontour2d/shape/cgIsoline;>;)]
com.interactive.jcontour2d.internal.ContourFillVisual
Methods Deleted
  1. public void transparentHoles(boolean t) [Deprecated]
  2. public boolean transparentHoles() [Deprecated]
  3. public java.awt.Color holeColor() [Deprecated]
  4. public void holeColor(java.awt.Color col) [Deprecated]
com.interactive.jcontour2d.internal.ContourLineVisual
Methods Added
  1. public void setVisible(boolean visible)
com.interactive.jcontour2d.internal.CustomArrayList
Methods Changed
  1. Changed add from: public void add(int index, Object element) to: public void add(int index, Object element) [Signature((ITE;)V)]
  2. Changed set from: public Object set(int index, Object element) to: public Object set(int index, Object element) [Signature((ITE;)TE;)]
  3. Changed <init> from: public void <init>(java.util.Collection c) to: public void <init>(java.util.Collection c) [Signature((Ljava/util/Collection<+TE;>;)V)]
  4. Changed remove from: public Object remove(int index) to: public Object remove(int index) [Signature((I)TE;)]
  5. Changed get from: public Object get(int index) to: public Object get(int index) [Signature((I)TE;)]
  6. Changed toArray from: public Object[] toArray(Object[] a) to: public Object[] toArray(Object[] a) [Signature(<T:Ljava/lang/Object;>([TT;)[TT;)]
  7. Changed add from: public boolean add(Object o) to: public boolean add(Object o) [Signature((TE;)Z)]
  8. Changed addAll from: public boolean addAll(int index, java.util.Collection c) to: public boolean addAll(int index, java.util.Collection c) [Signature((ILjava/util/Collection<+TE;>;)Z)]
  9. Changed addAll from: public boolean addAll(java.util.Collection c) to: public boolean addAll(java.util.Collection c) [Signature((Ljava/util/Collection<+TE;>;)Z)]
com.interactive.jcontour2d.internal.FaultInputProcessor
Methods Deleted
  1. public void modelToGridTransform(com.interactive.jcarnac2d.util.cgTransformation tr) [Deprecated]
com.interactive.jcontour2d.internal.OneGridDataSource
Methods Changed
  1. Changed query from: public java.util.Iterator query(com.interactive.jcarnac2d.util.cgRect model_limits, com.interactive.jcarnac2d.util.cgTransformation m2d) to: public java.util.Iterator query(com.interactive.jcarnac2d.util.cgRect model_limits, com.interactive.jcarnac2d.util.cgTransformation m2d) [Signature((Lcom/interactive/jcarnac2d/util/cgRect;Lcom/interactive/jcarnac2d/util/cgTransformation;)Ljava/util/Iterator<Ljava/lang/Integer;>;)]
  2. Changed loadGrid from: public com.interactive.jcontour2d.grid.cgContourAbstractGrid loadGrid(java.util.Iterator it) to: public com.interactive.jcontour2d.grid.cgContourAbstractGrid loadGrid(java.util.Iterator it) [Signature((Ljava/util/Iterator<Ljava/lang/Integer;>;)Lcom/interactive/jcontour2d/grid/cgContourAbstractGrid;)]
com.interactive.jcontour2d.internal.OneGridIterator
Methods Added
  1. public Integer next()
Methods Changed
  1. Changed next from: public Object next() to: public volatile synthetic Object next()
com.interactive.jcontour2d.internal.StlCompatibleVector
Methods Changed
  1. Changed push_back from: public void push_back(Object o) to: public void push_back(Object o) [Signature((TE;)V)]
  2. Changed back from: public Object back() to: public Object back() [Signature(()TE;)]
  3. Changed insert from: public void insert(int p, Object o) to: public void insert(int p, Object o) [Signature((ITE;)V)]
  4. Changed sort from: public void sort(int first, int last, java.util.Comparator c) to: public void sort(int first, int last, java.util.Comparator c) [Signature((IILjava/util/Comparator<-TE;>;)V)]
  5. Changed upperBound from: public int upperBound(int from, int to, Object value, java.util.Comparator c) to: public int upperBound(int from, int to, Object value, java.util.Comparator c) [Signature((IITE;Ljava/util/Comparator<-TE;>;)I)]
  6. Changed front from: public Object front() to: public Object front() [Signature(()TE;)]
  7. Changed find from: public int find(int from, int to, Object o) to: public int find(int from, int to, Object o) [Signature((IITE;)I)]
  8. Changed push_front from: public void push_front(Object o) to: public void push_front(Object o) [Signature((TE;)V)]
  9. Changed lowerBound from: public int lowerBound(int from, int to, Object value, java.util.Comparator c) to: public int lowerBound(int from, int to, Object value, java.util.Comparator c) [Signature((IITE;Ljava/util/Comparator<-TE;>;)I)]
com.interactive.jcontour2d.processor.cgContourDataProcessor
Methods Changed
  1. Changed getIsolines from: public abstract java.util.Iterator getIsolines() to: public abstract java.util.Iterator getIsolines() [Signature(()Ljava/util/Iterator<Lcom/interactive/jcontour2d/shape/cgIsoline;>;)]
com.interactive.jcontour2d.shape.cgContourShape
Methods Changed
  1. Changed getVisuals from: public java.util.List getVisuals() to: public java.util.List getVisuals() [Signature(()Ljava/util/List<Lcom/interactive/jcontour2d/visual/cgAbstractVisual;>;)]
  2. Changed getIsolines from: public java.util.Iterator getIsolines() to: public java.util.Iterator getIsolines() [Signature(()Ljava/util/Iterator<Lcom/interactive/jcontour2d/shape/cgIsoline;>;)]
com.interactive.jcontour2d.visual.cgAbstractFillVisual
Methods Deleted
  1. public abstract void transparentHoles(boolean arg1) [Deprecated]
  2. public abstract boolean transparentHoles() [Deprecated]
  3. public abstract java.awt.Color holeColor() [Deprecated]
  4. public abstract void holeColor(java.awt.Color arg1) [Deprecated]
com.interactive.jcontour2d.visual.cgVisualsFactory
Methods Changed
  1. Changed getInstance from: public static com.interactive.jcontour2d.visual.cgVisualsFactory getInstance() to: public static synchronized com.interactive.jcontour2d.visual.cgVisualsFactory getInstance()

3.0.0 Release Notes

<h1>API Changes in JContour API changes in jcontour.jar from 2.7.1 to 3.0.0. <h2>Classes Added

com.interactive.jcontour2d.shape.cgIsoline

<h2>Classes Changed

com.interactive.jcontour2d.grid.cgContourAbstractGrid
Methods Added
  1. public abstract double getValueAtModelPoint(java.awt.geom.Point2D arg1)
com.interactive.jcontour2d.grid.cgContourGrid
Fields Added
  1. public static final double EPSILON = 1.0E-6
Methods Added
  1. public double getValueAtModelPoint(java.awt.geom.Point2D modelPoint)
com.interactive.jcontour2d.grid.cgContourTriangularGrid
Methods Added
  1. public double getValueAtModelPoint(java.awt.geom.Point2D modelPoint)
com.interactive.jcontour2d.scale.cgScaleRange
Methods Added
  1. public Object clone()
  2. public void <init>(com.interactive.jcontour2d.scale.cgScaleRange that)
com.interactive.jcontour2d.shape.cgContourShape
Methods Added
  1. public void setSkipNearPoint(boolean val)
  2. public com.interactive.jcontour2d.datasource.cgContourDataSource getDataSource()
  3. public java.util.Iterator getIsolines()
com.interactive.jcontour2d.visual.cgAbstractLineVisual
Methods Added
  1. public void setLineName(String name)
  2. public String getLineName()

The API changes from 2.7.1 to 3.0.0 are rather small.

We added support for iterating over the contour isolines. The method getIsolines was added to cgContourShape).

We improved the way that isoline labels are rendered.

A key addition was to add support so that any component in the view can print to a PDF file.

We added a method, getValueAtModelPoint, to cgContourAbstractGrid) that easily gets the altitude value at a model point.

You can also enable an internal consistency checker by specifying the java property jcontour.internal.validation to "true". This can be helpful to explore the origins of a contouring failure.

The examples now conform to the Sun recommended practice of constructing the GUI on the event thread.

We added code to the tutorial ContourShape to cause the altitude values to be more regular (use fewer digits). That code can be found with the comment:

/***************************************************************************
 *
 * Rationalize the range of heights/depths so that we get simpler numbers
 * in the display
 *
 **************************************************************************/

<h3>Bug Fixes

  • Fixed a problem with the color map when changing the number of contour levels. If you shrink the number of contour levels to 1, and then increase the number of levels to greater than one, the color map gets messed up.
  • Resolved a problem where after setting contour levels 1 and then reset it to another value it gives the wrong contour.
  • The colormap will now wrap or stretch.

2.7.1 Release Notes

If you migrate code from 2.6 to 2.7, you'll need to add code like shown below. We've added it at the end of the method that reads the contour data and creates the grid. For example, you can look at the readGridData method in the ContourEditor tutorial.

cgRect gridSpace = new cgRect(0, 0, xSize - 1, ySize - 1);
      cgTransformation gridToModel = new cgTransformation(gridSpace,
              _modelSpace);
      grid.setGridToModel(gridToModel);

<h3>Demos

  • Added new gridder demo, demos/JContour/gridderdemo that demonstrates the new gridding capabilities.
  • The demos use the new method FileFinder.findPath in the util package to allow them to run with more flexibility in the current working directory. Previously the demos would only run with a single specific current working directory. Now they will run with the current working directory set either to the toolkit installed root, or any directory below that.
  • Added a document that shows how to run the examples.

<h3>Tutorials

  • Added a tutorial, ContourTriangular to demonstrate triangular grids.
  • Added a tutorial, ContourDataSource to demonstrate the datasource package.

<h3>Functionality

<h4>Added Functionality

  • Added a new gridder package with the ability to construct grids from point data (altitude values defined on random points).
  • Added triangular grids.
  • Added data cells in a new datasource package so that the entire grid file does not need to be in memory at one time
  • Some method names were rationalized to standard java form.

<h4>Changed Functionality

  • Created grid to model mapping for triangle grid data to fix the contour labeling bug.
  • Added APIs for setting skip near point flag in contour data processor to overcome the discontinue of contour lines generated by large number of small triangle grids.
  • com.interactive.jcontour2d.grid.cgContourGrid
    • now derives from cgContourGenericGrid
    • new methods setBorders, getBorders,getGridToModel, setGridToModel, and getModelLimits
    • renamed buildNet to buildTriangleNet
    • renamed getBuildRange() to getRange()
  • Added new classes cgContourAbstractGrid, cgContourGenericGrid, cgContourTriangularGrid, and HoleValueSet in the package com.interactive.jcontour2d.grid
  • Added new package gridder, and new classes for gridding.
  • com.interactive.jcontour2d.processor.cgContourDataProcessor
    • get and setGrid() changed to get and setDataSource()
    • removed build()
    • added n_areas() preBuild(), postBuild(), buildArea(), isosourcesToIsolines(), and clearArea()
  • com.interactive.jcontour2d.shape.cgContourShape
    • changed grid_to_model(cgTransformation) to setGridToModel and cgTransformation grid_to_model() to getGridToModel
    • added currentRenderingArea()
    • get*Visual now return new abstract visual types
    • get and setGrid now manipulate a cgContourGenericGrid
    • added setDataSource
  • com.interactive.jcontour2d.visual.cgAbstractVisual
    • render arguments changed from (cgShapeRenderer,cgRect,cgGridRange) to (cgShapeRenderer,cgRect)
  • com.interactive.jcontour2d.visual.cgVisualsFactory
    • added getBorderVisual()

<h4>Deprecated Functionality

  • src.com.interactive.jcontour2d.fault.cgContourFaultList.java
    • modelToGridTransform( cgTransformation tr ) - not needed now
  • src.com.interactive.jcontour2d.internal.FaultInputProcessor.java
    • modelToGridTransform( cgTransformation tr ) - not needed now
  • src.com.interactive.jcontour2d.visual.cgAbstractFillVisual.java x4
    • transparentHoles( boolean t ) - Now holes are always transparent
    • transparentHoles() - Now holes are always transparent
    • holeColor( Color col ) - Now holes are always transparent
    • holeColor() - Now holes are always transparent

2.6 Release Notes