Andrea,
Code snippets below show first thoughts for a Lines class API. They
imply a LineControl class that holds parameters and the following
Lines methods:
SimpleFeatureSource createLines( ReferencedEnvelope bounds,
LineControl ...controls );
SimpleFeatureSource createLines( ReferencedEnvelope bounds, double
vertexSpacing, LineControl ...controls );
// Ex 1:
// Create parallels: major at 10 deg intervals, min at 2 deg intervals
// with min parallel ordinate at min X of bounding envelope. Only rank
// order of levels is important - values are arbitrary
ReferencedEnvelope bounds = ...
features = Lines.createLines( bounds, Lines.createXControl(2, 10.0),
Lines.createXControl(1, 2.0) );
// Ex 2:
// Create parallels with densified lines
ReferencedEnvelope bounds = ...
double vertexSpacing = bounds.getSpan(1) / 20;
features = Lines.createLines( bounds, vertexSpacing,
Lines.createXControl(2, 10.0), Lines.createXControl(1, 2.0) );
// Ex 3:
// Create densified parallels and meridians
ReferencedBounds bounds = ...
double vertexSpacing = Math.min(bounds.getWidth(), bounds.getHeight()) / 20;
features = Lines.createLines( bounds, vertexSpacing,
Lines.createXControl(2, 10.0), Lines.createXControl(1, 2.0),
Lines.createYControl(2, 10.0), Lines.createYControl(1, 2.0) );
// Ex 4:
// Create densified meridians starting at a given minY ordinate
ReferencedBounds bounds = ...
double vertexSpacing = ...
features = Lines.createLines( bounds, vertexSpacing,
Lines.createYControl(1, 10.0, minY) );
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel