Re: [Neo4j] path finding using OSM ways

2011-12-06 Thread danielb

craig.taverner wrote
 
 ...
 - Create a way-point node for these
 ...
 

Hi together,

I wonder why to add extra nodes to the graph (if I understand Craig
correctly)? Wouldn't you then end up in expanding twice the node count
(way-point nodes and OSM nodes themself, because you have to query the OSM
id (or any other identification value of the end node) in every expand and
lat / lon if you don't have precompiled edge weights)? I would just connect
the OSM nodes directly with new edges to form a routing subgraph.

Best Regards,
Daniel  


--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-path-finding-using-OSM-ways-tp3004328p3564688.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Spatial build / run problems

2011-11-30 Thread danielb
Hi Peter,

the tests are running and now I get the following results:

cypher start n=node:geom('bbox:[9.9996186, 9.9996186, 48.4027913,
48.4027913]')
cypher return n
cypher 
== +--+
== | n|
== +--+
== | Node[205373]{vertices-1,bbox-[D@4613e058,gtype-1} |
== +--+
== 1 rows, 194 ms

http POST /db/data/ext/SpatialPlugin/graphdb/findGeometriesInLayer
{layer:geom,minx:9.9996186,maxx:9.9996186,miny:48.4027913,maxy:48.4027913}
 
== 200 OK
== [ {
==   outgoing_relationships :
http://localhost:7474/db/data/node/205373/relationships/out;,
==   data : {
== bbox : [ 9.9996186, 9.9996186, 48.4027913, 48.4027913 ],
== vertices : 1,
== gtype : 1
==   },
==   traverse :
http://localhost:7474/db/data/node/205373/traverse/{returnType};,
==   all_typed_relationships :
http://localhost:7474/db/data/node/205373/relationships/all/{-list||types},
==   property :
http://localhost:7474/db/data/node/205373/properties/{key};,
==   self : http://localhost:7474/db/data/node/205373;,
==   properties : http://localhost:7474/db/data/node/205373/properties;,
==   outgoing_typed_relationships :
http://localhost:7474/db/data/node/205373/relationships/out/{-list||types},
==   incoming_relationships :
http://localhost:7474/db/data/node/205373/relationships/in;,
==   extensions : {
==   },
==   create_relationship :
http://localhost:7474/db/data/node/205373/relationships;,
==   paged_traverse :
http://localhost:7474/db/data/node/205373/paged/traverse/{returnType}{?pageSize,leaseTime};,
==   all_relationships :
http://localhost:7474/db/data/node/205373/relationships/all;,
==   incoming_typed_relationships :
http://localhost:7474/db/data/node/205373/relationships/in/{-list||types}
== } ]

To get to this point I have to follow exactly the following steps:

1. Create a new database
2. Run the OSMImporter and name the layer 'geom' (Cypher don't like \ / :)
- separate osmPath and Layername in importer
3. Start the server and call the following through HTTP:

http POST /db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer
{layer:geom, lat:lat, lon:lon}
== 200 OK
== [ {
==   outgoing_relationships :
http://localhost:7474/db/data/node/582567/relationships/out;,
==   data : {
== layer_class : org.neo4j.gis.spatial.osm.OSMLayer,
== layerprops : [ FIXME, TMC:cid_58:tabcd_1:Class,
TMC:cid_58:tabcd_1:Direction, TMC:cid_58:tabcd_1:LCLversion,
TMC:cid_58:tabcd_1:LocationCode, TMC:cid_58:tabcd_1:NextLocationCode,
TMC:cid_58:tabcd_1:PrevLocationCode, access, addr:city,
addr:country, addr:housenumber, addr:postcode, addr:state,
addr:street, admin_level, agricultural, alt_name, amenity, area,
asb, atm, backrest, barrier, bell, bench, bicycle,
bicycle_parking, boundary, brand, bridge, building,
building:cladding, building:height, building:levels, building:roof,
building:type, building:use, bus, cables, capacity,
capacity:disabled, class:bicycle, collection_times, covered,
created_by, crossing, crossing_ref, cuisine, cutting, cycleway,
denomination, denotation, description, destination, detail,
direction, ele, electrified, email, emergency, fax, fee,
fixme, foot, frequency, from, gauge, grade, hgv, highway,
historic, history, horse, hour_off, hour_on, incline, int_ref,
is_in, junction, landuse, lanes, layer, leisure, light, lit,
man_made, material, maxheight, maxspeed, maxspeed:source,
maxweight, moped, motor_vehicle, motorcar, motorcycle,
motorroad, mtb:scale, name, natural, network, noexit, note,
note:de, office, oneway, onkz, openGeoDB:auto_update,
openGeoDB:community_identification_number, openGeoDB:is_in,
openGeoDB:is_in_loc_id, openGeoDB:layer, openGeoDB:license_plate_code,
openGeoDB:loc_id, openGeoDB:name, openGeoDB:sort_name,
openGeoDB:version, opening_hours, operator, park_ride, parking,
payment:coins, payment:telephone_cards, phone, place, postal_code,
power, power:type, priority, psv, public_transport, rail,
railway, recycling:clothes, recycling:glass, recycling:paper, ref,
ref:color, religion, restriction, route, sac_scale, segregated,
service, shelter, shop, smoking, smoothness, source,
source:lit, source:maxspeed, sport, surface, tactile_paving, to,
tourism, tracks, tracktype, traffic_sign, trail_visibility,
tram, tunnel, type, usability:skate, vehicle, vending,
voltage, waterway, website, wheelchair, wheelchair:description,
width, wikipedia, wires, wood, workrules, wpt_description ],
== layer : geom,
== geomencoder : org.neo4j.gis.spatial.osm.OSMGeometryEncoder,
== ctime : 1322660287742
==   },
==   traverse :
http://localhost:7474/db/data/node/582567/traverse/{returnType};,
==   all_typed_relationships :
http://localhost:7474/db/data/node/582567/relationships/all/{-list||types},
==   property :
http://localhost:7474/db/data/node/582567/properties/{key};,
==   self : http://localhost:7474/db/data/node/582567;,

Re: [Neo4j] path finding using OSM ways

2011-11-28 Thread danielb
Hi together,

Maybe I am bit late on this topic but how is the progress so far?

Greetz, Daniel

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-path-finding-using-OSM-ways-tp3004328p3542322.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Spatial build / run problems

2011-11-28 Thread danielb
Hi Peter,

that works, yes! But I still can't do spatial queries with the OSMLayer over
the server page. Today I have written a small test program in Java which
also includes a bbox query for a specific point and then traverses to the
corresponding OSM node. So far I am satisfied with that (I will also
continue in Java), maybe you can still get this 'issue' to work at your side
- or I just don't get it :)

Regards, Daniel

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Spatial-build-run-problems-tp3515519p3542618.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Spatial build / run problems

2011-11-25 Thread danielb
Hi Peter,

unfortunately I can't get it to work. The layer named after osmpath could
not be used in query because of ':' and '/'. I don't know how to escape them
here. However I did not like the layer to be named in this way, so I changed 
the OSMImporter to take 'layerName' and 'osmPath'. I now import the OSM file
with the layer named 'geom' and added the indexprovider. A bbox query now
stops with GC overhead limit exceeded :/
Can you please verify the OSMimport with bbox query over Cypher / HTTP?

Regards, Daniel

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Spatial-build-run-problems-tp3515519p3535681.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Spatial build / run problems

2011-11-25 Thread danielb
Thanks Peter!

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Spatial-build-run-problems-tp3515519p3536012.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Spatial build / run problems

2011-11-24 Thread danielb
Hi Peter,

I now have a graph with the 'geom' index + testnode from the above code and
imported some OSM data afterwards. I now want to find 2 nodes by bbox query
- 550349 and 205372 (see http://dl.dropbox.com/u/18693700/graph.png). How
can I achieve this? If I query for the bbox I should at least find the
corresponding GEOM nodes and then traverse over the incoming edge?

I can for example do the following:
cypher start n=node:node(way_osm_id = '119810554')
cypher return n
cypher 
==
+--+
== | n 
  
|
==
+--+
== |
Node[550349]{way_osm_id-119810554,oneway-BOTH,timestamp-1309673329000,highway-residential,name-Frauenstraße,version-2}
|
==
+--+
== 1 rows, 168 ms

In the posts before I could query the geometry with index 'geom'. The index
manager only has the following entries:

node lucene {_blueprints:type:MANUAL, type:exact}
relation lucene {_blueprints:type:MANUAL, type:exact}
geom spatial {_blueprints:type:MANUAL}
way lucene {_blueprints:type:MANUAL, type:exact}
changeset lucene {_blueprints:type:MANUAL, type:exact}
user lucene {_blueprints:type:MANUAL, type:exact}

I also have uploaded the complete folder of Neo4j spatial + graph.db:
http://dl.dropbox.com/u/18693700/neo4j_spatial_osm_graphdb.rar

Regards, Daniel

  

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Spatial-build-run-problems-tp3515519p3533548.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Spatial build / run problems

2011-11-23 Thread danielb
Hi Peter,

I am more stuck today than yesterday oO I can't get the index to appear in
the indexmanager any more. First I dropped the database and started from
zero:

C:\neo4j-community-1.5\binNeo4j.bat start

SERVICE_NAME: Neo4j-Server
TYPE   : 10  WIN32_OWN_PROCESS
STATE  : 2  START_PENDING
(NOT_STOPPABLE, NOT_PAUSABLE,
IGNORES_SHUTDOWN)
WIN32_EXIT_CODE: 0  (0x0)
SERVICE_EXIT_CODE  : 0  (0x0)
CHECKPOINT : 0x0
WAIT_HINT  : 0x7d0
PID: 2132
FLAGS  :

C:\neo4j-community-1.5\binb:

B:\curl http://localhost:7474/db/data/
{
  relationship_index : http://localhost:7474/db/data/index/relationship;,
  node : http://localhost:7474/db/data/node;,
  relationship_types : http://localhost:7474/db/data/relationship/types;,
  neo4j_version : 1.5,
  batch : http://localhost:7474/db/data/batch;,
  extensions_info : http://localhost:7474/db/data/ext;,
  node_index : http://localhost:7474/db/data/index/node;,
  reference_node : http://localhost:7474/db/data/node/0;,
  extensions : {
CypherPlugin : {
  execute_query :
http://localhost:7474/db/data/ext/CypherPlugin/graphdb/execute_query;
},
SpatialPlugin : {
  addEditableLayer :
http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addEditableLayer;,
  addCQLDynamicLayer :
http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addCQLDynamicLayer;,
  updateGeometryFromWKT :
http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/updateGeometryFromWKT;,
  findGeometriesInLayer :
http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/findGeometriesInLayer;,
  addGeometryWKTToLayer :
http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addGeometryWKTToLayer;,
  getLayer :
http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/getLayer;,
  addSimplePointLayer :
http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer;,
  addNodeToLayer :
http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addNodeToLayer;
},
GremlinPlugin : {
  execute_script :
http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script;
}
  }
}
B:\curl -d layer=geomlon=lonlat=lat
http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer
[ {
  outgoing_relationships :
http://localhost:7474/db/data/node/2/relationships/out;,
  data : {
layer_class : org.neo4j.gis.spatial.EditableLayerImpl,
layer : geom,
geomencoder : org.neo4j.gis.spatial.encoders.SimplePointEncoder,
geomencoder_config : lon:lat,
ctime : 1322045456422
  },
  traverse : http://localhost:7474/db/data/node/2/traverse/{returnType};,
  all_typed_relationships :
http://localhost:7474/db/data/node/2/relationships/all/{-list||types},
  property : http://localhost:7474/db/data/node/2/properties/{key};,
  self : http://localhost:7474/db/data/node/2;,
  properties : http://localhost:7474/db/data/node/2/properties;,
  outgoing_typed_relationships :
http://localhost:7474/db/data/node/2/relationships/out/{-list||types},
  incoming_relationships :
http://localhost:7474/db/data/node/2/relationships/in;,
  extensions : {
  },
  create_relationship :
http://localhost:7474/db/data/node/2/relationships;,
  paged_traverse :
http://localhost:7474/db/data/node/2/paged/traverse/{returnType}{?pageSize,leaseTime};,
  all_relationships :
http://localhost:7474/db/data/node/2/relationships/all;,
  incoming_typed_relationships :
http://localhost:7474/db/data/node/2/relationships/in/{-list||types}
} ]
B:\curl -X POST http://localhost:7474/db/data/index/node/ -H Content-Type:
application/json -d '{name:geom, config:{provider:spatial}}'
{
  message : Unexpected character (''' (code 39)): expected a valid value
(number, String, array, object, 'true', 'false' or 'null')\n at [Source:
java.io.StringReader@78d10502; line: 1, column: 2],
  exception : org.neo4j.server.rest.repr.BadInputException: Unexpected
character (''' (code 39)): expected a valid value (number, String, array,
object, 'true', 'false' or 'null')\n at [Source:
java.io.StringReader@78d10502; line: 1, column: 2],
  stacktrace : [
org.neo4j.server.rest.repr.formats.JsonFormat.readMap(JsonFormat.java:91),
org.neo4j.server.rest.web.RestfulGraphDatabase.jsonCreateNodeIndex(RestfulGraphDatabase.java:594),
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method),
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39),
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25),
java.lang.reflect.Method.invoke(Method.java:597),
com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60),
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205),


Re: [Neo4j] Neo4j Spatial build / run problems

2011-11-23 Thread danielb
Hi Peter,

first cURL doesn't like me:

C:\curl -X POST
http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer
{
  message : Mandatory argument \layer\ not supplied.,
  exception : java.lang.IllegalArgumentException: Mandatory argument
\layer\ not supplied.,
  stacktrace : [
org.neo4j.server.plugins.ParameterExtractor.extract(ParameterExtractor.java:47),
org.neo4j.server.plugins.PluginMethod.invoke(PluginMethod.java:53),
org.neo4j.server.plugins.PluginManager.invoke(PluginManager.java:168),
org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:300),
org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:122),
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method),
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39),
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25),
java.lang.reflect.Method.invoke(Method.java:597), com.sun.jersey.
spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60),
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205),
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75),
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288),
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147),
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108),
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147),
co
m.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84),
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469),
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400),
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349),
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339),
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416),
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537),
com.sun.jersey.spi.container.servlet.ServletContai
ner.service(ServletContainer.java:699),
javax.servlet.http.HttpServlet.service(HttpServlet.java:820),
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511),
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166),
org.neo4j.server.statistic.StatisticFilter.doFilter(StatisticFilter.java:62),
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157),
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388),
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182),
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765),
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114),
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152),
org.mortbay.jetty.Server.handle(Server.java:326),
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542),
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926),
org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549),
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212),
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404),
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410),
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
]
}
C:\-H Content-Type:application/json -d '{layer:geom, lat:lat,
Der Befehl -H ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

