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

Reply via email to