这是我导入osmdata的方法:
private void importOSM(String osm){
OSMImporter importer = new OSMImporter(osm);
importer.setCharset(Charset.forName("UTF-8"));
try{
importer.importFile(graphDb,osm,false,5000,true);
importer.reIndex(graphDb,10000);
}catch(Exception e){
System.out.println("__________Import Error!! "+e.getMessage());
e.printStackTrace();
}
}
当我导入 osmdata 时,我得到了这个:
Mismatching vertices size for Polygon:Node[1799298]: 1 != 2
Mismatching vertices size for LineString:Node[2118494]: 14 != 23
Mismatching vertices size for Polygon:Node[1776324]: 1 != 2
Mismatching vertices size for Polygon:Node[1886154]: 1 != 2
Mismatching vertices size for Polygon:Node[2124799]: 1 != 6
Mismatching vertices size for LineString:Node[2207017]: 60 != 85
Mismatching vertices size for LineString:Node[2207587]: 45 != 154
Mismatching vertices size for LineString:Node[2213928]: 8 != 16
Mismatching vertices size for LineString:Node[2213939]: 8 != 16
Mismatching vertices size for LineString:Node[2212505]: 3 != 14
Mismatching vertices found 100 times
Mismatching vertices found 200 times
Mismatching vertices found 300 times
Mismatching vertices found 400 times
Mismatching vertices found 500 times
Mismatching vertices found 600 times
Mismatching vertices found 700 times
Mismatching vertices found 800 times
Mismatching vertices found 900 times
Mismatching vertices found 1000 times
Mismatching vertices found 1100 times
我认为这是因为我导入的osmdata只是一个提取物,有些街道无法整体导入。我从http://metro.teczno.com/#san-francisco(21 MB bzip'ed XML OSM 数据)导入了 san-francisco.osm。所以我的问题是,我的代码或我正在导入的数据是否有问题,或者这是否正常?
问候