* @param graphics OMGraphics from VPF database to write to shape
* file.
*/
public void writeShapeFile(String shapeFileName, OMGraphicList graphics) {
try {
ShapeFile s = new ShapeFile(shapeFileName);
int nGraphics = graphics.size();
if (nGraphics > 0) {
OMGraphic omg = graphics.getOMGraphicAt(0);
if ((omg instanceof OMPoly)
&& (omg.getRenderType() == OMGraphic.RENDERTYPE_LATLON)) {
int shapeType = ((OMPoly) omg).isPolygon() ? ShapeUtils.SHAPE_TYPE_POLYGON
: ShapeUtils.SHAPE_TYPE_ARC;
System.out.println("shapeType=" + shapeType);
s.setShapeType(shapeType);
}
}
System.out.println(nGraphics + " candidates.");