addDefaultSpatialReferences method

void addDefaultSpatialReferences()

Implementation

void addDefaultSpatialReferences() {
  try {
    addCRS(-1, "Undefined cartesian SRS", "NONE", -1, "undefined",
        "undefined cartesian coordinate reference system");
    addCRS(0, "Undefined geographic SRS", "NONE", 0, "undefined",
        "undefined geographic coordinate reference system");
    addCRS(
        4326,
        "WGS 84 geodetic",
        "EPSG",
        4326,
        "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\"," +
            "6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]]," +
            "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433," +
            "AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]",
        "longitude/latitude coordinates in decimal degrees on the WGS 84 spheroid");
    addCRS(
        3857,
        "WGS 84 Pseudo-Mercator",
        "EPSG",
        4326,
        "PROJCS[\"WGS 84 / Pseudo-Mercator\", \n" +
            "  GEOGCS[\"WGS 84\", \n" +
            "    DATUM[\"World Geodetic System 1984\", \n" +
            "      SPHEROID[\"WGS 84\", 6378137.0, 298.257223563, AUTHORITY[\"EPSG\",\"7030\"]], \n" +
            "      AUTHORITY[\"EPSG\",\"6326\"]], \n" +
            "    PRIMEM[\"Greenwich\", 0.0, AUTHORITY[\"EPSG\",\"8901\"]], \n" +
            "    UNIT[\"degree\", 0.017453292519943295], \n" +
            "    AXIS[\"Geodetic longitude\", EAST], \n" +
            "    AXIS[\"Geodetic latitude\", NORTH], \n" +
            "    AUTHORITY[\"EPSG\",\"4326\"]], \n" +
            "  PROJECTION[\"Popular Visualisation Pseudo Mercator\", AUTHORITY[\"EPSG\",\"1024\"]], \n" +
            "  PARAMETER[\"semi-minor axis\", 6378137.0], \n" +
            "  PARAMETER[\"Latitude of false origin\", 0.0], \n" +
            "  PARAMETER[\"Longitude of natural origin\", 0.0], \n" +
            "  PARAMETER[\"Scale factor at natural origin\", 1.0], \n" +
            "  PARAMETER[\"False easting\", 0.0], \n" +
            "  PARAMETER[\"False northing\", 0.0], \n" +
            "  UNIT[\"m\", 1.0], \n" +
            "  AXIS[\"Easting\", EAST], \n" +
            "  AXIS[\"Northing\", NORTH], \n" +
            "  AUTHORITY[\"EPSG\",\"3857\"]]",
        "WGS 84 Pseudo-Mercator, often referred to as Webmercator.");
  } catch (ex) {
    throw new SQLException(
        "Unable to add default spatial references: ${ex.toString()}");
  }
}