[Geoprisma-users] InitialView troubles

Philippe Gregoire philippe.gregoire at boreal-is.com
Mon Aug 15 02:59:01 EDT 2011


Hi list,

I am encoutering some problems with the InitialView 
widget. I want to show multiple polygons that have the same te_tenure_id
 value. I have this configuration in my  xml configuration file:

        <initialview>
            <name>InitialViewTenures</name>
            <options>
                <urlfield>te_tenure_id</urlfield>
                <queryfield>te_tenure_id</queryfield>
              
  <defaultzoom>7</defaultzoom>
                <highlight>true</highlight>
            </options>
        </initialview>

When I call GeoPrisma with the option "&te_tenure_id=1564", the URL request sent to featureserver looks like this:
/featureserver/featureserver.cgi/tenures?random=0.8489123610585759&queryable=te_tenure_id&te_tenure_id=1564

But this request produces an error in FeatureServer:
An error occurred: 'NoneType' object has no attribute 'has_key'
  File "D:\Borealis\pact\System\GeoPrisma\ms4w\Apache\htdocs\featureserver\web_request\handlers.py", line 219, in cgi
    accepts = accepts )
  File "D:\Borealis\pact\System\GeoPrisma\ms4w\Apache\htdocs\featureserver\FeatureServer\Server.py", line 167, in dispatchRequest
    result = method(action)
  File "D:\Borealis\pact\System\GeoPrisma\ms4w\Apache\htdocs\featureserver\FeatureServer\DataSource\PostGIS.py", line 157, in select
    filters = self.feature_predicates(match)
  File "D:\Borealis\pact\System\GeoPrisma\ms4w\Apache\htdocs\featureserver\FeatureServer\DataSource\PostGIS.py", line 92, in feature_predicates
    if feature.geometry.has_key("coordinates"):However, if I remove the "queryable=te_tenure_id" option from the URL, FS responds correctly.

So,
 is there an easy solution to my problem? I would need whether a way to 
remove the "queryable=te_tenure_id" option from the URL request sent by 
GP to FS, or I would need to make sure that my request returns the right
 thing even with this option.


Here is my FS config if that helps:



[tenures]

type=PostGIS

dsn=host=127.0.0.1 port=6433 dbname=pact_dev_data user=gpuser password=GP_RULES

layer=te_vg_tenure_featureserver

fid=unique_id

geometry=the_geom_900913_single

srid=900913

encoding=iso-8859-1

attribute_cols=te_tenure_id

gaping_security_hole=yes

I am using GeoPrisma r1034


Thanks!



Philippe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geoprisma-users/attachments/20110814/b488f133/attachment.html


More information about the Geoprisma-users mailing list