I don't spot any obvious mistake could you compare the filter produced in the 
debugger and see how they are different internally.
Jody

On 09/06/2010, at 8:15 PM, Fred Lehodey wrote:

> Hi,
> well, learning Java with geotools in NB IDE is not very simple, but here we 
> go... ;-) 
> 
> 
> My problem is with the Filter (I suppose): 
> Filter filter = 
> filterFactory.intersects(filterFactory.property(geometryAttributeName), 
> filterFactory.literal(bbox));
> 
> When trying to open the Iterator (I suppose too..!!):
> FeatureIterator iter = selectedFeatures.features();
> 
> I don't know why, but doing the same with CQL works perfectly:
> filter2 = CQL.toFilter("BBOX(the_geom," + Double.toString(bbox.getMinX()) + 
> "," + Double.toString(bbox.getMinY()) + "," + Double.toString(bbox.getMaxX()) 
> + "," + Double.toString(bbox.getMaxY()) + ")");
> 
> I need to learn more (years?)... ;-) 
> Thanks for examples code... (selectionLab here)
> 
> Regards,
> Fred.
> 
> 
> 
> On Tue, Jun 8, 2010 at 3:19 PM, Fred Lehodey <[email protected]> wrote:
> Hi,
> (newbie question)
> 
> I am trying the SelectionLab example with o Postgis layer. (PSQLException: 
> ERROR: parse error - invalid geometry ?)
> 
> 
> thanks for any help.
> Fred
> PS: I have a 404 Not Found at http://docs.geotools.org  >> link browse 
> geotools API (http://geotools.org/javadocs/)
> 
> 
> 
> ------------------------
> java.lang.RuntimeException: java.io.IOException
>         at 
> org.geotools.data.store.ContentFeatureCollection.features(ContentFeatureCollection.java:220)
>         at example.mapita.selectFeatures(mapita.java:373)
>         at example.mapita$5.onMouseClicked(mapita.java:262)
>         at 
> org.geotools.swing.tool.MapToolManager.mouseClicked(MapToolManager.java:130)
>         at 
> java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
>         at 
> java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:252)
>         at java.awt.Component.processMouseEvent(Component.java:6044)
>         at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
>         at java.awt.Component.processEvent(Component.java:5806)
>         at java.awt.Container.processEvent(Container.java:2058)
>         at java.awt.Component.dispatchEventImpl(Component.java:4413)
>         at java.awt.Container.dispatchEventImpl(Container.java:2116)
>         at java.awt.Component.dispatchEvent(Component.java:4243)
>         at 
> java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
>         at 
> java.awt.LightweightDispatcher.processMouseEvent(Container.java:3995)
>         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
>         at java.awt.Container.dispatchEventImpl(Container.java:2102)
>         at java.awt.Window.dispatchEventImpl(Window.java:2440)
>         at java.awt.Component.dispatchEvent(Component.java:4243)
>         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
>         at 
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
>         at 
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
>         at 
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
>         at 
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
>         at 
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
>         at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
> Caused by: java.io.IOException
>         at 
> org.geotools.jdbc.JDBCFeatureSource.getReaderInternal(JDBCFeatureSource.java:568)
>         at 
> org.geotools.jdbc.JDBCFeatureStore.getReaderInternal(JDBCFeatureStore.java:209)
>         at 
> org.geotools.data.store.ContentFeatureSource.getReader(ContentFeatureSource.java:481)
>         at 
> org.geotools.data.store.ContentFeatureCollection.features(ContentFeatureCollection.java:217)
>         ... 25 more
> Caused by: org.postgresql.util.PSQLException: ERROR: parse error - invalid 
> geometry
>         at 
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
>         at 
> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
>         at 
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
>         at 
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
>         at 
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:353)
>         at 
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:252)
>         at 
> org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
>         at 
> org.geotools.jdbc.JDBCFeatureReader.<init>(JDBCFeatureReader.java:145)
>         at 
> org.geotools.jdbc.JDBCFeatureSource.getReaderInternal(JDBCFeatureSource.java:562)
>         ... 28 more
> 8/Jun/2010 14:56:01 org.geotools.jdbc.JDBCFeatureReader finalize
> 
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate 
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
> lucky parental unit.  See the prize list and enter to win: 
> http://p.sf.net/sfu/thinkgeek-promo_______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to