You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I indexed MultiPolygon using this
IDictionary<string, string> margs = new Dictionary<string, string>
{
["SpatialContextFactory"] = typeof(NtsSpatialContextFactory).FullName
};
var ctx = SpatialContextFactory.MakeSpatialContext(margs, GetType().Assembly);
SpatialPrefixTree trie = new QuadPrefixTree(ctx, 12);
_locationfindstrategy = new TermQueryPrefixTreeStrategy(trie, "geo");
then indexed each polygon via
IShape area = ctx.ReadShapeFromWkt(v.wktstr);
Document doc = new Document();
doc.Add(new TextField("id", v.stname, Field.Store.YES));
Field[] fields = _locationfindstrategy.CreateIndexableFields(area, 0.025);
foreach (Field field in fields)
{
doc.Add(field);
}
Now I am trying to search documents containing a point (For example , say i want to find the city from lat/long, and I have stored polygon shapes of city )
I am closing this because it is not a bug that needs addressing in Lucene.NET. Please direct usability questions to StackOverflow or the Lucene.NET user mailing list. You will be much more likely to get an answer to your question on StackOverflow when specifying both lucene.net and lucene tags.
Hello,
I indexed MultiPolygon using this
IDictionary<string, string> margs = new Dictionary<string, string>
{
["SpatialContextFactory"] = typeof(NtsSpatialContextFactory).FullName
};
then indexed each polygon via
IShape area = ctx.ReadShapeFromWkt(v.wktstr);
Document doc = new Document();
doc.Add(new TextField("id", v.stname, Field.Store.YES));
Field[] fields = _locationfindstrategy.CreateIndexableFields(area, 0.025);
foreach (Field field in fields)
{
doc.Add(field);
}
Now I am trying to search documents containing a point (For example , say i want to find the city from lat/long, and I have stored polygon shapes of city )
IPoint upperleft = ctx.MakePoint(92.515830993652514, 10.8976411819458);
Query query = _locationfindstrategy.MakeQuery(new SpatialArgs(SpatialOperation.Contains, upperleft));
I am getting error - Opeation Not supported
Is there any other mechanism which i can use
The text was updated successfully, but these errors were encountered: