The factory interfaces provided by GeoAPI are hard to use in isolation (they are even hard to collect a matched set in order to work on the same problem). The main advantage a "builder" has over a factory is that it does not have to be thread safe and can hold state in order to make your job easier.
@author Jody Garnett @source $URL$
Features include:
Examples of intended usage are:
GeometryBuilder gb = new GeometryBuilder(geomFact); LineString line = gb.linestring(1,2, 3,4); Polygon poly = gb.polygon(0,0, 0,1, 1,1, 1,0); Polygon box = gb.box(0,0, 1,1); Polygon hexagon = gb.circle(0,0, 1,1, 6); Polygon polyhole = gb.polygon(gb.linearring(0,0, 0,10, 10,10, 10,0), gb.linearring(1,1, 1,9, 9,9, 9,1))@author Martin Davis - OpenGeo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|