[Featureserver] multipolygon support?

Brent Pedersen bpederse at gmail.com
Wed Aug 27 18:57:09 EDT 2008


On Wed, Aug 27, 2008 at 3:04 PM, Jennifer Strahan
<jennifer at greeninfo.org> wrote:
> Hi Brent,
>
> I've just replaced my featureserver with the refactor folder you've pointed
> me to and am getting the following error when trying to load
> my layer.  Is there a config setting that I need to enable MultiPolygon
> support?
>
> Here is my current config:
> [parkinfo_source]
> type=PostGIS
> dsn=dbname=parkinfo_gmapJune08 password=****** user=pgsql
> layer=statewide_osdb_notsvector
> fid=gid
> srid=900913
> attribute_cols=unit_id, unit_name
> geometry=the_geom_google
> gaping_security_hole=yes
>
> Thanks,
> Jennifer
>
> An error occurred: Could not convert geometry of type MultiPolygon.
>
>  File "/var/www/featureserver-refactor082708/web_request/handlers.py", line
> 219, in cgi
>
>   accepts = accepts )
>
>  File "/var/www/featureserver-refactor082708/FeatureServer/Server.py", line
> 174, in dispatchRequest
>
>   mime, data = request.encode(response)
>
>  File "/var/www/featureserver-refactor082708/FeatureServer/Service/WFS.py",
> line 12, in encode
>
>   results = wfs.encode(result)
>
>  File "/var/www/featureserver-refactor082708/vectorformats/Formats/WFS.py",
> line 16, in encode
>
>   results.append( self.encode_feature(feature))
>
>  File "/var/www/featureserver-refactor082708/vectorformats/Formats/WFS.py",
> line 41, in encode_feat
>
> ure
>
>   </fs:%s></gml:featureMember>""" % (layername, feature.id,
> self.geometry_to_gml(feature.geometry)
>
> , "\n".join(attr_fields), layername)
>
>  File "/var/www/featureserver-refactor082708/vectorformats/Formats/WFS.py",
> line 78, in geometry_to
>
> _gml
>
>   raise Exception("Could not convert geometry of type %s." %
> geometry['type'])
>
> {'service': 'WFS', 'format': 'WFS', 'maxfeatures': '25', 'random':
> '0.24812178437562615', 'request':
>
> 'GetFeature', 'unit_id': '23060', 'srs': 'EPSG:900913', 'version': '1.0.0',
> 'bbox': '-13705770.665846553
>
> ,4500765.0988630615,-13506728.644227605,4592183.784675758', 'queryable':
> 'unit_id'}
>
>

hi, i've misled you, but at least fixed a bug in the featureserver WKT.

it looks like only WKT supports Multi (and maybe GeoJSON?).
if you're using openlayers, it supports both of those. hope that helps.



-b



More information about the Featureserver mailing list