NHibernate Forge
The official new home for the NHibernate community

Introduction

Article
Comments (9)
History (5)

Introduction

NHibernate.Spatial, spatial extensions for NHibernate, allows you to connect NHibernate to a spatially enabled database and manipulate geometries in HQL or in .NET code using NetTopologySuite, providing you with a fully integrated GIS programming experience.

There is also a similar but independent effort for Java: Hibernate Spatial.

Features: 

  • Geometry types: Geometry columns are mapped to .NET geometry types compliant with OGC specifications.
  • Dialects: MsSqlSpatial, PostGIS  MySQL and SQL Server 2008 are supported. The most common spatial functions are registered for use within HQL, providing compatible queries among different dialects.
  • Criteria: Spatial relations functions such as IntersectsWithinCrosses, etc.
  • Projections: Spatial aggregate, analysis and tranformation functions.
  • Schema generation: Support for automatic creation and droping of auxiliary data objects (eg. registering of geometry columns in metadata table).
  • Metadata mappings: Built-in mappings to spatial metadata through GeometryColumns and SpatialReferenceSystem classes. 

Requirements:

  • .NET 2.0
  • NHibernate 2.0.1.GA

Installation:

  • Download latest sources and build. Copy the binaries to your project's libraries folder.
  • In you project, add references to NHibernate.dll, NHibernate.Spatial.dll, NetTopologySuite.dll, GeoAPI.dll and to provider assembly (eg. NHibernate.Spatial.PostGis.dll).

Recent Comments

By: bercy Posted on 02-08-2010 19:09

Hi, for a project in my company, I've implemented an Oracle user defined type (UDT) to map the Oracle Geometry data type, and I've extended the NHibernate Oracle driver to support this type in NHibernate mapping. I can share the code if someone is interested.

By: Banks Posted on 01-04-2010 20:28

Schema generation: Support for automatic creation and droping of auxiliary data objects (eg. registering of geometry columns in metadata table).

By: cofee Posted on 01-27-2009 23:15

Hi Ricardo,

I want to know what is the status of the NHibernate.Spatial.Oracle?

I have a small project that can be used with Oracle and I want to evaluate if it is possible to implement with NHibernate Spatial.

Thank you

Ricardo Pedro

By: Ricardo Stuven Posted on 10-24-2008 13:59

Oracle Spatial support is under development. See nhcontrib.svn.sourceforge.net/.../NHibernate.Spatial.Oracle

It has been more difficult to implement than any other provider, so development is going at a slow pace. I expect it will not be available in this release cycle (1.0.x) but in the next one (1.1.x)

By: Steve Bohlen Posted on 10-24-2008 9:14

I notice that conspicuously absent from the list of supported spatial dialects is Oracle Spatial, perhaps the grand-daddy of all spatially-enabled DB platforms.  Is there any intention/effort underway to develop a dialect that would support ORA in addition to the present MS and OSS spatial targets?

We are an avid user of NHibernate at my organization and also do significant GIS work, but most if not all of our spatial backend infrastructure for our projects tends to be ORA rather than the present listed DB targets.

Thanks for any info you can provide (and yes, I know that if there isn't an effort underway, you'd be glad to accept a patch <g>).

View All
Powered by Community Server (Commercial Edition), by Telligent Systems