Class ShapeFileManage



  • public class ShapeFileManage
    extends java.lang.Object
    Shape file read and write
    • Constructor Detail

      • ShapeFileManage

        public ShapeFileManage​()
    • 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.IOException
        java.io.FileNotFoundException
        java.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 path
        encoding - Encoding
        Returns:
        Vector layer
        Throws:
        java.io.IOException
        java.io.FileNotFoundException
        java.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 name
        encoding - 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.FileNotFoundException
        java.io.IOException
      • saveShapeFile

        public static boolean saveShapeFile​(java.lang.String shpfilepath,
                                            VectorLayer aLayer)
                                     throws java.io.IOException
        Save shape file
        Parameters:
        shpfilepath - Shape file path
        aLayer - 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.IOException
        Save shape file
        Parameters:
        shpfilepath - Shape file path
        aLayer - Vector layer
        encoding - Encoding
        Returns:
        Boolean
        Throws:
        java.io.IOException