Hi Axel,

I was away on a trip for a couple of days and did not see this discussion
until now. I see several people have had good advice for you already. I
think I can add to the discussion with some suggestions.

Your original description says two things of interest, there is a GeoJSON
document for all countries (as multi-polygons) and there is an existing
neo4j database of all CMS data. I'm not sure what you mean by CMS data? Is
this an unrelated content management system, and so you are only saying that
you have exerience with neo4j in general, or is this data you wish to use in
a spatial context (together with the world map)? In the former case, I guess
we are only talking about a GeoJSON importer, in the later we are talking
about using Neo4j Spatial to expose spatial information in your existing
database, which is a good use case for Neo4j Spatial, so would be good to
do. Either way, I think the job is not too big.

For the GeoJSON importer, you could write a generic importer supporting the
full GeoJSON spec, or you could write one specific to your case of only
processing multi-polygons for countries.

Another factor to consider, if you model your importer on the code in the
shapefile importer, you will create a database structure somewhat
reminiscent of postgis, with each geometry saved as a WKB blob in a node of
the database. In this case the primary use of Neo4j is for the RTree index.
However, I personally think it would be nicer (better) to store the
world-map as a single connected graph, so that countries that share boarders
actually share the nodes along those boarders. Our OSMImporter for Open
Street Map maintains the OSM graph in Neo4j, as well as exposes individual
geometries for those tools that require them (eg. renderers). You could do a
similar thing if you had a data source that contained that topology. Normal
GeoJSON, however, does not, since it describes each feature or geometry as a
separate object, with no spatial relationship to any other object. Is
GeoJSON the main data source, or can you get a more topologically connected
data source from polymaps?

So, to summarize the options:

   - Write a plain GeoJSON importer that imports to individual WKB
   geometries - very simple, could even base on a raw JSON library and write a
   small mapping layer for your Geometries using JTS, or you could use a
   GeoJSON library like the GeoTools one already suggested
   - Write your own new data model, maintaining connectivity to your other
   data (if that exists) and a 'better' world map graph.
   - If you do not have access to a fully connected world map of countries,
   perhaps using OSM data for this is an alternative to your current data
   source.

Regards, Craig
On Fri, Oct 29, 2010 at 3:30 PM, Axel Morgner <a...@morgner.de> wrote:

> Thanks a lot, I'll give it a try soon.
>
> Am 29.10.2010 08:58, schrieb Jan Boonen:
> > Hi Axel,
> >
> > The FeatureJSON class of GeoTools
> > (
> http://docs.geotools.org/latest/javadocs/org/geotools/geojson/feature/FeatureJSON.html
> )
> > should be able to do the work. Look at the code example in the Javadocs
> > to see if this is what you need.
> >
> > In order to connect it to neo4j, you could use the code from the
> > Shapefile importer.
> >
> > Cheers,
> >
> > Jan
> >
> >
> > On 28-10-2010 17:24, Peter Neubauer wrote:
> >> some example on reading in a FeatureColllection from GeoJSON, but the
> >
> > _______________________________________________
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
>
>
> --
> Axel Morgner
>
> Creative Solutions - Software Engineering
> GUI & UX Design - Project Management
>
> c/o inxire GmbH
> Hanauer Landstr. 293a
> 60314 Frankfurt
> Germany
>
> Phone   +49 151 40522060
> E-mail  a...@morgner.de
> Web     http://morgner.de
>
>
>
>
>
>
> _______________________________________________
> 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