Hi Fabio, Could you be more precise? I don't understand your solution.
Thanks -- Denis On 19 juil, 16:53, Fabio Maulo <[email protected]> wrote: > mapper.AddPropertyPattern(mi => mi.GetPropertyOrFieldType() == > typeof(IGeometry), > pm => pm.Type<GeometryType>(new { srid = 4326, subtype = "GEOMETRY" })); > > On Mon, Jul 19, 2010 at 11:43 AM, Jason Dentler <[email protected]>wrote: > > > > > > > Hi, > > > I'm no Spatial expert, but can you share your mapping for > > GeolocalisableSite? > > From the bit of Spatial I've done, it seems that Spatial should set the SRID > > of dalles to match the SRID used in the mapping for the Shape property. > > * > > * > > Thanks, > > Jason > > > On Mon, Jul 19, 2010 at 3:41 AM, di99er <[email protected]> wrote: > > >> [English Version] > >> Hello, > > >> I wish to use the Intersects' function of NHibernate Spatial with Sql > >> Server 2008 Database. > >> My data have a SRID = 4807. > > >> IList<Geolocalisable<IGeometry>> result; > >> ICriteria query; > > >> // From > >> query = this.Session.CreateCriteria<GeolocalisableSite>(); > > >> // Where > >> query.Add(SpatialExpression.Intersects("Shape", dalles)); > > >> result = query.List<Geolocalisable<IGeometry>>(); > > >> return result; > > >> The given parameter for the geometry has a SRID = 4807, but the query > >> generated doesn't have a SRID, so Sql Server returns no result. > > >> Actual query: > >> select * > >> from site > >> where shape.STIntersects('POLYGON((0 0,0 400000,400000 400000,400000 > >> 0,0 0))') = 1; > > >> Expected query or equivalent: > >> select * > >> from site > >> where shape.STIntersects(geometry::STGeomFromText('POLYGON((0 0,0 > >> 400000,400000 400000,400000 0,0 0))',4807)) = 1; > > >> How do you do? > > >> Thanks > > >> [French Version] > >> Bonjour, > > >> Je souhaite utiliser la fonction Intersects de NHibernate Spatial sur > >> une base de données Sql Server 2008. > >> Mes données ont un SRID = 4807. > > >> IList<Geolocalisable<IGeometry>> result; > >> ICriteria query; > > >> // From > >> query = this.Session.CreateCriteria<GeolocalisableSite>(); > > >> // Where > >> query.Add(SpatialExpression.Intersects("Shape", dalles)); > > >> result = query.List<Geolocalisable<IGeometry>>(); > > >> return result; > > >> La géométrie que je passe en paramètre à un SRID de 4807, mais la > >> requête générée n'inclut pas le SRID, donc Sql Server ne retourne > >> aucun résultat. > > >> Requête générée: > >> select * > >> from site > >> where shape.STIntersects('POLYGON((0 0,0 400000,400000 400000,400000 > >> 0,0 0))') = 1; > > >> Requête souhaitée ou équivalente: > >> select * > >> from site > >> where shape.STIntersects(geometry::STGeomFromText('POLYGON((0 0,0 > >> 400000,400000 400000,400000 0,0 0))',4807)) = 1; > > >> Comment faites vous ? > > >> Merci > > >> -- > >> You received this message because you are subscribed to the Google Groups > >> "nhusers" group. > >> To post to this group, send email to [email protected]. > >> To unsubscribe from this group, send email to > >> [email protected]<nhusers%[email protected] > >> > > >> . > >> For more options, visit this group at > >>http://groups.google.com/group/nhusers?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "nhusers" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<nhusers%[email protected] > > > > > . > > For more options, visit this group at > >http://groups.google.com/group/nhusers?hl=en. > > -- > Fabio Maulo -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
