Tabnine Logo
RegistryException.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.cts.registry.RegistryException
constructor

Best Java code snippets using org.cts.registry.RegistryException.<init> (Showing top 20 results out of 315)

origin: org.orbisgis/cts

/**
 * Return the registry name and the code in a string array.
 *
 * @param authorityAndSrid a string following the pattern "name:code"
 * @return an array of two strings (ex. {"EPSG", "4326"})
 * @throws RegistryException
 */
public String[] splitRegistryNameAndCode(String authorityAndSrid) throws RegistryException {
  String[] registryAndCode = authorityAndSrid.split(":");
  if (registryAndCode.length == 2) {
    return registryAndCode;
  } else {
    throw new RegistryException("The registry pattern '" + authorityAndSrid + "' is not supported");
  }
}
origin: org.orbisgis/cts

  @Override
  public Set<String> getSupportedCodes() throws RegistryException {
    try {
      return projParser.getSupportedCodes(ESRI_REGEX);
    } catch (IOException ex) {
      throw new RegistryException("Cannot load the ESRI registry", ex);
    }
  }
}
origin: org.orbisgis/h2gis-functions

@Override
public Set<String> getSupportedCodes() throws RegistryException {
  Statement st;
  try {
    st = connection.createStatement();
    ResultSet rs = st.executeQuery("SELECT srid from SPATIAL_REF_SYS;");
    Set<String> codes = new HashSet<String>();
    while (rs.next()) {
      codes.add(rs.getString(1));
    }
    st.close();
    return codes;
  } catch (SQLException ex) {
    throw new RegistryException("Cannot load the EPSG registry", ex);
  }
}
origin: org.orbisgis/cts

@Override
public Map<String, String> getParameters(String code) throws RegistryException {
  try {
    Map<String, String> crsParameters = projParser.readParameters(code, NAD83_REGEX);
    return crsParameters;
  } catch (IOException ex) {
    throw new RegistryException("Cannot load the NAD83 registry", ex);
  }
}
origin: org.orbisgis/cts

  @Override
  public Set<String> getSupportedCodes() throws RegistryException {
    try {
      return projParser.getSupportedCodes(IGNF_REGEX);
    } catch (IOException ex) {
      throw new RegistryException("Cannot load the IGNF registry", ex);
    }
  }
}
origin: org.orbisgis/cts

@Override
public Map<String, String> getParameters(String code) throws RegistryException {
  try {
    Map<String, String> crsParameters = projParser.readParameters(code, NAD27_REGEX);
    return crsParameters;
  } catch (IOException ex) {
    throw new RegistryException("Cannot load the NAD27 registry", ex);
  }
}
origin: org.orbisgis/cts

  @Override
  public Set<String> getSupportedCodes() throws RegistryException {
    try {
      return projParser.getSupportedCodes(NAD27_REGEX);
    } catch (IOException ex) {
      throw new RegistryException("Cannot load the NAD27 registry", ex);
    }
  }
}
origin: org.orbisgis/cts

  @Override
  public Set<String> getSupportedCodes() throws RegistryException {
    try {
      return projParser.getSupportedCodes(NAD83_REGEX);
    } catch (IOException ex) {
      throw new RegistryException("Cannot load the NAD83 registry", ex);
    }
  }
}
origin: org.orbisgis/cts

@Override
public Map<String, String> getParameters(String code) throws RegistryException {
  try {
    Map<String, String> crsParameters = projParser.readParameters(code, IGNF_REGEX);
    return crsParameters;
  } catch (IOException ex) {
    throw new RegistryException("Cannot load the IGNF registry", ex);
  }
}
origin: org.orbisgis/cts

  @Override
  public Set<String> getSupportedCodes() throws RegistryException {
    try {
      return projParser.getSupportedCodes(WORLD_REGEX);
    } catch (IOException ex) {
      throw new RegistryException("Cannot load the world registry", ex);
    }
  }
}
origin: org.orbisgis/cts

  @Override
  public Set<String> getSupportedCodes() throws RegistryException {
    try {
      return projParser.getSupportedCodes(EPSG_REGEX);
    } catch (IOException ex) {
      throw new RegistryException("Cannot load the EPSG registry", ex);
    }
  }
}
origin: org.orbisgis/cts

@Override
public Map<String, String> getParameters(String code) throws RegistryException {
  try {
    Map<String, String> crsParameters = projParser.readParameters(code, ESRI_REGEX);
    return crsParameters;
  } catch (IOException ex) {
    throw new RegistryException("Cannot load the ESRI registry", ex);
  }
}
origin: org.orbisgis/cts

