On Jan 28, 2010, at 5:55 AM, <[email protected]> <[email protected]
> wrote:
Hi Dane,
http://trac.mapnik.org/ticket/503
Thanks!
I've tried using a bigger box in postgis.cpp and it work ok. I'm now
sending the 'tol' parameter from mapnik.cpp by just modifiying the
features_at_point() method definition and implementation, so that
the 'tol' parameter is compulsory. In order to send a patch for
inclusion, is this the way to go or do you want any other strategy
to be implemented?
I'm not sure till I have time to test myself. So what you come up with
is a great resource.
Also, I would like to allow to specify the parameter through
configuration (overwrite default tolerance) on a per layer basis, is
that ok?
Yes, certainly if it is truly needed that is a possibility to add
tolerance to the Layer class.
Which branch / tag should I follow for fixes?
Ideally trunk, however trunk is currently a bit unstable and a number
of objects have changed (e.g Envelope -> box2d), so it is fine to
check out the 0.7.0 release from svn:
http://svn.mapnik.org/tags/release-0.7.0/
and apply patches against that, and I can handle upgrading them to
trunk.
Thanks in advance!
De: Dane Springmeyer [mailto:[email protected]]
Enviado el: miƩrcoles, 27 de enero de 2010 20:29
Para: Clos Crespo, Manel
CC: [email protected]
Asunto: Re: [Mapnik-users] GetFeatureInfo tolerance
Manel,
Nice catch. Could you file a ticket on this at trac.mapnik.org?
Seems we do need a tolerance for the features_at_point() query as
well when querying point geometries. It would be good to audit the
other datasource plugins at the same time as this support is added
to the PostGIS plugin.
Thanks,
Dane
On Jan 27, 2010, at 4:04 AM, <[email protected]> <[email protected]
> wrote:
Hi,
I've two layers in PostGIS: multipolygon and point. When using
GetFeatureInfo I successfully get results for the polygon layer,
but it is _very_ difficult to get results for the point layer. One
needs to click _exactly_ on top of the point and still you won't be
able to get results most of the time. Using mapnik 0.7.0.
I've tracked this down to map.cpp, Map::query_map_point(), where
the number of features returned is 0 for the point layer:
featureset_ptr fs = ds-
>features_at_point(mapnik::coord2d(x,y));
int count = 0;
while (fs->next()) {
count++;
}
std::clog << "--> num features = " << count <<
"\n";
... and is 1 for the polygon layer. So, this happens _before_ the
"hit_test_filter".
Looking at plugins/input/postgis/postgis.cpp, features_at_point(),
I can see the envelope has no "margin" or "radius" or "tolerance".
Envelope<double> box(pt.x,pt.y,pt.x,pt.y);
std::string table_with_bbox =
populate_tokens(table_,FMAX,box);
Is there a tolerance that can be specified in postgis? how can I
solve this?
Thanks in advance!
Manel Clos
UMAT - 972419417
Ajuntament de Girona
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users