Search Wiki:
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 OGCspecifications.
  • Dialects: MsSqlSpatial and PostGIS are supported. SQL Server 2008 support is at early stage. The most common spatial functions are registered for use within HQL, providing compatible queries among different dialects.
  • Criteria: Spatial relations functions such as Intersects, Within, Crosses, 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 1.2

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).

Configuration and mapping

Sample usage

Last edited Jun 23 at 10:01 AM  by rstuven, version 20
Updating...