|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.epfl.scapetoad.IOManager
public class IOManager
The input/output manager reads and writes all the files for our application.
Constructor Summary | |
---|---|
IOManager()
|
Method Summary | |
---|---|
static java.lang.String |
geometryToSvgPath(Geometry geom,
Envelope env,
double scaleFactor,
double minX,
double maxX,
double minY,
double maxY)
Converts a Geometry into a SVG path sequence. |
static Layer |
openShapefile()
Displays an open dialog and reads the shape file in. |
static Layer |
readShapefile(java.lang.String shapefile)
Reads the provided shape file and returns a Layer. |
static void |
saveShapefile(FeatureCollection fc)
Shows a save dialog and writes the Shapefile out. |
static void |
saveSvg(Layer[] lyrs)
Shows a save file dialog for exporting the layers into a SVG file. |
static void |
writeShapefile(FeatureCollection fc,
java.lang.String path)
Writes the provided Feature Collection into a Shape file. |
static void |
writeSvg(Layer[] lyrs,
java.lang.String path)
Writes the provided layers into a SVG file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IOManager()
Method Detail |
---|
public static Layer openShapefile()
public static Layer readShapefile(java.lang.String shapefile)
public static void saveShapefile(FeatureCollection fc)
public static void writeShapefile(FeatureCollection fc, java.lang.String path)
fc
- the FeatureCollection to write out.path
- the path of the .shp file.public static void saveSvg(Layer[] lyrs)
lyrs
- an array with the layers to include in the SVG file.public static void writeSvg(Layer[] lyrs, java.lang.String path)
lyrs
- an array with the layers to include in the SVG file.path
- the location of the SVG file to create.public static java.lang.String geometryToSvgPath(Geometry geom, Envelope env, double scaleFactor, double minX, double maxX, double minY, double maxY)
geom
- the Geometry to convert.env
- the Envelope we use for the coordinate conversion.minX,
- maxX, minY, maxY the maximum coordinates for the
SVG coordinates and corresponding to the Envelope env.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |