I think the JAI warning is fine; it is used for some of the more exotic 
transformations.
However I think I understand what happened to your data!

Computer scientists and geographers have different ideas about what order lat 
and lon go in - to the point where you always need to check what your data *is* 
and cannot make assumptions even if someone tells you the data is in lat/lon 
(chances are the data is in lon/lat because that matches the x/y order people 
expect on screen).

For more information:
- http://snapshots.dist.codehaus.org/geotools/workshop/GeometryCRSWorkbook.pdf
- http://geotoolsnews.blogspot.com/2009/11/foss4g-geotools-tutorials.html

Jody 
On 11/06/2010, at 8:47 PM, Fred Lehodey wrote:

> Just a note:
> when I open the aplication, I have this warning:
> 11/Jun/2010 11:34:29 org.geotools.factory.FactoryRegistry scanForPlugins
> WARNING: Can't load a service for category "MathTransformProvider". Cause is 
> "NoClassDefFoundError: javax/media/jai/WarpAffine".
> 
> Well, for me, this is not relevant... but.... as a newbie... 
> 
> 
> On Fri, Jun 11, 2010 at 11:38 AM, Fred Lehodey <[email protected]> wrote:
> Jody,
> For now, I think it is more probably a bug mine with my data and CRS.
> But I don't understand what happens.
> Trying do check better, I created a shapefile from postgis table with a 
> corresponding .prj from my CRS (srid=27492)
> After that, I added the shapefile into my jMapPane to compare the selection 
> tool.
> But, surprise, when I use the shapefile, my postgis data is rotated 90ยบ while 
> the shape not. (using a desktop GIS, the 2 layers fit perfectly)
> Using only the postgis layer (i.e. without the shapefile), I don't have any 
> rotation.....(!!??)
> 
> I will try to understand better ....  thanks for any idea.....
> Fred.
> 
> 
> 
> 
> 
> On Thu, Jun 10, 2010 at 1:45 PM, Jody Garnett <[email protected]> wrote:
> Hi Fred:
> 
> I am going to be looking at SelectionLab next week myself (I have not tried 
> it yet).
> 
> Meanwhile I think you have found a bug that could be reported to the 
> maintainer of the the PostGIS DataStore. The fact that the request in one 
> datastore and not another is a cause for alarm.
> 
> The only other thing to check is if your data is in the same coordinate 
> reference system in both cases (that is in the shapefile and in postgis).
> 
> Jody
> 
> On 10/06/2010, at 8:50 PM, Fred Lehodey wrote:
> 
>> Hi,
>> 
>> this one from example give the error (stacktrace in first email of thread) 
>> (works fine with SelectionLab example and shapefile but not using Postgis 
>> layer)
>> (org.opengis.filter.Filter)(org.geotools.spatial.filter.IntersetsImpl)
>> [ the_geom intersects ReferencedEnvelope[1131.9037647859777 : 
>> 1133.3958803666853, 233.0239743398967 : 234.51608992060423] ]
>> 
>> Here the second (that works perfectly for what I need):
>> (org.opengis.filter.Filter)(org.geotools.spatial.filter.BBOXImpl)
>> [ the_geom bbox POLYGON ((1131.9037647859777 233.0239743398967, 
>> 1131.9037647859777 234.51608992060423, 1133.3958803666853 
>> 234.51608992060423, 1133.3958803666853 233.0239743398967, 1131.9037647859777 
>> 233.0239743398967)) ]
>> 
>> 
>> Fred.
>> 
>> 
>> On Thu, Jun 10, 2010 at 7:50 AM, Jody Garnett <[email protected]> wrote:
>> 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