NHibernate Forge
The official new home for the NHibernate for .NET community

Introduction

Article
Comments (14)
History (6)
100% of people found this useful

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.1.2.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: Casper Span Posted on 08-30-2011 4:31

Nick, it's not that hard to get the NHibernate Spatial code to run with NHibernate 3. I had to change just a few lines of code and now it's happely getting geoms from MSSQL.

Now I just need the Oracle part... I have found some of the startup code from Ricardo Stuven, (posted on oktober 2008) and I've started to see if I can finish that.

If I get that far, I'll give a holler here.

By: Nick Askew Posted on 03-11-2011 7:54

Is there a version for NHibernate 3 expected any time soon?

By: ginault Posted on 02-19-2011 7:12

download tutorial for free from <a href="http://www.ginault.com">Rolex Watches</a> & <a href="http://www.ginault.com">Rolex Prices</a>.

By: kingofwebguru Posted on 12-10-2010 20:16

Is there plan to support geography data type in MS SQL Server?

By: nestor Posted on 09-28-2010 20:26

Hi,

Thanks for this great help for people who likes NHibernate and GIS world.

Regarding to the requirements, Is there any chance to get it work with NHibernate 2.1.x or 3.x (alpha) ?

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