C:\lon:lon}'
Die Syntax für den Dateinamen, Verzeichnisnamen oder die
Datenträgerbezeichnung ist falsch.

C:\curl -X POST
http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer
-H Content-Type:application/json -d '{layer:geom, lat:lat,
lon:lon}'
{
  message : Unexpected character (''' (code 39)): expected a valid value
(number, String, array, object, 'true', 'false' or 'null')\n at [Source:
java.io.StringReader@c6ac0be; line: 1, column: 2],
  exception : org.neo4j.server.rest.repr.BadInputException: Unexpected
character (''' (code 39)): expected a valid value (number, String, array,
object, 'true', 'false' or 'null')\n at [Source:
java.io.StringReader@c6ac0be; line: 1, column: 2],
  stacktrace : [
org.neo4j.server.rest.repr.formats.JsonFormat.readMap(JsonFormat.java:91),
org.neo4j.server.rest.repr.RepresentationFormat.readParameterList(RepresentationFormat.java:99),

Re: [Neo4j] Neo4j Spatial build / run problems

2011-11-23 Thread danielb
Hi Peter,

I have posted the statements in 1 line, but no success with cURL. I think I
have messed up the database at work, it was allready filled with nodes from
OSM testing. I now started a new database at home and also included one
additional line:

http POST /db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer
{layer:geom, lat:lat, lon:lon}
http POST http://localhost:7474/db/data/index/node/ {name:geom,
config:{provider:spatial}}
http POST http://localhost:7474/db/data/node {lon: 15.2, lat: 60.1}
http POST
http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addNodeToLayer
{layer:geom,node:http://localhost:7474/db/data/node/5}
http POST /db/data/ext/SpatialPlugin/graphdb/findGeometriesInLayer
{layer:geom,minx:15.0,maxx:15.3,miny:60.0,maxy:60.2} 
== 200 OK
== [ {
==   outgoing_relationships :
http://localhost:7474/db/data/node/5/relationships/out;,
==   data : {
== lon : 15.2,
== bbox : [ 15.2, 60.1, 15.2, 60.1 ],
== gtype : 1,
== lat : 60.1
==   },
==   traverse :
http://localhost:7474/db/data/node/5/traverse/{returnType};,
==   all_typed_relationships :
http://localhost:7474/db/data/node/5/relationships/all/{-list||types},
==   property : http://localhost:7474/db/data/node/5/properties/{key};,
==   self : http://localhost:7474/db/data/node/5;,
==   properties : http://localhost:7474/db/data/node/5/properties;,
==   outgoing_typed_relationships :
http://localhost:7474/db/data/node/5/relationships/out/{-list||types},
==   incoming_relationships :
http://localhost:7474/db/data/node/5/relationships/in;,
==   extensions : {
==   },
==   create_relationship :
http://localhost:7474/db/data/node/5/relationships;,
==   paged_traverse :
http://localhost:7474/db/data/node/5/paged/traverse/{returnType}{?pageSize,leaseTime};,
==   all_relationships :
http://localhost:7474/db/data/node/5/relationships/all;,
==   incoming_typed_relationships :
http://localhost:7474/db/data/node/5/relationships/in/{-list||types}
== } ]

After a restart of the server I could also do the following :) 
cypher start n=node:geom('bbox:[15.2, 15.2, 60.1, 60.1]') 
cypher return n
cypher 
== +-+
== | n   |
== +-+
== | Node[5]{lon-15.2,lat-60.1,gtype-1,bbox-[D@7e64eff0} |
== +-+
== 1 rows, 44 ms

Tomorrow I am going to achieve this state on the other machine and then look
how it works with the OSM data. Well after that schwere Geburt I am happy
with the progress :) Thanks so far.

Best regards, Daniel




--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Spatial-build-run-problems-tp3515519p3531942.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Spatial build / run problems

2011-11-22 Thread danielb
Hi together,

That would be cool. Atm I am deleting the data folder, that works too for my
testing purpose. I have played around with cypher and encounter some
problems. I have OSM nodes in the database and I 'guess' they have a spatial
index on the geometry (lat, lon). The view on the server administration page
also shows Rtree indices. The indexmanager only shows me some sort of lucene
indices (can I get a more detailed overview of the used indices by query?).
I tried the 'node' index with the following command: 

cypher start n=node:node('bbox:[10.0061535, 10.0061535, 48.4125871,
48.4125871]')
cypher match (n) -[r] - (x)
cypher return n
cypher 
== Error: RuntimeException - org.apache.lucene.queryParser.ParseException:
Cannot parse 'bbox:[10.0061535, 10.0061535, 48.4125871, 48.4125871]':
Encountered  RANGEIN_GOOP 48.4125871,  at line 1, column 30.
== Was expecting:
== ] ...
== 

I was expecting to get the node with this coordinates. Can I query bbox for
point geometry at all? I may have typos in the command, so please help me,
these are my first steps with Neo4j :) After playing around with the server
console I will go deeper into the java code.

When I am executing the IndexProviderTest I get an error:
http://dl.dropbox.com/u/18693700/IndexProviderTest.txt

I appreciate your help again,
Daniel



--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Spatial-build-run-problems-tp3515519p3527810.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Spatial build / run problems

2011-11-22 Thread danielb
Hi Peter,

How do I add the Spatial plugin? I only have Cypher and Gremlin as server
extensions installed. I unzip Neo4j spatial into the plugins folder and then
send the JSON via curl to the database. But he can't find any of the needed
classes. Which files do I need from the spatial project and where are they
copied to the server exactly?

Regards, Daniel

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Spatial-build-run-problems-tp3515519p3528052.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Spatial build / run problems

2011-11-22 Thread danielb
Hi Peter,

I could now register the spatial index 'geom' to my database (I was missing
the zip file) - thanks so far.

cypher start n=node:geom('bbox:[10.0020654, 10.0020654, 48.4126496,
48.4126496]') 
cypher return n
cypher 
== +---+
== | n |
== +---+
== +---+
== 0 rows, 24 ms

So zero results for this query. Maybe that node is not indexed by 'geom'?
How can I check to which nodes the spatial index has been applied?

