Hi,

Sorry for a late contribution to this discussion. I will try make a few
comments to cover the various mails above.

Firstly, the neo4j-spatial.rb GEM at version 0.0.8 on RubyGems works with
Neo4j-Spatial 0.6, which does include the non-batch inserter code, so in
principle should work for you. However, there is a need to change one line
of code in the Ruby to make it use the normal graph API instead of the
batch inserter. I will commit this change later, but for now you would
change line 118 of osm.rb (see
https://github.com/craigtaverner/neo4j-spatial.rb/blob/master/lib/neo4j/spatial/osm.rb#L118),
to instead look like:
        #@importer.import_file batch_inserter, @osm_path
        @importer.import_file normal_database, @osm_path, false, 5000
(basically you replace 'batch_inserter' with 'normal_database' and add the
two extra parameters 'false, 5000').

Looking at the errors you are getting, I see they are, as you suspected,
related to out of date instructions. I will try get round to updating the
instructions soon, but in the meantime:

   - For using the Ruby Gem, you should use the osm_import command (added
   automatically to your path when you install the gem). So you can replace
   the command 'jruby -S examples/osm_import.rb' with just 'osm_import'.
   - When using the code directly from github, there is a jar missing in
   the lib/neo4j/spatial/jars directory. This is the
   neo4j-spatial-0.6-SNAPSHOT.jar, which can be downloaded and copied into
   that directory manually. The direct link to this file on the
m2.neo4j.orgsite is
   
http://m2.neo4j.org/org/neo4j/neo4j-spatial/0.6-SNAPSHOT/neo4j-spatial-0.6-SNAPSHOT.jar

Your last comment about 'includePoints' is just a setting for whether or
not to use all OSM points as individual geometries or not. The default is
false because you normally do not want to be able to search for all points
on a long road, but for the road itself. I recommend leaving this as false,
unless you have a specific need.

Regards, Craig

On Thu, Nov 10, 2011 at 2:51 PM, grimace <macegh...@gmail.com> wrote:

> I ended up trying again with just java (but still running with
> batchInserter), adjusting my memory settings and max heap, it's currently
> working on the americas.osm file from cloudmade -
> http://downloads.cloudmade.com/americas#downloads_breadcrumbs. The file is
> about 99 GB when assembled.
>
> I'm running on ubuntu 11.10 Core 2 Duo 2.Ghz with 4G ram (not very fast,
> but
> what I have available right now),
>
> Java Heap --> -Xmx=3072M
> config settings:
> neostore.nodestore.db.mapped_memory=1000M
> neostore.relationshipstore.db.mapped_memory=300M
> neostore.propertystore.db.mapped_memory=400M
> neostore.propertystore.db.strings.mapped_memory=800M
> neostore.propertystore.db.arrays.mapped_memory=100M
>
> My code is essentially from the test suite that you suggested but I am
> using
> the batchImporter instead.  I'm about 1/3 of the way through and don't want
> to interrupt the process, but when it's done I'll try it without the batch
> importer.  It runs at about 4500 nodes/second.  Is that reasonable? I
> haven't looked at performance numbers from anyone else. Would the non batch
> performance be better?
>
> Is is better to 'includePoints' or not?
>
> One questions I had was, once I get this imported via this method ( neo4j
> embedded ), is it possible to move the imported db to a neo4j server?  I'm
> hoping it is. If so, what would that process be?
>
>
>
> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/osm-import-rb-tp3493463p3496760.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 mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to