[Neo4j] GSoC 2011 Neo4j Geoprocessing | Weekly Report #11

2011-08-13 Thread Andreas Wilhelm
Hi,

This week I spent the most of the time with documentation, code 
refactoring and performance optimization.
Also did some benchmarking with Neo4j Spatial and 
PostgreSQL/Postgis(GeoServer).

Best Regards

Andreas

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] neo4j spatial and postgis

2011-08-13 Thread Andreas Wilhelm
Hi,

with the pgsql2shp tool you can dump your postgis db in a shapefile and 
you should be able to import it in Neo4j Spatial in the following way:

String shpPath = SHP_DIR + File.separator + layerName;
ShapefileImporter importer = new ShapefileImporter(graphDb(), new 
NullListener(), commitInterval);
importer.importFile(shpPath, layerName);


Best Regards

Andreas



Am 12.08.2011 11:10, schrieb chen zhao:
 Hi,

 I very interested in neo4j spatial . but I do not know how to import the
 spatial data.

 My data are stored in postgis. I read the document 
 http://wiki.neo4j.org/content/Spatial_Data_Storage; and 
 http://wiki.neo4j.org/content/Importing_and_Exporting_Spatial_Data,but I
 yet do not know to to import data from postgis or import shapfiles.

 Could you provide some detail information?

 Please advice.

 zhao
 ___
 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


Re: [Neo4j] neo4j spatial and postgis

2011-08-13 Thread Craig Taverner
Or if you want a command line import, try the ruby gem 'neo4j-spatial.rb'.
Once installed you can type:
osm_import file.shp
On Aug 13, 2011 10:33 AM, Andreas Wilhelm a...@kabelbw.de wrote:
 Hi,

 with the pgsql2shp tool you can dump your postgis db in a shapefile and
 you should be able to import it in Neo4j Spatial in the following way:

 String shpPath = SHP_DIR + File.separator + layerName;
 ShapefileImporter importer = new ShapefileImporter(graphDb(), new
 NullListener(), commitInterval);
 importer.importFile(shpPath, layerName);


 Best Regards

 Andreas



 Am 12.08.2011 11:10, schrieb chen zhao:
 Hi,

 I very interested in neo4j spatial . but I do not know how to import the
 spatial data.

 My data are stored in postgis. I read the document 
 http://wiki.neo4j.org/content/Spatial_Data_Storage; and 
 http://wiki.neo4j.org/content/Importing_and_Exporting_Spatial_Data,but I
 yet do not know to to import data from postgis or import shapfiles.

 Could you provide some detail information?

 Please advice.

 zhao
 ___
 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
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Heroku Beta: Neo4j - A Rails Example?

2011-08-13 Thread Andreas Ronge
Hi Sasha

You are right, your application might become more complex if you split it up
the application into a backend and a frontend part using the neo4j
server/heroku add on.
The tight integration in Rails of the active model objects in the view which
make things like validation, creating nested model object, http routing,
paginatation, or using other rails plugins (etc...) will not work out of the
box when you split up your application with your own HTTP API.
However, if your view uses a lot of javascript talking to rails controllers
 (e.g. single page javascript application) then a neo4j server solution
would probably be a good choice.
Also, it might feel better having the database as a service rather then as
an embedded database.

I would still use rails in the backend neo4j server unless the application I
develop was very small. (I have not tried this yet.)
Rails is a great framework for writing REST/HTTP services.

ps: Hope you don't mind that I post this on the neo4j.rb mailing list

Cheers
Andreas

