Package org.meteoinfo.data.mapdata
Class ShapeFileManage
- java.lang.Object
-
- org.meteoinfo.data.mapdata.ShapeFileManage
-
public class ShapeFileManage extends java.lang.ObjectShape file read and write
-
-
Constructor Summary
Constructors Constructor Description ShapeFileManage()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AttributeTableloadDbfFile(java.lang.String shpFileName, java.lang.String encoding)Load DBF data filestatic ProjectionInfoloadProjFile(java.io.File projFile)Load projection filestatic VectorLayerloadShapeFile(java.lang.String shpfilepath)Load shape filestatic VectorLayerloadShapeFile(java.lang.String shpfilepath, java.lang.String encoding)Load shape filestatic booleansaveShapeFile(java.lang.String shpfilepath, VectorLayer aLayer)Save shape filestatic booleansaveShapeFile(java.lang.String shpfilepath, VectorLayer aLayer, java.lang.String encoding)Save shape file
-
-
-
Method Detail
-
loadShapeFile
public static VectorLayer loadShapeFile(java.lang.String shpfilepath) throws java.io.IOException, java.io.FileNotFoundException, java.lang.Exception
Load shape file- Parameters:
shpfilepath- Shape file path- Returns:
- Vector layer
- Throws:
java.io.IOExceptionjava.io.FileNotFoundExceptionjava.lang.Exception
-
loadShapeFile
public static VectorLayer loadShapeFile(java.lang.String shpfilepath, java.lang.String encoding) throws java.io.IOException, java.io.FileNotFoundException, java.lang.Exception
Load shape file- Parameters:
shpfilepath- Shape file pathencoding- Encoding- Returns:
- Vector layer
- Throws:
java.io.IOExceptionjava.io.FileNotFoundExceptionjava.lang.Exception
-
loadDbfFile
public static AttributeTable loadDbfFile(java.lang.String shpFileName, java.lang.String encoding) throws java.lang.Exception
Load DBF data file- Parameters:
shpFileName- Shape file nameencoding- Encoding- Returns:
- Attribute table
- Throws:
java.lang.Exception
-
loadProjFile
public static ProjectionInfo loadProjFile(java.io.File projFile) throws java.io.FileNotFoundException, java.io.IOException
Load projection file- Parameters:
projFile- Projection file- Returns:
- Projection infomation
- Throws:
java.io.FileNotFoundExceptionjava.io.IOException
-
saveShapeFile
public static boolean saveShapeFile(java.lang.String shpfilepath, VectorLayer aLayer) throws java.io.IOExceptionSave shape file- Parameters:
shpfilepath- Shape file pathaLayer- Vector layer- Returns:
- Boolean
- Throws:
java.io.IOException
-
saveShapeFile
public static boolean saveShapeFile(java.lang.String shpfilepath, VectorLayer aLayer, java.lang.String encoding) throws java.io.IOExceptionSave shape file- Parameters:
shpfilepath- Shape file pathaLayer- Vector layerencoding- Encoding- Returns:
- Boolean
- Throws:
java.io.IOException
-
-