Project_ID on traps table is missing

I am trying to use the WFS interface to extract the data. In my organisation there are a lot of projects, so I want to limit the list. All good, I can use the cql_filter to put in an expression to exclude some projects:

> project_id IN (10359935,10372387,10380347,10381195,10381862,10382142,10649431,10649996,10650455,10652006,10652348,10652594,10655940,10656694,10656755,10656818,10656871,10656968)

This works well for all the layers except my-projects-traps because the project_id field is missing. True the project name is there, but that is subject to user change, illegal characters and spaces that do not go well into a WFS request. Without the field the query crashes with an error message.

Could we please have the project_id exposed in all tables?

Hi @kimo - that makes good sense. We’ll add that to the other layers too. Will keep you posted.

This had been done now :slight_smile:

Great, thankyou. Now I have since noticed that project_id is missing from the lines!

They’ve been added to lines too.

my-project-lines layer WFS stream is broken. default-project-lines does work.
my-project-traps WFS stream now has project_id and is working.

WFSZLibStreamReader::Init() failed.
Bad syntax in request. (status code 400).
URL: https://io.trap.nz/geo/trapnz-projects/wfs/2X0ENQ5f_xr50AJsbOZeGE_VVqobb-g_tsK2tH-pjI8/2466258?cql_filter=project_id in (13678539, 4781092, 2466258, 2665573, 2667939, 7447764, 2671374, 2588501, 2666724, 1932738, 2670305, 2670705, 2671894, 2652091, 2668185, 2667922, 2665426, 2652066, 2671976, 2671820, 2670781, 2645675)&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=trapnz-projects:my-projects-lines&NAMESPACES=xmlns(trapnz-projects,https%3a%2f%2fio.trap.nz%2fogc)&SRSNAME=urn:ogc:def:crs:EPSG::4326&startIndex=0&count=200

WFSZLibStreamReader::Init() failed.
Bad syntax in request. (status code 400).
URL: https://io.trap.nz/geo/trapnz-projects/wfs/2X0ENQ5f_xr50AJsbOZeGE_VVqobb-g_tsK2tH-pjI8/2466258?cql_filter=&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=trapnz-projects:my-projects-lines&NAMESPACES=xmlns(trapnz-projects,https%3A%2F%2Fio.trap.nz%2Fogc)&SRSNAME=urn:ogc:def:crs:EPSG::4326&startIndex=0&count=200

@kimo I’ll let the developers know

Hi @kimo - thanks for the heads up! Fixed now.

NOTE - I’ve reset your API key as you’ve exposed it here and anybody can use it to access your project data. Please be wary when pasting links.

Yes, I realised the key was still in after I posted the message.