On Fri, Aug 12, 2011 at 11:08 PM, Michael Hunger 
michael.hun...@neotechnology.com wrote:

 Sasha you can clone the example github repo (that's also mentioned in the
 docs):

 https://github.com/tbaum/script-extension-example

 Remove the .git directory and add it as a new repo to your github account.

 Feel free to change whatever you'd like (Gemfile, code, whatever).

 Michael

 Am 12.08.2011 um 23:00 schrieb Sasha Agafonoff:

 Hi Michael,

 That's all very helpful and makes a huge amount of sense.  Thanks very much
 for committing your time to replying - I appreciate you making the effort!

 I'd be really grateful for any suggestions from the group/list as to
 getting started on writing a Rails 3 front end to leverage the backend
 database.  Perhaps if anyone else has started using the Heroku Add-on and
 they are able to do so, they could share a basic template (perhaps on
 GitHub) so I could get a better sense of how to get the plumbing working...
 :-)

 Cheers, Sasha

 On 12 August 2011 16:31, Michael Hunger 
 michael.hun...@neotechnology.comwrote:

 The point is: You don't want to run your webapp in your database.

 A customer facing rails3 app is an webapp with lots of javascript, UI,
 images, views etc which also has to be scaled to many instances.

 On the other hand it needs data to work with. The source of the data is a
 database in this cause a graph database.

 But it is much better to talk to your database in terms of your domain
 (e.g. users, blog posts comments) instead of nodes and relationships. So you
 basically cut of that lower layer that talks directly to the graph database
 (and which is very performance sensitive) and move it over to the db.

 Then you can define the typical use-cases you need for your webapp to
 render a page and have the domain level endpoints in your database server
 that provide the _domain level_ data for this rendering process in this
 granularity and size.

 HTH

 Michael

 P.S: And without a frontend (just having the user management
 system-domain model running on the graph) (in the neo4j-server in our case)
 doesn't help you because you don't have to show anything to anyone (no UI).
 Am 12.08.2011 um 22:02 schrieb Sasha Agafonoff:

 PPS: I move this discussion to the users list as others probably want to
 chime in.


 Hi Michael,

 Thanks for your email!  I am keen to use neo4j.rb rather than neography.
  The process set out in your example for setting up a back-end neo4j server
 on Heroku seems pretty straightforward, and I think I understand how I can
 define domain models and deploy them that way.  I think with a bit of effort
 I could work out how to build something as a Rails front end to work with
 this, but with my limitations as a coder I don't think I'll do a fantastic
 job of it.

 Where I'm struggling is in understanding why I'd need to write two
 separate apps (backend-frontend) and not be able to write a single app built
 in the same way as the Rails Project Template (
 http://neo4j.rubyforge.org/guides/rails3.html) that Andreas has made
 available on GitHub.  Using that template, I could get rolling with a user
 management system and domain model very quickly.

 Andreas: not sure if you have any suggestions about bridging this gap?
  Maybe I'm missing something simple...?

 Cheers, Sasha

 On 11 August 2011 18:27, Michael Hunger michael.hun...@neotechnology.com
  wrote:

 Sasha,

 our rails(3) experience is rather limited. We can ask Andreas if he can
 come up with something, but I can't make any promises.

 On the frontend web-app side you're free to do whatever rails stuff you
 want anyway.

 On the server side we'd like to encourage really tight, persistence
 centric REST-applicaitions that talk on a domain level to the
 frontend-webapp that runs on Heroku.

 So for a backend rails-REST-app it would perhaps best to look for a
 good rails3-REST-App example and create something similar, just that it uses
 neo4j.rb instead of the built-in 

Re: [Neo4j] Defining relationships declaritavely or with annotations

2011-08-13 Thread etc1
Mike,

Using Spring Data Graph, when defining a node entity using annotations...

@NodeEntity
public class User...

... the following code not work compileEclipse complains that the
persist() method is not defined for class User, which is true, but in the
imdb sample project it's coded the same way for Actor, Movie, etc. What am I
missing? 

..new User(...).persist();




-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On
Behalf Of Michael Hunger
Sent: Monday, August 08, 2011 8:59 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Defining relationships declaritavely or with
annotations

What does make you think it not being very mature? As one of the project
leads I'm very interested in your thorough evaluation.

There are other libraries that follow a similar approach (annotation based
mapping), like jo4neo.

Neo4j itself is about the core-database, higher level bindings or drivers
are provided mostly by the community.

Michael

Am 09.08.2011 um 02:44 schrieb etc1:

 Hi Michael,
 
 I saw that, but it does not look very mature. Does neo4j offer any 
 other options aside from doing it in the code? XML config, etc, 
 anything but hardcoding programmatically.
 
 -Original Message-
 From: user-boun...@lists.neo4j.org 
 [mailto:user-boun...@lists.neo4j.org] On Behalf Of Michael Hunger
 Sent: Monday, August 08, 2011 8:41 PM
 To: Neo4j user discussions
 Subject: Re: [Neo4j] Defining relationships declaritavely or with 
 annotations
 
 You might look into Spring Data Graph for a declarative object graph 
 mapping.
 
 See:
 
 http://springsource.org/spring-data/neo4j
 http://bit.ly/sdg-html
 
 Cheers
 
 Michael
 
 Am 09.08.2011 um 02:34 schrieb etc1:
 
 Hi,
 
 Is it possible to define relationships using declarative 
 configuration or annotations? The Getting Started guide illustrates 
 how to do it programmatically, but I prefer to keep relationship 
 mappings outside of the code, it will be easier to maintain.
 
 Thanks
 
 ___
 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
 
 ___
 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

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user