发现Neo4j空间导入OSM失配顶点 [英] Neo4j-spatial importing OSM missmatching vertices found

查看:128
本文介绍了发现Neo4j空间导入OSM失配顶点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我导入osmdata的方法:

This is my method to import 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时,我得到了这个信息:

When I import an osmdata I get this:

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 http://metro.teczno.com/#san-francisco (21 MB bzip格式的XML OSM数据).所以我的问题是,我的代码或导入的数据有问题吗?或者这很正常吗?

I think this is because the osmdata I imported is only an extract and some streets can't be imported as whole. I imported san-francisco.osm from http://metro.teczno.com/#san-francisco (21 MB bzip’ed XML OSM data). So my question is, is there something wrong in my code or with the data I am importing or is this normal?

问候

推荐答案

是的,这很正常,您的解释是正确的.转储OSM时,它是由边界内的节点节点完成的.这些相同的节点属于超出边界的方式和关系,因此您总是会切碎"许多几何图形,结果是Neo4j Spatial代码中的许多警告正试图使OSM文件有意义.

Yes, this is normal, and your explanation is correct. When a dump of OSM is made, it is done by node nodes within boundaries. These same nodes belong to ways and relations that extend beyond the boundaries, so you always many Geometries 'chopped up' and as a consequence many warnings like this from the Neo4j Spatial code that is trying to make sense of the OSM file.

对于测试用例中包含的OSM数据,您还将看到类似这样的警告.很难找到已经被完全清除的OSM数据,因此所有几何都被完全包含.

You will see warnings like this for the OSM data included in the test cases also. It is hard to find OSM data that has been fully cleaned up so all Geometries are fully contained.

但是,实际的错误可能会导致相同的警告.但是我记得当我第一次运行OSM导入程序时,我追踪了很多此类警告,并且我总是发现它们是由于导出过程中被削减的方式所致.

It is possible, however, that actual bugs could cause the same warnings. But I remember I tracked down very many of these warnings when I first ran the OSM importer, and I always found them to be due to ways that were cut during the export.

这篇关于发现Neo4j空间导入OSM失配顶点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