I am using NTS in C#. I have loaded the created STRTree and loaded the Geometry data in in.Now i am trying to search if a given lat, long is contained in which matching geometry and return its id. Code snippet is as mentione below:-
spatialIndex = new STRtree(1200); WKTReader rdr = new WKTReader();
IGeometry geometry = rdr.Read("MULTIPOLYGON (((-91.0646309853 38.8105829954, -91.0553050041 38.8105980158, -91.0552829504 38.8112770319, -91.0552639961 38.8119679689, -91.0551899672 38.8136899471, -91.0556060076 38.8136919737, -91.057101965 38.8137429953, -91.0586580038 38.813740015)))");spatialIndex.Insert(geometry.EnvelopeInternal, geometry);
I want to search long, lat (-91.0586580038 38.813740015) and find distance of it (which in current case shpould be 0) from geometry inserted in STRTree.
أكثر...
spatialIndex = new STRtree(1200); WKTReader rdr = new WKTReader();
IGeometry geometry = rdr.Read("MULTIPOLYGON (((-91.0646309853 38.8105829954, -91.0553050041 38.8105980158, -91.0552829504 38.8112770319, -91.0552639961 38.8119679689, -91.0551899672 38.8136899471, -91.0556060076 38.8136919737, -91.057101965 38.8137429953, -91.0586580038 38.813740015)))");spatialIndex.Insert(geometry.EnvelopeInternal, geometry);
I want to search long, lat (-91.0586580038 38.813740015) and find distance of it (which in current case shpould be 0) from geometry inserted in STRTree.
أكثر...