public class PRJUtil extends Object
| Constructor and Description |
|---|
PRJUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getSRID(File prjFile)
Return the SRID value stored in a prj file
If the the prj file
- is null,
- is empty
then a default srid equals to 0 is added.
|
static int |
getValidSRID(Connection connection,
File prjFile)
Get a valid SRID value from a prj file.
|
static boolean |
isSRIDValid(int srid,
Connection connection)
This method checks if a SRID value is valid according a list of SRID's
avalaible on spatial_ref table of the datababase.
|
static void |
writePRJ(Connection connection,
int srid,
File fileName)
Write a prj file according a given SRID code.
|
static void |
writePRJ(Connection connection,
org.h2gis.utilities.TableLocation location,
String geomField,
File fileName)
Write a prj file according the SRID code of an input table
|
public static int getSRID(File prjFile) throws IOException
prjFile - IOExceptionpublic static int getValidSRID(Connection connection, File prjFile) throws SQLException, IOException
connection - prjFile - SQLExceptionIOExceptionpublic static void writePRJ(Connection connection, org.h2gis.utilities.TableLocation location, String geomField, File fileName) throws SQLException, FileNotFoundException
connection - database connectionlocation - input table namegeomField - geometry field namefileName - path of the prj fileSQLExceptionFileNotFoundExceptionpublic static void writePRJ(Connection connection, int srid, File fileName) throws SQLException, FileNotFoundException
connection - database connectionsrid - srid codefileName - path of the prj fileSQLExceptionFileNotFoundExceptionpublic static boolean isSRIDValid(int srid,
Connection connection)
throws SQLException
srid - connection - SQLExceptionCopyright © 2019 CNRS. All rights reserved.