log.debug("This prj file is null. \n A default srid equals to 0 will be added."); } else { PrjParser parser = new PrjParser(); String prjString = readPRJFile(prjFile); if (!prjString.isEmpty()) {
log.warn("This prj file is null. \n A default srid equals to 0 will be added."); } else { PrjParser parser = new PrjParser(); String prjString = readPRJFile(prjFile); if (!prjString.isEmpty()) {
log.warn("This prj file is null. \n A default srid equals to 0 will be added."); } else { PrjParser parser = new PrjParser(); String prjString = readPRJFile(prjFile); if (!prjString.isEmpty()) {
log.warn("This shapefile has no prj. \n A default srid equals to 0 will be added."); } else { PrjParser parser = new PrjParser(); String prjString = readPRJFile(prjFile); if(!prjString.isEmpty()){
/** * 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); } }