@Override
public Map<String, String> getParameters(String code) throws RegistryException {
  try {
    Map<String, String> crsParameters = projParser.readParameters(code, WORLD_REGEX);
    return crsParameters;
  } catch (IOException ex) {
    throw new RegistryException("Cannot load the world registry", ex);
  }
}
origin: org.orbisgis/cts

@Override
public Map<String, String> getParameters(String code) throws RegistryException {
  try {
    Map<String, String> crsParameters = projParser.readParameters(code, EPSG_REGEX);
    return crsParameters;
  } catch (IOException ex) {
    throw new RegistryException("Cannot load the EPSG registry", ex);
  }
}
origin: org.orbisgis/h2spatial

@Override
public Set<String> getSupportedCodes() throws RegistryException {
  Statement st;
  try {
    st = connection.createStatement();
    ResultSet rs = st.executeQuery("SELECT srid from SPATIAL_REF_SYS;");
    Set<String> codes = new HashSet<String>();
    while (rs.next()) {
      codes.add(rs.getString(1));
    }
    st.close();
    return codes;
  } catch (SQLException ex) {
    throw new RegistryException("Cannot load the EPSG registry", ex);
  }
}
origin: org.orbisgis/h2gis

@Override
public Set<String> getSupportedCodes() throws RegistryException {
  Statement st;
  try {
    st = connection.createStatement();
    ResultSet rs = st.executeQuery("SELECT srid from SPATIAL_REF_SYS;");
    Set<String> codes = new HashSet<String>();
    while (rs.next()) {
      codes.add(rs.getString(1));
    }
    st.close();
    return codes;
  } catch (SQLException ex) {
    throw new RegistryException("Cannot load the EPSG registry", ex);
  }
}
origin: orbisgis/h2gis

@Override
public Set<String> getSupportedCodes() throws RegistryException {
  Statement st;
  try {
    st = connection.createStatement();
    ResultSet rs = st.executeQuery("SELECT srid from SPATIAL_REF_SYS;");
    Set<String> codes = new HashSet<String>();
    while (rs.next()) {
      codes.add(rs.getString(1));
    }
    st.close();
    return codes;
  } catch (SQLException ex) {
    throw new RegistryException("Cannot load the EPSG registry", ex);
  }
}
origin: org.orbisgis/cts

/**
 * Check if the registry name (ie EPSG, IGNF...) is supported.
 *
 * @param registryName (ex : ESPG, IGNF, ESRI)
 */
public boolean isRegistrySupported(String registryName) throws RegistryException {
  if (getRegistryManager().contains(registryName.toLowerCase())) {
    return true;
  } else {
    throw new RegistryException("Registry '" + registryName + "' is not supported");
  }
}
origin: org.orbisgis/h2spatial

throw new RegistryException("Cannot obtain the CRS parameters", ex);
origin: org.orbisgis/cts

public CoordinateReferenceSystem getCoordinateReferenceSystem(Identifier identifier) throws RegistryException, CRSException {
  Map<String,String> params = getParameters(identifier.getAuthorityKey());
  if (!identifier.getAuthorityName().equalsIgnoreCase(getRegistryName())) {
    throw new RegistryException("CRS code '" + identifier.getCode() +
        "' does not match this registry name : " + getRegistryName());
  }
  if (params == null) {
    throw new CRSException("Registry '" + getRegistryName() + "' contains no parameter for " + identifier);
  }
  // try to set a name from params to the identifier if identifier name is empty
  if (identifier.getName() == null || identifier.getName().isEmpty()) {
    String title = params.get(ProjKeyParameters.title);
    if (title != null && !title.isEmpty()) {
      identifier = new Identifier(identifier.getAuthorityName(), identifier.getAuthorityKey(), title);
    }
  }
  return CRSHelper.createCoordinateReferenceSystem(identifier, params);
}
org.cts.registryRegistryException<init>

Javadoc

Build a new RegistryException from a message.

Popular methods of RegistryException

    Popular in Java

    • Running tasks concurrently on multiple threads
    • scheduleAtFixedRate (ScheduledExecutorService)
    • onRequestPermissionsResult (Fragment)
    • startActivity (Activity)
    • BlockingQueue (java.util.concurrent)
      A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
    • Semaphore (java.util.concurrent)
      A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
    • JFileChooser (javax.swing)
    • FileUtils (org.apache.commons.io)
      General file manipulation utilities. Facilities are provided in the following areas: * writing to a
    • Location (org.springframework.beans.factory.parsing)
      Class that models an arbitrary location in a Resource.Typically used to track the location of proble
    • SAXParseException (org.xml.sax)
      Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
    • Top Vim plugins
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now