@Test public void testConvertTupleWithWhitespace() { EcefVector result = (EcefVector) converter.convert("{ 53.02 , -0.103 }"); assertEquals(53.02, result.getLatDegs(), 0.0001); assertEquals(-0.103, result.getLonDegs(), 0.0001); }
@Override public IPoint3D convert(String source) { if (source.startsWith("{")) { return fromLatLon(source); } GeoInformation geo = stringToGeo.convert(source); if (geo == null) { throw new IllegalArgumentException("Unable to convert: " + source); } return EcefVector.fromDegs(0, geo.getLatitude(), geo.getLongitude()); }
StringToEcefVectorConverter implements Converter<String, IPoint3D> { @Override public IPoint3D convert(String source) { if (source.startsWith("{")) { return fromLatLon(source); } GeoInformation geo = stringToGeo.convert(source); if (geo == null) { throw new IllegalArgumentException("Unable to convert: " + source); } return EcefVector.fromDegs(0, geo.getLatitude(), geo.getLongitude()); } }
StringToEcefVectorConverter implements Converter<String, IPoint3D> { @Override public IPoint3D convert(String source) { if (source.startsWith("{")) { return fromLatLon(source); } GeoInformation geo = stringToGeo.convert(source); if (geo == null) { throw new IllegalArgumentException("Unable to convert: " + source); } return EcefVector.fromDegs(0, geo.getLatitude(), geo.getLongitude()); } @Autowired  StringToEcefVectorConverter(Converter<String, GeoInformation> converter); }
StringToEcefVectorConverter implements Converter<String, IPoint3D> { @Override public IPoint3D convert(String source) { if (source.startsWith("{")) { return fromLatLon(source); } GeoInformation geo = stringToGeo.convert(source); if (geo == null) { throw new IllegalArgumentException("Unable to convert: " + source); } return EcefVector.fromDegs(0, geo.getLatitude(), geo.getLongitude()); } @Autowired  StringToEcefVectorConverter(Converter<String, GeoInformation> converter); @Override IPoint3D convert(String source); }
StringToEcefVectorConverter implements Converter<String, IPoint3D> { @Override public IPoint3D convert(String source) { if (source.startsWith("{")) { return fromLatLon(source); } GeoInformation geo = stringToGeo.convert(source); if (geo == null) { throw new IllegalArgumentException("Unable to convert: " + source); } return EcefVector.fromDegs(0, geo.getLatitude(), geo.getLongitude()); } @Autowired  StringToEcefVectorConverter(Converter<String, GeoInformation> converter); @Override IPoint3D convert(String source);  }