Alex Trofast ha scritto:
>  Thanks for your response Andrea,
> 
> Regarding FilterFactory I was just really wondering if it made use of 
> the FilterToSql class when building filters.

Nope, FilterFactory is completely stand alone, does not use anything
else. It would not make sense for it to use a sql encoding artifact
either, OGC filters are data storage independent.

> The follow test errors out 
> (JDBCFeatureSourceTest):
> 
>         FilterFactory ff = dataStore.getFilterFactory();
>         SortBy sort = ff.sort(aname("stringProperty"), 
> SortOrder.ASCENDING);
>         DefaultQuery query = new DefaultQuery();
>         query.setSortBy(new SortBy[] { sort });
> 
>         SimpleFeatureCollection features = 
> featureSource.getFeatures(query); <--- HERE
> 
> With a NullPointerException. I'm uncertain as to why that is and having 
> some difficult tracking it down.

If the NPE is really there I guess your featureSource is null.
Odd, but checks what's going on when the code grabs it.

> 
> The way I build geometries is through a AsBinary(col_name) then in 
> decodeGeometryValue I do this:
> 
>         try {
>             byte bytes[] = rs.getBytes(column);
> 
>             if(bytes == null) {
>                 return null;
>             }
>             Geometry geom = (Geometry) new WKBReader().read(bytes);
>             return geom;
>         }
> 
> There are no exceptions as far as I can tell so the read is okay. 
> AsBinary will return WKB as per the specification.

Unfortunately I have no idea. I would have debug step by step through
the code, but you can do the same as well.

Cheers
Andrea


-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to