Bernhard Kastner wrote:
thanks for updating the Example, it still doesn't work, but it gave me new hints on the filter-thing though. The problem is, that you used "Expression geometry = ff.createAttributeExpression( "road" );" which would expect a createAttributeExpression with a string parameter. This one doesn't exist. I tried playing around with the other createAttributeExpression-Methods, but couldn't figure out a working code...
Um - road was just an example. the geometry attribute may be called "the_geom" or whatever. You can run through your attributes and check if any of them are instanceof GeometryAttribute.

The second part of that example shows you how to look up the "default geometry" name.

FeatureType featureType = dataStore.getSchema( typeName );
String geometryName = featureType.getDefaultGeomety().getName();

So it would then be ff.createAttributeExpression( geometryName );

Could you please check this?

Jody Garnett wrote:

Bernhard Kastner wrote:

Hi list,

I've got a question concerning the bounding box tutorial on www.geotools.org (http://www.geotools.org/display/GEOTOOLS/Using+a+bounding+box+Filter)

There are 2 undeclared variables, called "ds" which I assumed to be a DataSource and "featureType", where I really have no idea how to get it :)

Anyways, I contacted the writer of the tutorial, and he said, he didn't wrote it. So there is something going wrong with the tutorial-section. However, he told me to ask the mailing list, and that's what I'm doing :)

Can somebody explain the code please?


Better yet I will try fixing it ;-) You may note the comment at the bottom where some asked the same question back in June.

ds is a DataStore (think database or shapefile)
featureType is the description of the contents (think table columns or file header)

Let me know if that works out for you (and feel free to update anything on the website yourself, just login and start hacking).

Jody






-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to