Re: [mapserver-users] WFS field type errors on FES filter

2022-05-04 Thread PE Lord via MapServer-users
Thanks for the quick reply.

Pierre

--- Original Message ---
Le mercredi 4 mai 2022 à 09:45, Seth G  a écrit :

> Hi,
>
> In the LAYER METADATA set:
>
> "gml_types" "auto"
>
> See https://mapserver.org/ogc/wfs_server.html#layer-object
>
> Seth
>
> --
> web:https://geographika.net
> twitter: @geographika
>
> On Wed, May 4, 2022, at 3:28 PM, PE Lord via MapServer-users wrote:
>
>> Hi there!
>>
>> I've got a lot of fields stored as character/text but their contents are 
>> integers/numbers.
>>
>> Ex: In my DB (postgresql), I have tableA with fieldA. FieldA is declared as 
>> a character(2) but the content of rows are numbers... i.e. 71
>>
>> The issue here is when I filter my data (QGIS or my web app) :
>>
>> ...?
>> SERVICE=WFS&
>> REQUEST=GetFeature&
>> VERSION=2.0.0&
>> TYPENAMES=ms:tableA&
>> STARTINDEX=0=1000&
>> SRSNAME=urn:ogc:def:crs:EPSG::4326&
>> FILTER=
>> http://www.opengis.net/fes/2.0; 
>> xmlns:gml="http://www.opengis.net/gml/3.2;>
>> 
>> 
>> geometry
>> 
>> 40.778399776 -87.964200528
>> 51.889699771 -68.372100321
>> 
>> 
>> http://www.opengis.net/fes/2.0;>
>> FieldA
>> http://www.opengis.net/fes/2.0;>71
>> 
>> 
>> 
>>
>> Mapserver return this error
>>
>> msWFSGetFeature(): WFS server error. 
>> FLTApplyFilterToLayer() failed msPostGISLayerWhichShapes(): Query error. 
>> Error executing query. Check server logs
>>
>> To fix this issue, I know that I must declare gml_fieldA_type "Character".
>>
>> Here the question: There is a method to automatically declare the type of 
>> all of thems?
>>
>> The real issue about this question is that I have to handle near a thousand 
>> of layers, each of them containning a lot of fields! It's a scale issue!
>>
>> Thanks
>>
>> Pierre
>>
>> ___
>> MapServer-users mailing list
>> MapServer-users@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] WFS field type errors on FES filter

2022-05-04 Thread Seth G
Hi,

In the LAYER METADATA set:

"gml_types"   "auto"

See https://mapserver.org/ogc/wfs_server.html#layer-object

Seth


--
web:https://geographika.net
twitter: @geographika


On Wed, May 4, 2022, at 3:28 PM, PE Lord via MapServer-users wrote:
> Hi there!
> 
> I've got a lot of fields stored as character/text but their contents are 
> integers/numbers.
> 
> Ex: In my DB (postgresql), I have tableA with fieldA. FieldA is declared as a 
> character(2) but the content of rows are numbers... i.e. 71
> 
> The issue here is when I filter my data (QGIS or my web app) :
> 
> ...?
> SERVICE=WFS&
> REQUEST=GetFeature&
> VERSION=2.0.0&
> TYPENAMES=ms:tableA&
> STARTINDEX=0=1000&
> SRSNAME=urn:ogc:def:crs:EPSG::4326&
> FILTER=
> http://www.opengis.net/fes/2.0; 
> xmlns:gml="http://www.opengis.net/gml/3.2;>
>  
>   
>geometry
>
> 40.778399776 
> -87.964200528
> 51.889699771 
> -68.372100321
>
>   
>   http://www.opengis.net/fes/2.0;>
>FieldA
>http://www.opengis.net/fes/2.0;>71
>   
>  
> 
> 
> 
> 
> Mapserver return this error 
> 
> msWFSGetFeature(): WFS server error. 
> FLTApplyFilterToLayer() failed msPostGISLayerWhichShapes(): Query error. 
> Error executing query. Check server logs
>  
> To fix this issue, I know that I must declare gml_fieldA_type "Character".
> 
> Here the question: There is a method to automatically declare the type of all 
> of thems?
> 
> The real issue about this question is that I have to handle near a thousand 
> of layers, each of them containning a lot of fields! It's a scale issue!
> 
> Thanks
> 
> Pierre
> 
> 
> 
> 
> 
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] WFS field type errors on FES filter

2022-05-04 Thread PE Lord via MapServer-users
Hi there!

I've got a lot of fields stored as character/text but their contents are 
integers/numbers.

Ex: In my DB (postgresql), I have tableA with fieldA. FieldA is declared as a 
character(2) but the content of rows are numbers... i.e. 71

The issue here is when I filter my data (QGIS or my web app) :

...?
SERVICE=WFS&
REQUEST=GetFeature&
VERSION=2.0.0&
TYPENAMES=ms:tableA&
STARTINDEX=0=1000&
SRSNAME=urn:ogc:def:crs:EPSG::4326&
FILTER=
http://www.opengis.net/fes/2.0; 
xmlns:gml="http://www.opengis.net/gml/3.2;>


geometry

40.778399776 -87.964200528
51.889699771 -68.372100321


http://www.opengis.net/fes/2.0;>
FieldA
http://www.opengis.net/fes/2.0;>71




Mapserver return this error

msWFSGetFeature(): WFS server error. FLTApplyFilterToLayer() 
failed msPostGISLayerWhichShapes(): Query error. Error executing query. Check 
server logs

To fix this issue, I know that I must declare gml_fieldA_type "Character".

Here the question: There is a method to automatically declare the type of all 
of thems?

The real issue about this question is that I have to handle near a thousand of 
layers, each of them containning a lot of fields! It's a scale issue!

Thanks

Pierre___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users