I think I figured this one out on my own after some more digging
through the JavaDoc and source code.

I can call the getVisibleLayers() method of the LayerManager to get
the layers displayed on the screen. I can then iterate through the
Layer objects returned by getVisibleLayers(), calling the query()
method of underlying FeatureCollection to return the features
contained by the FeatureCollection within the envelope.

I do have a couple more related questions though. :]

[1] How do obtain a reference to the LayerManager for the current
LayerViewPanel?

[2] What purpose does the boolean value passed to the
getVisibleLayers() method serve?

The Sunburned Surveyor



On 8/26/06, Sunburned Surveyor <[EMAIL PROTECTED]> wrote:
> I don't know how many of you guys are on the list on the weekend, but
> I thought this would be worth a shot.
>
> I'm working through the concept for some new snapping/drafting tools
> for JUMP/OpenJUMP. I'd like to know if it is possible to get all of
> the features on the current LayerViewPanel that are within, or
> intersect, an envelope on the screen.
>
> Can I do this with the featuresWithVertex() method of the
> LayerViewPanel class, or is there another method I should be using?
>
> (I looked at the Javadoc, the source code, searched online, and
> checked out some of the existing cursor tools that use a form of
> snapping, but I couldn't for the life of me figure this out.)
>
> I know I that I could use an envelope to search through all the
> geometries of each layer displayed in the LayerViewPanel, but it would
> be a lot quicker if I could just search through the Features OpenJUMP
> had displayed on the screen. (This is especially if large layers are
> displayed and the current view of the LayerViewPanel is just a small
> portion of these layers.)
>
> So, how do I select all features displayed on the LayerViewPanel that
> intersect or are contained in an Envelope?
>
> Thanks,
>
> The Sunburned Surveyor
>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to