Regards, Daniel

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Spatial-build-run-problems-tp3515519p3528225.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Spatial build / run problems

2011-11-21 Thread danielb
Hi Peter,

I guess the meta-inf entry for the org.neo4j.kernel.KernelExtension is still
missing. The repo URL https://github.com/neo4j/spatial.git is correct? It
states last commit was 4 days ago...
The build ends with error: http://dl.dropbox.com/u/18693700/git21.txt

Daniel

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Spatial-build-run-problems-tp3515519p3524586.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Spatial build / run problems

2011-11-21 Thread danielb
Hi Peter,

I have JDK 1.7.0_01 on a Windows 7 64bit machine. After I added the
missing meta-inf entry org.neo4j.kernel.KernelExtension I could build the
project. Now I have a few more problems. I can run the tests for the
DynamicLayers and OSMImport without failure but then I am stuck at the
OSMImporter itself now.
To just get any sort of a result I played around with this class a bit. I
set the arguments in the main class by hand (not nice, but I haven't figured
out how to pass them in Netbeans project settings when the project is based
on Maven). Embedded database and batchinserter works until it wants to use
the lucene index. The error message is corresponding to this one:
http://neo4j.org/forums/#nabble-td3185975
I guess I have to checkout more than only neo4j spatial and add / fix some
of the dependencies.
Unfortunately I don't have a Skype setup here :/ 

