|
@@ -90,6 +90,7 @@ public class ShanghaiAddressSplitUtil {
|
|
|
errAddrReStr.put("大港镇", "小昆山镇");
|
|
|
errAddrReStr.put("天马山镇", "佘山镇");
|
|
|
errAddrReStr.put("江海镇", "南桥镇");
|
|
|
+ errAddrReStr.put("工业区", "");
|
|
|
Map<String, threeLevelAddress> districtMap = new HashMap<>();
|
|
|
Map<String, List<threeLevelAddress>> streetMap = new HashMap<>();
|
|
|
Map<String, List<threeLevelAddress>> communityMap = new HashMap<>();
|
|
@@ -585,15 +586,36 @@ public class ShanghaiAddressSplitUtil {
|
|
|
*/
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
new ShanghaiAddressSplitUtil().init();
|
|
|
- AddrSplitLmrMap addrSplitLmrMap = new AddrSplitLmrMap();
|
|
|
+ /*AddrSplitLmrMap addrSplitLmrMap = new AddrSplitLmrMap();
|
|
|
addrSplitLmrMap.initFile();
|
|
|
- String testAddress = "上海市崇明区港西镇三双公路1021号10幢U1006室(上海津桥经济开发区)";
|
|
|
+ String testAddress = "上海市嘉定区兴庆路1551号";
|
|
|
System.out.println("测试地址:" + testAddress);
|
|
|
SplitAddress xzqh = splitBestAddress(testAddress);
|
|
|
System.out.println(xzqh);
|
|
|
AddrBean lmrAddrBean = AddrSplitLmrMap.outAddrMapInAddr(xzqh.getAddr());
|
|
|
System.out.println("AddrBean:" + lmrAddrBean);
|
|
|
- System.out.println(AddrSplitLmrMap.parseAddress(lmrAddrBean.getAddress()));
|
|
|
+ System.out.println(AddrSplitLmrMap.parseAddress(lmrAddrBean.getAddress()));*/
|
|
|
+
|
|
|
+ AddressResult.ContentBean test = new AddressResult.ContentBean();
|
|
|
+ test.setRoomNumber("1551");
|
|
|
+ test.setDistance("");
|
|
|
+ test.setLon(121.18766784667969);
|
|
|
+ test.setRoadName("兴庆路");
|
|
|
+ test.setScore("rule_3");
|
|
|
+ test.setAdname("嘉定工业区");
|
|
|
+ test.setLat(31.439653396606445);
|
|
|
+ test.setAddress("兴庆路930号内");
|
|
|
+ test.setSearchAddress("兴庆路1551");
|
|
|
+ test.setPname("上海市");
|
|
|
+ test.setCityname("嘉定区");
|
|
|
+ test.setCommunity("园区5");
|
|
|
+ test.setStandAddr("上海市嘉定区嘉定工业区兴庆路1551");
|
|
|
+ test.setName("兴庆路930号内");
|
|
|
+ test.setX(-26568.0603190182);
|
|
|
+ test.setY(22674.637411829084);
|
|
|
+ test.setLocation("121.18767,31.439653");
|
|
|
+ test.setCommunityCode("141348");
|
|
|
+ AddressTools.ifTrueAddressByBeans(test);
|
|
|
/*// 数据总条数
|
|
|
int dataSize = 2158170;
|
|
|
int numberSize = 100000;
|