Hi Ian,
Jody Garnett opened Jira issue https://jira.codehaus.org/browse/GEOT-4722. If
I can provide any additional info I’m happy to do so.
Hal
From: Ian Turton [mailto:ijtur...@gmail.com]
Sent: Thursday, March 06, 2014 2:35 AM
To: Hal Mirsky
Cc: Geotools-Devel list; geotools-users
Subject: Re: [Geotools-gt2-users] GeoTools 11-RC2 released today
Hal,
Did you raise a JIRA for this issue?
Ian
On 4 March 2014 17:00, Hal Mirsky <hmir...@aseg.com> wrote:
Good morning Ian,
On Feb 27 I reporting ta NullPointerException exception under 11-RC1 to
'geotools-gt2-users (see below). I just rebuilt the same code (SelectionLab)
with 11-RC2 and am seeing the same problem. If I can provide any additional
details, I’d be happy to do so.
Hal
From: Hal Mirsky [mailto:hmir...@aseg.com]
Sent: Thursday, February 27, 2014 9:33 AM
To: 'geotools-gt2-users@lists.sourceforge.net'
Subject: intersects raises NullPointerException
Hello,
While running the SelectionLab example with 11-RC1, I get a null pointer
exception when I use the ‘select tool’ to click on a feature. Specifically,
the exception is raised on the call to selectedFeatures.features(); I’ve traced
it to the ExtractBoundsFilterVisitor.visit function returning null. Does this
look like a bug?
// from SelectionLab.java:
AffineTransform screenToWorld =
mapFrame.getMapPane().getScreenToWorldTransform();
Rectangle2D worldRect =
screenToWorld.createTransformedShape(screenRect).getBounds2D();
ReferencedEnvelope bbox = new ReferencedEnvelope(
worldRect,
mapFrame.getMapPane().getMapContent().getCoordinateReferenceSystem());
/*
* Create a Filter to select features that intersect with
* the bounding box
*/
Filter filter = ff.intersects(ff.property(geometryAttributeName),
ff.literal(bbox));
/*
* Use the filter to identify the selected features
*/
try {
SimpleFeatureCollection selectedFeatures =
featureSource.getFeatures(filter);
SimpleFeatureIterator iter = selectedFeatures.features();
// from ExtractBoundsFilterVisitor
@Override
public Object visit(PropertyName expression, Object data) {
return null;
}
Here’s the stack trace:
Mouse click at: DirectPosition2D[6349881.5871864, 2029348.2224553742]
java.lang.NullPointerException
at
org.geotools.data.shapefile.ShapefileFeatureSource.getReaderInternal(ShapefileFeatureSource.java:237)
at
org.geotools.data.shapefile.ShapefileFeatureStore.getReaderInternal(ShapefileFeatureStore.java:126)
at
org.geotools.data.store.ContentFeatureSource.getReader(ContentFeatureSource.java:563)
at
org.geotools.data.store.ContentFeatureCollection.features(ContentFeatureCollection.java:165)
at com.aseg.StyleLab.SelectionLab.selectFeatures(SelectionLab.java:217)
at
com.aseg.StyleLab.SelectionLab$1$1.onMouseClicked(SelectionLab.java:161)
at
org.geotools.swing.event.DefaultMapMouseEventDispatcher.mouseClicked(DefaultMapMouseEventDispatcher.java:99)
at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
…
Thanks for any feedback,
Hal
From: Ian Turton [mailto:ijtur...@gmail.com]
Sent: Tuesday, March 04, 2014 2:20 AM
To: Geotools-Devel list; geotools-users
Subject: [Geotools-gt2-users] GeoTools 11-RC2 released today
Please check out the new GeoTools release candidate, this is planned as the
last release before the final release of 11.0 so this is your last chance to
shake it down before production. See the blog post at
http://geotoolsnews.blogspot.co.uk/2014/03/geotools-11-rc2-released.html for
more details.
Ian
--
Ian Turton
--
Ian Turton
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users