Ticket #2850 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

wfs does not provide features

Reported by: wrobell Owned by: pramsey
Priority: normal Milestone: 5.4 release
Component: WFS Server Version: 5.2
Severity: normal Keywords:
Cc: pramsey

Description

please, consider a layer

    LAYER   
        CONNECTIONTYPE postgis
        NAME "alayer"
        CONNECTION "user=foo dbname=foo host=localhost"
        DATA "shape FROM atable"
        STATUS ON
        DUMP TRUE
        TYPE LINE
        CLASS
            COLOR 0 0 0
        END
        METADATA
            "wfs_title"     "Map"
            "gml_featureid" "uuid"
        END

    END

when i use shp2img or access layer using webrowser, then i am getting a map, so layer definition is correct.

the columns of table 'atable' are defined like

uuid varchar(32),
a long,
shape

'atable.a' contains usually numbers like 10 * 10 15 .

if i try to access above layer using WFS, then i am getting no features. no error message, no warning (it seems).

i found few workarounds

  • restrict 'atable.a' to smaller numbers
  • add another column 'atable.b' containing smaller numbers or string and use
    DATA "shape FROM atable using unique b using srid=4326"
    

is there any WFS restriction on column length? it would be nice to get some error message then.

of course, using no workarounds would be the best thing :)

Change History

Changed 4 years ago by dmorissette

  • cc pramsey added
  • milestone set to 5.4 release

Addind Paul to CC since that sounds postgis-related

Changed 4 years ago by pramsey

  • owner changed from mapserverbugs to pramsey

Can you attach a small table dump that shows the problem, and confirm this but is exhibiting on 5.2?

Changed 4 years ago by wrobell

yes, the problem described above exists using mapserver 5.2.

sample data

create table atable (
    uuid varchar(32) unique,
    a bigint primary key
);

select AddGeometryColumn('atable', 'shape', 4326, 'LINESTRING', 2);

insert into atable (uuid, a, shape)
values(md5('1'),
    400000000000000001,
    st_geomfromtext('LINESTRING(-6.269631 53.341303, -6.269631 53.342303)', 4326));

if i change 400000000000000001 value to 1, then everything will work (without changing mapserver and WFS server layer configuration).

please note, that it affects WFS only (so far). if i use mapserver via web browser or shp2img, then everything is fine (same data, same schema).

Changed 4 years ago by pramsey

  • status changed from new to assigned

Changed 4 years ago by pramsey

  • status changed from assigned to closed
  • resolution set to fixed

This is fixed (for everything except some random access query modes) in trunk at r9312.

Note: See TracTickets for help on using tickets.