String prjString = readPRJFile(prjFile); if (!prjString.isEmpty()) { Map<String, String> p = parser.getParameters(prjString); String authorityWithCode = p.get(PrjKeyParameters.REFNAME); if (authorityWithCode != null) {
String prjString = readPRJFile(prjFile); if (!prjString.isEmpty()) { Map<String, String> p = parser.getParameters(prjString); String authorityWithCode = p.get(PrjKeyParameters.REFNAME); if (authorityWithCode != null) {
String prjString = readPRJFile(prjFile); if (!prjString.isEmpty()) { Map<String, String> p = parser.getParameters(prjString); String authorityWithCode = p.get(PrjKeyParameters.REFNAME); if (authorityWithCode != null) {
String prjString = readPRJFile(prjFile); if(!prjString.isEmpty()){ Map<String, String> p = parser.getParameters(prjString); String authorityWithCode = p.get(PrjKeyParameters.REFNAME); if (authorityWithCode != null) {
/** * Creates a {@link CoordinateReferenceSystem} defined by an OGC WKT String * (PRJ). * * @param prjString the OGC WKT String defining the CRS */ public CoordinateReferenceSystem createFromPrj(String prjString) throws CRSException { PrjParser p = new PrjParser(); Map<String, String> prjParameters = p.getParameters(prjString); String name = prjParameters.remove(PrjKeyParameters.NAME); String refname = prjParameters.remove(PrjKeyParameters.REFNAME); if (refname != null) { String[] authorityNameWithKey = refname.split(":"); return CRSHelper.createCoordinateReferenceSystem(new Identifier(authorityNameWithKey[0], authorityNameWithKey[1], name), prjParameters); } else { return CRSHelper.createCoordinateReferenceSystem(new Identifier(CoordinateReferenceSystem.class, name), prjParameters); } }