|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.layer.shape.ShapeFileCrop
public class ShapeFileCrop
Class that supports cropping of ESRI Shapefiles with a simple bounding box. Does not yet update the .shx or .dbf files.
Usage:
java com.bbn.openmap.layer.shape.ShapeFileCrop -ul lat,lon -lr lat,lon -i srcShapeFile -o destShapeFile
Crops the srcShapeFile, dumps the output into destShapeFile.
Note that this does simple rejection of entities based on their bounding
boxes.
A better scheme (unimplemented) would be to actually crop the line
segments.
Field Summary | |
---|---|
ShapeFile |
sfin
Input ShapeFile object. |
ShapeFile |
sfout
Output ShapeFile object. |
Constructor Summary | |
---|---|
ShapeFileCrop(java.lang.String namein,
java.lang.String nameout)
Construct a ShapeFileCrop object from a pair of file names. |
Method Summary | |
---|---|
void |
cropShapeFile()
Read the input ShapeFile object, and apply cropping rules to
the read entities. |
static void |
main(java.lang.String[] args)
The driver for the command line interface. |
static void |
usage()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public ShapeFile sfin
public ShapeFile sfout
Constructor Detail |
---|
public ShapeFileCrop(java.lang.String namein, java.lang.String nameout) throws java.io.IOException
ShapeFileCrop
object from a pair of file names.
java.io.IOException
- if something goes wrong opening or reading the file.Method Detail |
---|
public void cropShapeFile() throws java.io.IOException
ShapeFile
object, and apply cropping rules to
the read entities. Writes the output ShapeFile
object, and
then invokes the ShapeFile
.verify method to fix the output
file header.
java.io.IOException
- if something goes wrong opening or reading the file.public static void usage()
public static void main(java.lang.String[] args) throws java.io.IOException
See the file documentation for usage.
args
- the command line arguments
java.io.IOException
- if something goes wrong reading or writing the file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |