[mapserver-users] Order of attributes returned from WFS GetFeature

Havard Tveite havard.tveite at umb.no
Thu Dec 29 03:40:26 PST 2011


I think your subselect has to include gid.

Examples on:
<URL: http://mapserver.org/input/vector/postgis.html#data-access-connection-method >

Håvard

On 12/29/2011 12:19 PM, Dejan Gambin wrote:
> Thanks,
>
> I tried something like:
>
> DATA "the_geom from (select the_geom, attr1, attr2 from table) as new_table using unique gid"
>
> but this doesn't work. Can you tell me how should such a query look like? Now it is like:
>
> DATA "the_geom from table using unique gid"
>
> Thanks very much
>
> regards, dejan
> On 27. pro. 2011., at 22:13, Rahkonen Jukka wrote:
>
>> Hi,
>>
>> The WFS standard defines that attributes are included in a XML sequence. Therefore the returned attributes must be in the same order than in the schema of your feature type.
>>
>> I would suggest also having a try with editing the SQL in the DATA line and selecting attributes as you like but check first if it has an effect on the schema returned by DescribeFeatureType.
>>
>> -Jukka Rahkonen-
>> ________________________________________
>> Lime, Steve D (DNR) wrote:
>>
>>> I don't believe you can control this on the MapServer side. Why not just set the column order
>>> explicitly in the SQL statement?
>>
>>> Steve
>>
>>> -----Original Message-----
>>> From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf>  Of Dejan Gambin
>>> Sent: Thursday, December 22, 2011 7:40 AM
>>> To: mapserver-users at lists.osgeo.org
>>> Subject: [mapserver-users] Order of attributes returned from WFS GetFeature
>>
>>> Hi,
>>
>>> I am using GetFeature request to get the attributes from my PostGIS data. I define attributes with "gml_include_items". The order of attributes is however related to postgis column order, not to the order in gml_include_items.
>>
>> Is it somehow possible to change the order, withoout need to modify column order in PostGIS/PostgreSQL?
>>
>> regards, dejan_______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>

-- 
Håvard Tveite
Department of Mathematical Sciences and Technology, UMB
Drøbakveien 31, POBox 5003, N-1432 Ås, NORWAY
Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/



More information about the MapServer-users mailing list