|
From: Gabriella T. <g....@ni...> - 2007-07-26 02:48:23
|
Jody Garnett wrote:
> Cool so we have that point; what is the bounding box you are checking it
> against?
> Also if you can tell me the projection for your shapefile that would be
> good as well ...
>
> I would like to reproduce your problem, and then we can report it as a
> bug (but unless we can give Jesse a test case to reproduce the problem
> it is unlikely to get fixed any time soon).
>
> Jody
>
Jody, I am using the following code:
mapX and mapY are the map coordinates of the mouse click and "the_geom"
should be the point in question.
FilterFactory fff = FilterFactoryFinder.createFilterFactory();
Expression bbox = fff.createBBoxExpression( new Envelope(new
Coordinate(mapX,mapY)));
Expression geometry = fff.createAttributeExpression("the_geom");
GeometryFilter bboxFilter =
fff.createGeometryFilter(AbstractFilter.GEOMETRY_BBOX);
bboxFilter.addLeftGeometry(geometry);
bboxFilter.addRightGeometry(bbox );
FeatureCollection fc = fs.getFeatures(bboxFilter);
The projection is GD49 / NZ Map Grid. If you want the data file I can
put it on our ftp server, it's quite large.
gaby
--
***************************************************************
** Gabriella Turek g....@ni... **
** National Institute of Water & Atmospheric Research (NIWA) **
** PO Box 8602 Christchurch New Zealand +64-3-343-8067 **
***************************************************************
|