Class MapDataManage



  • public class MapDataManage
    extends java.lang.Object
    • Constructor Detail

      • MapDataManage

        public MapDataManage​()
    • Method Detail

      • canOpen

        public static MapDataType canOpen​(java.lang.String fileName)
                                   throws java.io.FileNotFoundException,
                                          java.io.IOException
        Can open or not as a map layer
        Parameters:
        fileName - File name
        Returns:
        MapDataType
        Throws:
        java.io.FileNotFoundException
        java.io.IOException
      • loadLayer

        public static MapLayer loadLayer​(java.lang.String aFile)
                                  throws java.io.IOException,
                                         java.io.FileNotFoundException,
                                         java.lang.Exception
        Load a layer from a file
        Parameters:
        aFile - The file path
        Returns:
        The layer
        Throws:
        java.io.IOException
        java.io.FileNotFoundException
        java.lang.Exception
      • loadLayer

        public static MapLayer loadLayer​(java.lang.String aFile,
                                         ProjectionInfo projInfo)
                                  throws java.io.IOException,
                                         java.io.FileNotFoundException,
                                         java.lang.Exception
        Load a layer from a file with a certain projection
        Parameters:
        aFile - The file name
        projInfo - The projection
        Returns:
        The layer
        Throws:
        java.io.IOException
        java.io.FileNotFoundException
        java.lang.Exception
      • readMapFile_ShapeFile

        public static VectorLayer readMapFile_ShapeFile​(java.lang.String aFile)
                                                 throws java.io.IOException,
                                                        java.io.FileNotFoundException,
                                                        java.lang.Exception
        Read shape file as map
        Parameters:
        aFile - File name
        Returns:
        Vector layer
        Throws:
        java.io.IOException
        java.io.FileNotFoundException
        java.lang.Exception
      • readMapFile_ShapeFile

        public static VectorLayer readMapFile_ShapeFile​(java.lang.String aFile,
                                                        java.lang.String encoding)
                                                 throws java.io.IOException,
                                                        java.io.FileNotFoundException,
                                                        java.lang.Exception
        Read shape file as map
        Parameters:
        aFile - File name
        encoding - Encoding
        Returns:
        Vector layer
        Throws:
        java.io.IOException
        java.io.FileNotFoundException
        java.lang.Exception
      • readMapFile_GrADS

        public static VectorLayer readMapFile_GrADS​(java.lang.String aFile)
                                             throws java.io.FileNotFoundException,
                                                    java.io.IOException,
                                                    java.lang.Exception
        Read GrADS map file
        Parameters:
        aFile - The file path
        Returns:
        The layer
        Throws:
        java.io.FileNotFoundException
        java.io.IOException
        java.lang.Exception
      • readImageFile

        public static ImageLayer readImageFile​(java.lang.String aFile)
                                        throws java.io.IOException
        Read image file
        Parameters:
        aFile - File path
        Returns:
        Image layer
        Throws:
        java.io.IOException
      • readGeoTiffFile

        public static RasterLayer readGeoTiffFile​(java.lang.String fileName)
        Create a raster layer from geotiff file
        Parameters:
        fileName - File path
        Returns:
        Raster layer
      • readBILFile

        public static RasterLayer readBILFile​(java.lang.String fileName)
        Read BIL file and create a raster layer
        Parameters:
        fileName - BIL file name
        Returns:
        Raster layer
      • readESRI_ASCII_GRID

        public static RasterLayer readESRI_ASCII_GRID​(java.lang.String fileName)
        Read ESRI ASCII grid file and create a raster layer
        Parameters:
        fileName - File name
        Returns:
        Raster layer
      • readSurfer_ASCII_GRID

        public static RasterLayer readSurfer_ASCII_GRID​(java.lang.String fileName)
        Read surfer ASCII grid file and create a raster layer
        Parameters:
        fileName - File name
        Returns:
        Raster layer
      • readMapFile_WMP

        public static VectorLayer readMapFile_WMP​(java.lang.String fileName)
                                           throws java.io.IOException,
                                                  java.lang.Exception
        Read WMP file
        Parameters:
        fileName - The file name
        Returns:
        Created vector layer
        Throws:
        java.io.IOException
        java.lang.Exception
      • writeMapFile_WMP

        public static void writeMapFile_WMP​(java.lang.String fileName,
                                            java.util.List<Shape> shapes)
        Write WMP file
        Parameters:
        fileName - The file name
        shapes - Shapes
      • writeProjFile

        public static void writeProjFile​(java.lang.String projFilePath,
                                         ProjectionInfo projInfo)
        Write projection file
        Parameters:
        projFilePath - Projection file path
        projInfo - Projection info