/** * Read the informations contains in a PARAMETER node and put it into the * set of parameters. * * @param ll the children of the PARAMETER node */ private void parseParameter(List<PrjElement> ll) { String param = getString(ll.get(0)); String parm = PrjValueParameters.PARAMNAMES.get(param.toLowerCase().replaceAll("[^a-zA-Z0-9]", "")); if (parm != null) { parseNumber(ll.get(1), parm); } }
/** * Read the informations contains in the SPHEROID node and put it into the * set of parameters. * * @param ll the children of the SPHEROID node */ private void parseSpheroid(List<PrjElement> ll) { String ellps = getString(ll.get(0)); String elps = PrjValueParameters.ELLIPSOIDNAMES.get(ellps.toLowerCase().replaceAll("[^a-zA-Z0-9]", "")); ellps = elps != null ? elps : ellps; params.put(ProjKeyParameters.ellps, ellps); parseNumber(ll.get(1), ProjKeyParameters.a); parseNumber(ll.get(2), ProjKeyParameters.rf); if (ll.size() > 3) { String auth = getAuthority(matchNode(ll.get(3), PrjKeyParameters.AUTHORITY)); params.put(PrjKeyParameters.SPHEROIDREFNAME, auth); } }
/** * Read the informations contains in the VERT_DATUM node and put it into the * set of parameters. * * @param ll the children of the VERT_DATUM node */ private void parseVertDatum(List<PrjElement> ll) { String datum = getString(ll.get(0)); String datm = PrjValueParameters.DATUMNAMES.get(datum.toLowerCase().replaceAll("[^a-zA-Z0-9]", "")); datum = datm != null ? datm : datum; params.put(PrjKeyParameters.VERTDATUM, datum); parseNumber(ll.get(1), PrjKeyParameters.VERTDATUMTYPE); if (ll.size() > 2) { String auth = getAuthority(matchNode(ll.get(2), PrjKeyParameters.AUTHORITY)); params.put(PrjKeyParameters.VERTDATUMREFNAME, auth); } }
/** * Read the informations contains in the PRIMEM node and put it into the set * of parameters. * * @param ll the children of the PRIMEM node */ private void parsePrimeM(List<PrjElement> ll) { String pm = getString(ll.get(0)); String prm = PrjValueParameters.PRIMEMERIDIANNAMES.get(pm.replaceAll("[^a-zA-Z0-9]", "").toLowerCase()); if (prm != null) { params.put(ProjKeyParameters.pm, prm); } else { params.put(ProjKeyParameters.pm, pm); parseNumber(ll.get(1), PrjKeyParameters.PMVALUE); if (ll.size() > 2) { String auth = getAuthority(matchNode(ll.get(2), PrjKeyParameters.AUTHORITY)); params.put(PrjKeyParameters.PRIMEMREFNAME, auth); } } }