|
From: Nicolas M. <N.M...@le...> - 2011-08-24 13:56:57
|
Excellent, thanks Michael. Nick On 24 Aug 2011, at 14:35, Michael Bedward wrote: > Hi Nick, > > If you are using a JTS QuadTree as your spatial index class you can > stick anything you like into it, including the Geometry itself... > > Polygon poly = ... > myIndex.insert(poly.getEnvelopeInternal(), poly); > > Michael > > > On 24 August 2011 23:01, Nick Malleson <N.M...@le...> wrote: >> Hi, >> >> Really quick question, sorry if this has already been asked (I couldn't find >> anything in the archives). I know that to create a spatial index for lines >> you can put a a LocationIndexedLine into the index, e.g. >> >> Envelope bounds = featureGeometry.getEnvelopeInternal(); >> LocationIndexedLine lin = new LocationIndexedLine(featureGeometry); >> spatialIndex.insert(bounds, lin); >> >> My question is: is there an equivalent to LocationIndexedLine that you can >> use to put polygon data into the index? >> >> Thanks in advance, >> Nick >> >> -- >> View this message in context: http://osgeo-org.1803224.n2.nabble.com/Polygon-objects-into-a-spatial-index-tp6720039p6720039.html >> Sent from the geotools-gt2-users mailing list archive at Nabble.com. >> >> ------------------------------------------------------------------------------ >> EMC VNX: the world's simplest storage, starting under $10K >> The only unified storage solution that offers unified management >> Up to 160% more powerful than alternatives and 25% more efficient. >> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev >> _______________________________________________ >> Geotools-gt2-users mailing list >> Geo...@li... >> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users >> |