Regards, Daniel

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Spatial-build-run-problems-tp3515519p3525302.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Spatial build / run problems

2011-11-21 Thread danielb
Hi Peter,

JDK 1.6 does the job! But only for building the project. Netbeans still
shows an error for the missing KernelExtension meta-inf, however it does not
prevent from running the OSMImporter. Lucene is still not working, maybe it
has something to do with that error which is at the SpatialIndexProvider?
Should I try it with Eclipse instead (even though I dislike Eclipse^^ / can
I provide arguments for individual projects within the IDE?) - which IDE do
you use with Neo4j? 

See you tomorrow :)
Daniel 

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Spatial-build-run-problems-tp3515519p3526111.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Spatial build / run problems

2011-11-21 Thread danielb
Tried Eclipse Java Edition and it seems that everything is working as it
should. I could at least start an OSMImport to an embedded database and
nodes were copied. I will have a detailed look tomorrow.
I still have a few problems with the Neo4j server itself. When I try to
batchinsert I get the message that the database was not shutdown in a clean
way. I start / stop the server as a service, can I somehow correct this
state? How can I delete all the nodes of the database in an easy way? I
tried https://github.com/jexp/neo4j-clean-remote-db-addon, but the jar is
for version 1.4 and when I execute the rest call no nodes are deleted from
the database.

Thanks in advance, Daniel

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Spatial-build-run-problems-tp3515519p3526379.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Neo4j Spatial build / run problems

2011-11-17 Thread danielb
Hi I have some problems with the new build of Neo4j Spatial. First if I
checkout and try to build the following error occurs [ERROR]
spatial\src\main\java\org\neo4j\gis\spatial\indexprovider\SpatialIndexProvider.java:[38,0]
error: Internal error: java.io.FileNotFoundException:
META-INF/services/org.neo4j.kernel.KernelExtension. This is the current
state after checkout.

In the next step I have done the checkout in Netbeans and added the missing
META-INF entry. Also there is currently only a TestKernelExtension class
and not KernelExtension. After that I could build the project and tried to
run the OSMImporter.main inside Netbeans. I can't pass Parameters from
project-properties-run-arguments, I guess it has something to do with the
Maven project (I am a .NET / VS developer, I do it by trial and error atm).

Finally I tried to load the project by console with parameter passing: mvn
exec:java -Dexec.mainClass=org.neo4j.gis.spatial.osm.OSMImporter.main
-Dexec.classpathScope=runtime -Dexec.args=C:/Program
Files/neo4j-community-1.5/data/graph.db
C:/Users/UserName/Dropbox/WBIS/osm/berlin.osm.  I had to copy the pom.xml
(in netbeans project folder) to C:/users/username first to prevent an error
from loading this file. After this I am stuck here:

[WARNING]
[WARNING] Some problems were encountered while building the effective model
for org.neo4j:neo4j-spatial:jar:0.7-SNAPSHOT
[WARNING] 'reporting.plugins.plugin.version' for
org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 532,
column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they
threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support
building such malformed projects.
[WARNING]
[WARNING] The POM for cuke4duke:cuke4duke-maven-plugin:jar:0.4.4 is missing,
no dependency information available
[WARNING] Failed to retrieve plugin descriptor for
cuke4duke:cuke4duke-maven-plugin:0.4.4: Plugin
cuke4duke:cuke4duke-maven-plugin:0.4.4 or one of its
 dependencies could not be resolved: Failed to read artifact descriptor for
cuke4duke:cuke4duke-maven-plugin:jar:0.4.4
[WARNING] The POM for cuke4duke:cuke4duke-maven-plugin:jar:0.4.4 is missing,
no dependency information available
[WARNING] Failed to retrieve plugin descriptor for
cuke4duke:cuke4duke-maven-plugin:0.4.4: Plugin
cuke4duke:cuke4duke-maven-plugin:0.4.4 or one of its
 dependencies could not be resolved: Failed to read artifact descriptor for
cuke4duke:cuke4duke-maven-plugin:jar:0.4.4
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is
missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for
org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin
org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of i
ts dependencies could not be resolved: Failed to read artifact descriptor
for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0
Downloading:
http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloaded:
http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml (19 KB at
18.5 KB/sec)
Downloaded:
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml
(11 KB at 8.0 KB/sec)
[INFO]

[INFO] BUILD FAILURE
[INFO]

[INFO] Total time: 2.417s
[INFO] Finished at: Thu Nov 17 12:44:42 CET 2011
[INFO] Final Memory: 13M/309M
[INFO]

[ERROR] No plugin found for prefix 'Files/neo4j-community-1.5/data/graph.db
C' in the current project and in the plugin groups
[org.apache.maven.plugins, org.codehaus.mojo] available from the
repositories [local (C:\Users\UserName\.m2\repository), central
(http://repo1.maven.org/maven2)] - [
Help 1]

I would appreciate every help. Can I get it to work in Netbeans with
parameter passing?

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Spatial-build-run-problems-tp3515519p3515519.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Spatial build / run problems

2011-11-17 Thread danielb
Sure, here are the files, first after the checkout directly and then after I
add the missing entry (maybe you can correct this on the repository?).

http://dl.dropbox.com/u/18693700/git.txt
http://dl.dropbox.com/u/18693700/meta-inf_fixed.txt




--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Spatial-build-run-problems-tp3515519p3515786.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j in GIS Applications

2011-10-20 Thread danielb
Hello Peter, 

that sounds fine. I will probably compare some quad-tree against the
existing R-tree implementation. It will take some time until I start with
implementing something, but I will keep you informed.

Regards, Daniel

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-in-GIS-Applications-tp3393925p3437567.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j in GIS Applications

2011-10-13 Thread danielb
Hello there,

first I have written a wall of text, previewed it and then the forum went
grey and all of the text has gone - AR! 

In short: I have read some papers about different spatial indices in the
last days. The standard R-tree can be improved in various ways or even
replaced by a quad-tree. In one of the upcoming PostgreSQL versions they
will probably have a quad-tree based SP-GiST implementation. Early
proto-typing shows a speedboost of a factor of 6 in several bounding box
queries. In Neo4j there are less spatial operations based on an index
compared to a relational database and therefore it should be easier to find
an appropriate index (which hopefully will speed up some spatial
operations). In the course of my master thesis (which starts next week -
wish me luck and success) I could have a look into this.

So before everything is gone again - DOOOH - I finish this now...

Regards, Daniel

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-in-GIS-Applications-tp3393925p3419657.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j in GIS Applications

2011-10-10 Thread danielb
Retrieving data in constant time sounds very promising especially for routing
purposes. Did you allready have thoughts on algorithms that use hierarchies
or contraction of the network? In our students project we implemented some
approaches to reduce search space and have thoughts on the heuristics used
for A*. When travel speed comes into concern we got very different results
with SLD heuristics. Maybe this could be of interest for Neo4j.
When doing bounding box queries the only advantage of Neo4j could be better
spatial locality of data ('nodes' and 'ways' both stored in the same
container). Everything else is up to the r-tree performance as in PostGIS,
which uses an improved r-tree in GIST. Maybe you can do an r-tree search for
the first node near the center of the bounding box and with some magic
retrieve the surrounding nodes with graph traversing... At least I will
think about this, if you can improve bounding box queries over PostGIS.
When I switch to a low zoomlevel I want to use generalization and
simplification of mapdata. In Neo4j I can model that within subgraphs I
guess? For example have different relationships for different zoomlevels (I
skip some nodes of a way for example). I could also build a routing network
within subgraphs where I skip non-junction nodes for example?
Btw what do you think from building a graph inside a relational database? As
I understand now it would be very inefficient because you would have at
least two tables (vertices and edges) and have to do time demanding joins
with the two foreign key colums in the edge table. 

Regards, Daniel
   

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-in-GIS-Applications-tp3393925p3409062.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j low-level data storage

2011-10-10 Thread danielb
First thanks to all of you for the hints and the detailed explanation of
Craig. Peter I was not into any code in detail yet, but I have had a look on
the (beta) wiki of Neo4j spatial.

Some more questions on the storage format of Neo4j: So the nodes, properties
and relationships are stored in seperate files with their own id space. If I
load information from the database I will probably have to hit each store.
So lets say I have a large database of several gigabytes I will end up with
three sequentiell reads (at best) at three different locations on the
harddisk. If I store everything in three tables in the relational approach I
will come to the same result in terms of data locality - if my assumption is
correct. So no way to do a bounding box read from contiguous space when
using all of the datastores?
The next question goes to the way how OSM ways are stored. I thought the
relationships connect the nodes to a way like is-part-of. Now there are
proxy nodes which connect the nodes to a way. How does the relationships
now come into play? From some presentations I have seen that nodes have
lat/lon and name information. Was that only for illustration and that
information would normally be stored in the property store or how many
information can be stored in a node at all? This would favor the way I can
retrieve data then.
Lets stay at OSM: How would I store a closed way which isn't connected to
anything else? It would have no connection to the rest of the graph. How
would that fit from a design perspective?  

For my master thesis I will have to write comparable importers for Neo4j and
PostGIS. Your proposal to lower fragmentation sounds reasonable. I think I
can adapt that (or any other approach that comes to my mind) in a branch and
also add configuration options to the importer.

Regards, Daniel

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-low-level-data-storage-tp3336483p3409162.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j low-level data storage

2011-10-07 Thread danielb
Hello Chris,

thanks for your postings, they are a great starting point for me to assume a
good performance of this database. However I have some questions left.
Lets say I have a node store and a property store. Both of them are
individual files. I am going to implement a GIS application which fetches
OSM data from the hard disk. When I load a bounding box I want to avoid to
many random reads from the disk.
More precisely I want to load nodes and properties inside a given bounding
box. It would be great if both the nodes and the properties are organized in
successive blocks. Is there one id-pool for both nodes and properties, so
that I can load for example the nodes with id 1 and 2 and the properties 3,
4 and 5 with one block read? I can be totally wrong because if I save a new
node file with id 1, 2 and then save a new property file with id 3, it will
start on a new block (windows block size like 4K). When then writing a new
node id it would be saved in the first block I guess. What about
fragmentation? And is there an improvement when using a Linux system
(inodes? I don't know Linux well)? When I am finished with saving the nodes
and properties is there some way of reorganization on the hard disk? Lets
say I want to enter a new node which is connected to a low id. Will it get
the first free id (and it will be saved on the other end of the harddisk
perhaps) or does it just get an allready used id and the following records
will be reorganized (insert performance)?
Maybe I am totally wrong about this, but I would appreciate an efficient way
of storage for GIS data.

best regards, Daniel 

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-low-level-data-storage-tp3336483p3402827.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Neo4j in GIS Applications

2011-10-04 Thread danielb
Hello everyone, 

I am going to write my master thesis about the suitability of graph
databases in GIS applications (at least I hope so^^). The database has to
provide topological queries, network analysis and the ability to store large
amount of mapdata for viewing - all based on OSM-data of Germany ( 100M
nodes). Most likely I will compare Neo4j to PostGIS. 
As a starting point I want to know why you would recommend Neo4j to do the
job? What are the main advantages of a graph database compared to a
(object-)relational database in the GIS environment? The main focus and the
goal of this work should be to show a performance improvement over
relational databases. 
In a student project (OSM navigation system) we worked with relational
(SQLite) and object-oriented (Perst) databases on netbook hardware and
embedded systems. The relational database approach showed us two problems:
If you transfer the OSM model directly into tables then you have a lot of
joins which slows everything down (and lots of redundancy when using
different tables for each zoom level). The other way is to store as much as
possible in one big (sparse) table. But this would also have some
performance issues I guess and from a design perspective it is not a nice
solution. The object-oriented database also suffered from many random reads
when loading a bounding box. In addition we could not say how data was
stored in detail. 
The performance indeed increased after caching occured or by the use of SSD
hardware. You can also store everything in RAM (money does the job), but for
now you have to assume that all of the data has to be read from a slow disk
the first time. Can Neo4j be configured to read for example a bounding box
of OSM data from disk in an efficient way (data locality)? 
Maybe you also have some suggestions where I should have a look at in this
work and what can be improved in Neo4j to get better results. I also would
appreciate related papers. 

kindly regards, Daniel 

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-in-GIS-Applications-tp3393925p3393925.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Neo4j low-level data storage

2011-09-14 Thread danielb
Hello everybody,

I have some questions regarding data storage in neo4j. How does neo4j store
the data on the physical level? Are elements which have a close relationship
in the graph stored in an adjacent way on disk? Any special binary format?
How do you treat SSDs compared to common harddisks? What are your measures
to improve I/O? Is there a technical documention which describes this?

regards,
Daniel

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-low-level-data-storage-tp3336483p3336483.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] finding top 10 shortest path

2011-09-12 Thread danielb
Hello you both could have a look at the so-called k-shortest-paths problem. 
There is some related scientific work[1] and implementations[2] for further
investigation.

regards,
Daniel

[1] http://www.mat.uc.pt/~eqvm/cientificos/investigacao/r_papers.html#K
[2] http://code.google.com/p/k-shortest-paths/

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-finding-top-10-shortest-path-tp3235128p3330443.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user