Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-29 Thread Eichner, Andreas - SID
But the original post was about a WFS filter and it's schema defines the 
Literal element very loosely as

   xsd:element name=Literal type=ogc:LiteralType 
substitutionGroup=ogc:expression/
   xsd:complexType name=LiteralType
  xsd:complexContent mixed=true
 xsd:extension base=ogc:ExpressionType
xsd:sequence
   xsd:any minOccurs=0/
/xsd:sequence
 /xsd:extension
  /xsd:complexContent
   /xsd:complexType

And the implementation specification is also very imprecise about it:

  The Literal element is used to encode literal scalar and geometric values.

So the schema does not restrict the Literal's value to be xsd:double nor does 
the spec. FES 2.0 adds a type attribute and uses a XML schema datatype as 
example. Therefore I guess it's intended that a Literal element holds content 
matching the datatype advertised by a DescribeFeatureType request.


 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von Gertjan van Oosten
 Gesendet: Donnerstag, 28. Mai 2015 15:07
 An: Rahkonen Jukka (MML); mapserver-users@lists.osgeo.org
 Betreff: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs
 getFeature with filter on numeric field
 
 As quoted from Rahkonen Jukka (MML)
 jukka.rahko...@maanmittauslaitos.fi:
  By reading the GML 3 standard it for example defines that Real and
 Number are
  of type xsd:double, and following that path to
 
  http://books.xmlschemata.org/relaxng/ch19-77065.html
 
 [Missed Jukka's reply first time round.]
 Yes, xsd:double (not xsd:float as in my previous reply).
 
 Which means the gory details are in:
 
   http://www.w3.org/TR/xmlschema11-2/#nt-doubleRep
 
 but everything else remains the same, notably: a decimal *point*.
 
 Cheers,
 --
 -- Gertjan van Oosten, Principal Consultant, West Consulting B.V.
 -- gert...@west.nl +31 15 2191 600   www.west.nl
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-29 Thread Gertjan van Oosten
As quoted from Eichner, Andreas - SID andreas.eich...@sid.sachsen.de:
 And the implementation specification is also very imprecise about it:
 
   The Literal element is used to encode literal scalar and geometric 
 values.
 
 So the schema does not restrict the Literal's value to be xsd:double
 nor does the spec. FES 2.0 adds a type attribute and uses a XML
 schema datatype as example. Therefore I guess it's intended that a
 Literal element holds content matching the datatype advertised by a
 DescribeFeatureType request.

In which case it boils down to: so what is actually advertised in the
DescribeFeatureType response? There we see that a feature has an
attribute called 'type'. In the end this will have to be a defined type
with a defined representation, otherwise it will be anybody's guess what
happens (e.g. if my client has a locale with decimal comma and the
server has a locale with decimal point, who's to say what's the truth
when I send the value 1,234 ?). If it's a standard type like xsd:double,
its representation is defined in the W3C standard.

Cheers,
-- 
-- Gertjan van Oosten, Principal Consultant, West Consulting B.V.
-- gert...@west.nl +31 15 2191 600   www.west.nl
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-28 Thread Gertjan van Oosten
As quoted from Smith, Michael ERDC-RDE-CRREL-NH michael.sm...@erdc.dren.mil:
 Its also unclear to me if XML / WFS allows other characters as a decimal
 character. I've yet to find any xsd or guide docs that indicate one way or the
 other. 

Easiest to read is from RELAX NG:

  http://books.xmlschemata.org/relaxng/ch19-77095.html

  Restrictions
  The decimal separator is always a point (.), and no thousands separator may 
be added.

For the gory details, see:

  http://www.w3.org/TR/xmlschema11-2/#nt-floatRep

So if the WFS request contains a comma (,) as decimal separator, that's wrong.

Cheers,
-- 
-- Gertjan van Oosten, Principal Consultant, West Consulting B.V.
-- gert...@west.nl +31 15 2191 600   www.west.nl
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-28 Thread Gertjan van Oosten
As quoted from Rahkonen Jukka (MML) jukka.rahko...@maanmittauslaitos.fi:
 By reading the GML 3 standard it for example defines that Real and Number are
 of type xsd:double, and following that path to
 
 http://books.xmlschemata.org/relaxng/ch19-77065.html

[Missed Jukka's reply first time round.]
Yes, xsd:double (not xsd:float as in my previous reply).

Which means the gory details are in:

  http://www.w3.org/TR/xmlschema11-2/#nt-doubleRep

but everything else remains the same, notably: a decimal *point*.

Cheers,
-- 
-- Gertjan van Oosten, Principal Consultant, West Consulting B.V.
-- gert...@west.nl +31 15 2191 600   www.west.nl
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-19 Thread Smith, Michael ERDC-RDE-CRREL-NH
Steve,

Rerun this with DEBUG 3 on the LAYER and the generated SQL will show up in your 
error logs. Then it should show why the generated sql is not valid.

Mike

--
Michael Smith
Remote Sensing/GIS Center
US Army Corps of Engineers

From: steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca
Date: Tuesday, May 19, 2015 at 9:37 AM
To: Rahkonen Jukka (MML) 
jukka.rahko...@maanmittauslaitos.fimailto:jukka.rahko...@maanmittauslaitos.fi
Cc: MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org, 
Michael Smith michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil
Subject: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

Thank you all for this discussion.
We had different problems in our use case coming from gdal, mapserv, oracle, 
..
I don't know how gdal should manage this comma issue, but I would like to 
clarify our problem with mapserv and see if something must be done.

Resume
- We use MS7.1 with oraclespatial connection
- gml_type = auto, which returns element name=LONG_STAT minOccurs=0 
type=double/
- matchCase =true
- LONG_STAT = -61,8031

The problem is
ogc:PropertyIsEqualTo 
matchCase=trueogc:PropertyNameLONG_STAT/ogc:PropertyNameogc:Literal-61,8031/ogc:Literal/ogc:PropertyIsEqualTo,
 crash with this error
 ows:Exception exceptionCode=NoApplicableCode locator=mapserv
ows:ExceptionTextmsWFSGetFeature(): WFS server error. 
FLTApplyFilterToLayer() failed
msOracleSpatialLayerWhichShapes(): OracleSpatial error. Check your data 
statement and server logs/ows:ExceptionText
  /ows:Exception

But, using LIKE it Works ...Probably because it convert the value as a string
ogc:PropertyIsLike matchCase=true wildCard=* singleChar=. 
escapeChar=!ogc:PropertyNameLONG_STAT/ogc:PropertyNameogc:Literal*-61,8031*/ogc:Literal/ogc:PropertyIsLike

But why ogc:PropertyIsEqualTo is crashing?




Rahkonen Jukka (MML) 
jukka.rahko...@maanmittauslaitos.fimailto:jukka.rahko...@maanmittauslaitos.fi

2015-05-15 10:05


A
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca, Smith, Michael 
ERDC-RDE-CRREL-NH 
michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil
cc
MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Objet
Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field









Hi,

I think that the real trouble is that with certain database and client settings 
the numerical data that is stored into Oracle is not interpreted correctly and 
correct place to fix the issue is somewhere very close to Oracle. Not in making 
GML parser to accept commas or to make WFS string comparisons to work correctly 
with numerical data in Oracle.

GDAL had similar troubles for sure with Finnish, Italian and French locales and 
probably with all the other locales using comma as decimal separator as well. 
In practice it meant for me that GDAL truncated decimal numbers “1234,56” at 
comma “1234”. For many years I used some workarounds but after this GDAL fix it 
has not been necessary any more:
http://trac.osgeo.org/gdal/ticket/5709

I suggest to study the patch “'OCI: force NLS_NUMERIC_CHARACTERS to .  (patch 
by giorgiomugnaini, #5709)'” and consider if it could be applied to the native 
Oracle driver in Mapserver. I guess and hope that Mapserver would recognize the 
datatype correctly if the Oracle layer is configured to read Oracle through OGR 
and GDAL 2.0 is in use.

Perhaps setting environment ALTER SESSION SET NLS_NUMERIC_CHARACTERS = '. ' 
locally before starting Mapserver would be enough but I do not know how and 
where to set it.

-Jukka Rahkonen-


Steve.Toutant wrote:

Is there a documentation that says that it is not?
Folks from gdal list also think that it is not supported...I guess you are 
right. But as I said on the gdal list, many countries are using a comma as a 
decimal separatorwhat other people on the planet do?
Anyway the comma is another problem that I try to manage later..

For now, We have an application that generate and launch spatial queries on 
WFS, matchCase=false by default. Before modifying the code I want to understand 
what is going on
It seems,when using numeric value, that matchCase as no impact in PostGIS, but 
it is important in oracle to be set to true

gml_type = auto, returns double in postgis and oracle, so that is fine
A WFS getFeature with the operator PropertyIsEqualTo AND matchCase=false
using this value -64.225
PostGis: it works
Oracle (from mike's test): it fails...matchCase must be set to true

A WFS getFeature with the operator PropertyIsEqualTo AND matchCase=false
using this value -64,225
PotsGis: not tested
Oracle: it fails...matchCase must be set to true

Is there a reason why, with oracle, matchCase should be set to true when

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-19 Thread Smith, Michael ERDC-RDE-CRREL-NH
It looks like whats happening is that’s being converted into 3 Tokens and the 
oracle driver converts it into a number + comma + number.

The tokenizer is not treating that value as a single value.

Mike

From: steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca
Date: Tuesday, May 19, 2015 at 11:44 AM
To: Michael Smith 
michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil
Cc: Rahkonen Jukka (MML) 
jukka.rahko...@maanmittauslaitos.fimailto:jukka.rahko...@maanmittauslaitos.fi,
 MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

here is the mapserver log with ogc:PropertyIsEqualTo 
matchCase=trueogc:PropertyNameLONG_STAT/ogc:PropertyNameogc:Literal-61,8031/ogc:Literal/ogc:PropertyIsEqualTo

msOracleSpatialLayerWhichShapes. Using this Sql to retrieve the data: SELECT 
ID, NO_STAT_CLIM, NO_STAT_FADQ, NOM_STAT, LATI_STAT, LONG_STAT, ALTI_STAT, 
D_DEB, D_FIN, TIMB_MAJ, USAG_MAJ, rownum, GEOM_POIN FROM (select * FROM 
SMDVDP_STAT_METE WHERE EXTRACT(YEAR FROM D_DEB) = 2014) WHERE  ( LONG_STAT = 
-61.00,8031.00 )  AND SDO_FILTER( GEOM_POIN, MDSYS.SDO_GEOMETRY(2003, 
:srid, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),:ordinates 
),'querytype=window') = 'TRUE'


The problem is
WHERE  ( LONG_STAT = -61.00,8031.00 )



Smith, Michael ERDC-RDE-CRREL-NH 
michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil

2015-05-19 09:42


A
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca, Rahkonen Jukka 
(MML) 
jukka.rahko...@maanmittauslaitos.fimailto:jukka.rahko...@maanmittauslaitos.fi
cc
MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Objet
Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field









Steve,

Rerun this with DEBUG 3 on the LAYER and the generated SQL will show up in your 
error logs. Then it should show why the generated sql is not valid.

Mike

--
Michael Smith
Remote Sensing/GIS Center
US Army Corps of Engineers

From: steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca
Date: Tuesday, May 19, 2015 at 9:37 AM
To: Rahkonen Jukka (MML) 
jukka.rahko...@maanmittauslaitos.fimailto:jukka.rahko...@maanmittauslaitos.fi
Cc: MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org, 
Michael Smith michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil
Subject: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

Thank you all for this discussion.
We had different problems in our use case coming from gdal, mapserv, oracle, 
..
I don't know how gdal should manage this comma issue, but I would like to 
clarify our problem with mapserv and see if something must be done.

Resume
- We use MS7.1 with oraclespatial connection
- gml_type = auto, which returns element name=LONG_STAT minOccurs=0 
type=double/
- matchCase =true
- LONG_STAT = -61,8031

The problem is
ogc:PropertyIsEqualTo 
matchCase=trueogc:PropertyNameLONG_STAT/ogc:PropertyNameogc:Literal-61,8031/ogc:Literal/ogc:PropertyIsEqualTo,
 crash with this error
ows:Exception exceptionCode=NoApplicableCode locator=mapserv
   ows:ExceptionTextmsWFSGetFeature(): WFS server error. 
FLTApplyFilterToLayer() failed
msOracleSpatialLayerWhichShapes(): OracleSpatial error. Check your data 
statement and server logs/ows:ExceptionText
 /ows:Exception

But, using LIKE it Works ...Probably because it convert the value as a string
ogc:PropertyIsLike matchCase=true wildCard=* singleChar=. 
escapeChar=!ogc:PropertyNameLONG_STAT/ogc:PropertyNameogc:Literal*-61,8031*/ogc:Literal/ogc:PropertyIsLike

But why ogc:PropertyIsEqualTo is crashing?


Rahkonen Jukka (MML) 
jukka.rahko...@maanmittauslaitos.fimailto:jukka.rahko...@maanmittauslaitos.fi

2015-05-15 10:05

A
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca, Smith, Michael 
ERDC-RDE-CRREL-NH 
michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil
cc
MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Objet
Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field











Hi,

I think that the real trouble is that with certain database and client settings 
the numerical data that is stored into Oracle is not interpreted correctly and 
correct place to fix the issue is somewhere very close to Oracle. Not in making 
GML parser to accept commas or to make WFS string comparisons to work correctly 
with numerical data in Oracle.

GDAL had similar troubles for sure with Finnish

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-19 Thread Smith, Michael ERDC-RDE-CRREL-NH
Steve,

Rerun this with DEBUG 3 on the LAYER and the generated SQL will show up in your 
error logs. Then it should show why the generated sql is not valid.

Mike

--
Michael Smith
Remote Sensing/GIS Center
US Army Corps of Engineers

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-19 Thread Rahkonen Jukka (MML)
Hi,

Without being a programmer I would like to see what would happen if this source 
file

https://github.com/mapserver/mapserver/blob/branch-7-0/maporaclespatial.c

would be edited around line 571-573:
cmd = alter session set NLS_DATE_FORMAT='-mm-dd hh24:mi:ss';

by adding a new block for setting the decimal and thousands separators for 
output

cmd = alter session set NLS_NUMERIC_CHARACTERS='. ';

I am not sure of the right syntax. This one works with SQL*Plus and set decimal 
points and space for thousands separator. I think that thousands should be 
without separators but the command seems to require two inputs.

-Jukka Rahkonen-




Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Lime, Steve D (MNIT)
Lähetetty: 19. toukokuuta 2015 22:12
Vastaanottaja: steve.tout...@inspq.qc.ca; MapserverList OSGEO
Kopio: michael.sm...@erdc.dren.mi
Aihe: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature 
with filter on numeric field

Is there somewhere in the capabilities response where a user would declare what 
decimal separators are supported?

From: 
mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca
Sent: Tuesday, May 19, 2015 2:06 PM
To: MapserverList OSGEO
Cc: michael.sm...@erdc.dren.mimailto:michael.sm...@erdc.dren.mi
Subject: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

It seems to be a bug isn't?
Do you want me to open an issue?
Smith, Michael ERDC-RDE-CRREL-NH 
michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil

2015-05-19 12:24

A

steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca

cc

Rahkonen Jukka (MML) 
jukka.rahko...@maanmittauslaitos.fimailto:jukka.rahko...@maanmittauslaitos.fi,
 MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org

Objet

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with 
filter on numeric field







It looks like whats happening is that's being converted into 3 Tokens and the 
oracle driver converts it into a number + comma + number.

The tokenizer is not treating that value as a single value.

Mike

From: steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca
Date: Tuesday, May 19, 2015 at 11:44 AM
To: Michael Smith 
michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil
Cc: Rahkonen Jukka (MML) 
jukka.rahko...@maanmittauslaitos.fimailto:jukka.rahko...@maanmittauslaitos.fi,
 MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

here is the mapserver log with ogc:PropertyIsEqualTo 
matchCase=trueogc:PropertyNameLONG_STAT/ogc:PropertyNameogc:Literal-61,8031/ogc:Literal/ogc:PropertyIsEqualTo

msOracleSpatialLayerWhichShapes. Using this Sql to retrieve the data: SELECT 
ID, NO_STAT_CLIM, NO_STAT_FADQ, NOM_STAT, LATI_STAT, LONG_STAT, ALTI_STAT, 
D_DEB, D_FIN, TIMB_MAJ, USAG_MAJ, rownum, GEOM_POIN FROM (select * FROM 
SMDVDP_STAT_METE WHERE EXTRACT(YEAR FROM D_DEB) = 2014) WHERE  ( LONG_STAT = 
-61.00,8031.00 )  AND SDO_FILTER( GEOM_POIN, MDSYS.SDO_GEOMETRY(2003, 
:srid, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),:ordinates 
),'querytype=window') = 'TRUE'


The problem is
WHERE  ( LONG_STAT = -61.00,8031.00 )
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-19 Thread Lime, Steve D (MNIT)
This isn't limited to Oracle... I would expect Postgres and native MapServer to 
have similar issues.

From: Smith, Michael ERDC-RDE-CRREL-NH [mailto:michael.sm...@erdc.dren.mil]
Sent: Tuesday, May 19, 2015 4:21 PM
To: Rahkonen Jukka (MML); Lime, Steve D (MNIT); steve.tout...@inspq.qc.ca; 
MapserverList OSGEO
Cc: michael.sm...@erdc.dren.mi
Subject: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

Jukka,

The issue is not only the NLS format, which would govern the output and how the 
sql is interpreted, but there is also the issue of the lexer which is reading 
the xml request. And that would have to change also.

Its also unclear to me if XML / WFS allows other characters as a decimal 
character. I've yet to find any xsd or guide docs that indicate one way or the 
other.

Mike

Michael Smith
US Army Corps
Remote Sensing GIS/Center
michael.sm...@usace.army.milmailto:michael.sm...@usace.army.mil


From: Rahkonen Jukka (MML) 
jukka.rahko...@maanmittauslaitos.fimailto:jukka.rahko...@maanmittauslaitos.fi
Date: Tuesday, May 19, 2015 at 5:08 PM
To: Lime, Steve D (MNIT) 
steve.l...@state.mn.usmailto:steve.l...@state.mn.us, 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca, MapserverList 
OSGEO mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Cc: michael.sm...@erdc.dren.mimailto:michael.sm...@erdc.dren.mi 
michael.sm...@erdc.dren.mimailto:michael.sm...@erdc.dren.mi
Subject: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field
Resent-From: Michael Smith 
michael.sm...@usace.army.milmailto:michael.sm...@usace.army.mil

Hi,

Without being a programmer I would like to see what would happen if this source 
file

https://github.com/mapserver/mapserver/blob/branch-7-0/maporaclespatial.c

would be edited around line 571-573:
cmd = alter session set NLS_DATE_FORMAT='-mm-dd hh24:mi:ss';

by adding a new block for setting the decimal and thousands separators for 
output

cmd = alter session set NLS_NUMERIC_CHARACTERS='. ';

I am not sure of the right syntax. This one works with SQL*Plus and set decimal 
points and space for thousands separator. I think that thousands should be 
without separators but the command seems to require two inputs.

-Jukka Rahkonen-




Lähettäjä: 
mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Lime, Steve D (MNIT)
Lähetetty: 19. toukokuuta 2015 22:12
Vastaanottaja: steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca; 
MapserverList OSGEO
Kopio: michael.sm...@erdc.dren.mimailto:michael.sm...@erdc.dren.mi
Aihe: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature 
with filter on numeric field

Is there somewhere in the capabilities response where a user would declare what 
decimal separators are supported?

From:mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca
Sent: Tuesday, May 19, 2015 2:06 PM
To: MapserverList OSGEO
Cc: michael.sm...@erdc.dren.mimailto:michael.sm...@erdc.dren.mi
Subject: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

It seems to be a bug isn't?
Do you want me to open an issue?
Smith, Michael ERDC-RDE-CRREL-NH 
michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil

2015-05-19 12:24

A

steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca

cc

Rahkonen Jukka (MML) 
jukka.rahko...@maanmittauslaitos.fimailto:jukka.rahko...@maanmittauslaitos.fi,
 MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org

Objet

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with 
filter on numeric field







It looks like whats happening is that's being converted into 3 Tokens and the 
oracle driver converts it into a number + comma + number.

The tokenizer is not treating that value as a single value.

Mike

From: steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca
Date: Tuesday, May 19, 2015 at 11:44 AM
To: Michael Smith 
michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil
Cc: Rahkonen Jukka (MML) 
jukka.rahko...@maanmittauslaitos.fimailto:jukka.rahko...@maanmittauslaitos.fi,
 MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

here is the mapserver log with ogc:PropertyIsEqualTo 
matchCase=trueogc:PropertyNameLONG_STAT/ogc:PropertyNameogc:Literal-61,8031/ogc:Literal/ogc:PropertyIsEqualTo

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-19 Thread Smith, Michael ERDC-RDE-CRREL-NH
Jukka,

The issue is not only the NLS format, which would govern the output and how the 
sql is interpreted, but there is also the issue of the lexer which is reading 
the xml request. And that would have to change also.

Its also unclear to me if XML / WFS allows other characters as a decimal 
character. I've yet to find any xsd or guide docs that indicate one way or the 
other.

Mike

Michael Smith
US Army Corps
Remote Sensing GIS/Center
michael.sm...@usace.army.mil


From: Rahkonen Jukka (MML) 
jukka.rahko...@maanmittauslaitos.fimailto:jukka.rahko...@maanmittauslaitos.fi
Date: Tuesday, May 19, 2015 at 5:08 PM
To: Lime, Steve D (MNIT) 
steve.l...@state.mn.usmailto:steve.l...@state.mn.us, 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca, MapserverList 
OSGEO mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Cc: michael.sm...@erdc.dren.mimailto:michael.sm...@erdc.dren.mi 
michael.sm...@erdc.dren.mimailto:michael.sm...@erdc.dren.mi
Subject: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field
Resent-From: Michael Smith 
michael.sm...@usace.army.milmailto:michael.sm...@usace.army.mil

Hi,

Without being a programmer I would like to see what would happen if this source 
file

https://github.com/mapserver/mapserver/blob/branch-7-0/maporaclespatial.c

would be edited around line 571-573:
cmd = alter session set NLS_DATE_FORMAT='-mm-dd hh24:mi:ss';

by adding a new block for setting the decimal and thousands separators for 
output

cmd = alter session set NLS_NUMERIC_CHARACTERS='. '”;

I am not sure of the right syntax. This one works with SQL*Plus and set decimal 
points and space for thousands separator. I think that thousands should be 
without separators but the command seems to require two inputs.

-Jukka Rahkonen-




Lähettäjä: 
mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Lime, Steve D (MNIT)
Lähetetty: 19. toukokuuta 2015 22:12
Vastaanottaja: steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca; 
MapserverList OSGEO
Kopio: michael.sm...@erdc.dren.mimailto:michael.sm...@erdc.dren.mi
Aihe: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature 
with filter on numeric field

Is there somewhere in the capabilities response where a user would declare what 
decimal separators are supported?

From:mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca
Sent: Tuesday, May 19, 2015 2:06 PM
To: MapserverList OSGEO
Cc: michael.sm...@erdc.dren.mimailto:michael.sm...@erdc.dren.mi
Subject: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

It seems to be a bug isn't?
Do you want me to open an issue?
Smith, Michael ERDC-RDE-CRREL-NH 
michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil

2015-05-19 12:24

A

steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca

cc

Rahkonen Jukka (MML) 
jukka.rahko...@maanmittauslaitos.fimailto:jukka.rahko...@maanmittauslaitos.fi,
 MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org

Objet

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with 
filter on numeric field







It looks like whats happening is that’s being converted into 3 Tokens and the 
oracle driver converts it into a number + comma + number.

The tokenizer is not treating that value as a single value.

Mike

From: steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca
Date: Tuesday, May 19, 2015 at 11:44 AM
To: Michael Smith 
michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil
Cc: Rahkonen Jukka (MML) 
jukka.rahko...@maanmittauslaitos.fimailto:jukka.rahko...@maanmittauslaitos.fi,
 MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

here is the mapserver log with ogc:PropertyIsEqualTo 
matchCase=trueogc:PropertyNameLONG_STAT/ogc:PropertyNameogc:Literal-61,8031/ogc:Literal/ogc:PropertyIsEqualTo

msOracleSpatialLayerWhichShapes. Using this Sql to retrieve the data: SELECT 
ID, NO_STAT_CLIM, NO_STAT_FADQ, NOM_STAT, LATI_STAT, LONG_STAT, ALTI_STAT, 
D_DEB, D_FIN, TIMB_MAJ, USAG_MAJ, rownum, GEOM_POIN FROM (select * FROM 
SMDVDP_STAT_METE WHERE EXTRACT(YEAR FROM D_DEB) = 2014) WHERE  ( LONG_STAT = 
-61.00,8031.00 )  AND SDO_FILTER( GEOM_POIN, MDSYS.SDO_GEOMETRY(2003, 
:srid, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),:ordinates 
),'querytype=window') = 'TRUE'


The problem is
WHERE  ( LONG_STAT

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-19 Thread Rahkonen Jukka (MML)
Hi,

By reading the GML 3 standard it for example defines that Real and Number are 
of type xsd:double, and following that path to
http://books.xmlschemata.org/relaxng/ch19-77065.html

Restrictions
The decimal separator is always a point (.), and no thousands separator may be 
used.
Same restrictions to xsd:decimal 
http://books.xmlschemata.org/relaxng/ch19-77057.html

So at least in WFS 1.1.0 with GML 3 numbers with comma as decimal separator are 
wrong and if Mapserver ever generates such GML it feels like a bug for me.


-Jukka Rahkonen-


Smith, Michael ERDC-RDE-CRREL-NH wrote:

Jukka,

The issue is not only the NLS format, which would govern the output and how the 
sql is interpreted, but there is also the issue of the lexer which is reading 
the xml request. And that would have to change also.

Its also unclear to me if XML / WFS allows other characters as a decimal 
character. I've yet to find any xsd or guide docs that indicate one way or the 
other.

Mike

Michael Smith
US Army Corps
Remote Sensing GIS/Center
michael.sm...@usace.army.milmailto:michael.sm...@usace.army.mil


From: Rahkonen Jukka (MML) 
jukka.rahko...@maanmittauslaitos.fimailto:jukka.rahko...@maanmittauslaitos.fi
Date: Tuesday, May 19, 2015 at 5:08 PM
To: Lime, Steve D (MNIT) 
steve.l...@state.mn.usmailto:steve.l...@state.mn.us, 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca, MapserverList 
OSGEO mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Cc: michael.sm...@erdc.dren.mimailto:michael.sm...@erdc.dren.mi 
michael.sm...@erdc.dren.mimailto:michael.sm...@erdc.dren.mi
Subject: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field
Resent-From: Michael Smith 
michael.sm...@usace.army.milmailto:michael.sm...@usace.army.mil

Hi,

Without being a programmer I would like to see what would happen if this source 
file

https://github.com/mapserver/mapserver/blob/branch-7-0/maporaclespatial.c

would be edited around line 571-573:
cmd = alter session set NLS_DATE_FORMAT='-mm-dd hh24:mi:ss';

by adding a new block for setting the decimal and thousands separators for 
output

cmd = alter session set NLS_NUMERIC_CHARACTERS='. ';

I am not sure of the right syntax. This one works with SQL*Plus and set decimal 
points and space for thousands separator. I think that thousands should be 
without separators but the command seems to require two inputs.

-Jukka Rahkonen-




Lähettäjä: 
mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Lime, Steve D (MNIT)
Lähetetty: 19. toukokuuta 2015 22:12
Vastaanottaja: steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca; 
MapserverList OSGEO
Kopio: michael.sm...@erdc.dren.mimailto:michael.sm...@erdc.dren.mi
Aihe: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature 
with filter on numeric field

Is there somewhere in the capabilities response where a user would declare what 
decimal separators are supported?

From:mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca
Sent: Tuesday, May 19, 2015 2:06 PM
To: MapserverList OSGEO
Cc: michael.sm...@erdc.dren.mimailto:michael.sm...@erdc.dren.mi
Subject: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

It seems to be a bug isn't?
Do you want me to open an issue?
Smith, Michael ERDC-RDE-CRREL-NH 
michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil

2015-05-19 12:24

A

steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca

cc

Rahkonen Jukka (MML) 
jukka.rahko...@maanmittauslaitos.fimailto:jukka.rahko...@maanmittauslaitos.fi,
 MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org

Objet

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with 
filter on numeric field







It looks like whats happening is that's being converted into 3 Tokens and the 
oracle driver converts it into a number + comma + number.

The tokenizer is not treating that value as a single value.

Mike

From: steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca
Date: Tuesday, May 19, 2015 at 11:44 AM
To: Michael Smith 
michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil
Cc: Rahkonen Jukka (MML) 
jukka.rahko...@maanmittauslaitos.fimailto:jukka.rahko...@maanmittauslaitos.fi,
 MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

here is the mapserver log with ogc:PropertyIsEqualTo

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-19 Thread Smith, Michael ERDC-RDE-CRREL-NH
It looks like whats happening is that’s being converted into 3 Tokens and the 
oracle driver converts it into a number + comma + number.

The tokenizer is not treating that value as a single value.

Mike
--
Michael Smith
Remote Sensing/GIS Center
US Army Corps of Engineers
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-19 Thread Steve . Toutant
It seems to be a bug isn't?
Do you want me to open an issue?



Smith, Michael ERDC-RDE-CRREL-NH michael.sm...@erdc.dren.mil 
2015-05-19 12:24

A
steve.tout...@inspq.qc.ca steve.tout...@inspq.qc.ca
cc
Rahkonen Jukka (MML) jukka.rahko...@maanmittauslaitos.fi, 
MapserverList OSGEO mapserver-users@lists.osgeo.org
Objet
Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature 
with filter on numeric field






It looks like whats happening is that?s being converted into 3 Tokens and 
the oracle driver converts it into a number + comma + number. 

The tokenizer is not treating that value as a single value. 

Mike

From: steve.tout...@inspq.qc.ca steve.tout...@inspq.qc.ca
Date: Tuesday, May 19, 2015 at 11:44 AM
To: Michael Smith michael.sm...@erdc.dren.mil
Cc: Rahkonen Jukka (MML) jukka.rahko...@maanmittauslaitos.fi, 
MapserverList OSGEO mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

here is the mapserver log with ogc:PropertyIsEqualTo 
matchCase=trueogc:PropertyNameLONG_STAT/ogc:PropertyNameogc:Literal-61,8031/ogc:Literal/ogc:PropertyIsEqualTo


msOracleSpatialLayerWhichShapes. Using this Sql to retrieve the data: 
SELECT ID, NO_STAT_CLIM, NO_STAT_FADQ, NOM_STAT, LATI_STAT, LONG_STAT, 
ALTI_STAT, D_DEB, D_FIN, TIMB_MAJ, USAG_MAJ, rownum, GEOM_POIN FROM 
(select * FROM SMDVDP_STAT_METE WHERE EXTRACT(YEAR FROM D_DEB) = 2014) 
WHERE  ( LONG_STAT = -61.00,8031.00 )  AND SDO_FILTER( GEOM_POIN, 
MDSYS.SDO_GEOMETRY(2003, :srid, 
NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),:ordinates ),'querytype=window') 
= 'TRUE'


The problem is 
WHERE  ( LONG_STAT = -61.00,8031.00 )
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-19 Thread Lime, Steve D (MNIT)
That's actually the lexer then since it's responsible for producing tokens. It 
would need to be updated to be aware of what the local decimal delimiter is.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Smith, Michael 
ERDC-RDE-CRREL-NH
Sent: Tuesday, May 19, 2015 11:27 AM
To: MapserverList OSGEO
Subject: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

It looks like whats happening is that's being converted into 3 Tokens and the 
oracle driver converts it into a number + comma + number.

The tokenizer is not treating that value as a single value.

Mike
--
Michael Smith
Remote Sensing/GIS Center
US Army Corps of Engineers
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-19 Thread Rahkonen Jukka (MML)

Hi,

I made some tests with SQL*Plus. I took a row which has an attribute nro 
which is of type REAL and the value with my Finnish locale looks like 42.071. 
I suggest you, Steve, to repeat this simple test.



SQL select nro from test_table where nro=42,071;
   *
[ERROR on row 1]:
ORA-00933: [SQL-command did not end correctly]

Another test:
SQL select nro from test_table where nro=42.071;

   NRO
--
42,071

Notice that even if the result is printed out with comma as a decimal separator 
in my environment I must still use point in the queries. I do not know it is 
always like that. This works also with SQL*Plus:
SQL select nro from test_table where nro='42,071';


Now what happens with ogrinfo is funny:

ogrinfo OCI:user/pw@db:test_table  -sql select nro from test_table where 
NRO=42.071
INFO: Open of `OCI:'
  using driver `OCI' successful.

Layer name: select nro from test_table where NRO=42.071
Geometry: Unknown (any)
Feature Count: 1
Layer SRS WKT:
(unknown)
NRO: Real (0.0)
OGRFeature(select nro from test_table where NRO=42.071):0
  NRO (Real) = 42

My old GDAL truncates the output at the comma.

I can't test with Mapserver right now. I think still that creating an issue is 
a right thing to do because your trouble is real. I do not know how and where 
it should be corrected. Perhaps it would work if Mapserver takes care of using 
always point as a decimal separator in queries even is Oracle is sending back 
commas? That seems at least to be the right thing to do with SQL*Plus that is a 
native Oracle product.

I do not believe that tokenizer is the component that fails. Perhaps it fails 
but sending commas as decimal separator would probably still yield an error.



-Jukka Rahkonen-


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-19 Thread Lime, Steve D (MNIT)
Is there somewhere in the capabilities response where a user would declare what 
decimal separators are supported?

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of 
steve.tout...@inspq.qc.ca
Sent: Tuesday, May 19, 2015 2:06 PM
To: MapserverList OSGEO
Cc: michael.sm...@erdc.dren.mi
Subject: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

It seems to be a bug isn't?
Do you want me to open an issue?

Smith, Michael ERDC-RDE-CRREL-NH 
michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil

2015-05-19 12:24

A

steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca

cc

Rahkonen Jukka (MML) 
jukka.rahko...@maanmittauslaitos.fimailto:jukka.rahko...@maanmittauslaitos.fi,
 MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org

Objet

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with 
filter on numeric field







It looks like whats happening is that's being converted into 3 Tokens and the 
oracle driver converts it into a number + comma + number.

The tokenizer is not treating that value as a single value.

Mike

From: steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca
Date: Tuesday, May 19, 2015 at 11:44 AM
To: Michael Smith 
michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil
Cc: Rahkonen Jukka (MML) 
jukka.rahko...@maanmittauslaitos.fimailto:jukka.rahko...@maanmittauslaitos.fi,
 MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

here is the mapserver log with ogc:PropertyIsEqualTo 
matchCase=trueogc:PropertyNameLONG_STAT/ogc:PropertyNameogc:Literal-61,8031/ogc:Literal/ogc:PropertyIsEqualTo

msOracleSpatialLayerWhichShapes. Using this Sql to retrieve the data: SELECT 
ID, NO_STAT_CLIM, NO_STAT_FADQ, NOM_STAT, LATI_STAT, LONG_STAT, ALTI_STAT, 
D_DEB, D_FIN, TIMB_MAJ, USAG_MAJ, rownum, GEOM_POIN FROM (select * FROM 
SMDVDP_STAT_METE WHERE EXTRACT(YEAR FROM D_DEB) = 2014) WHERE  ( LONG_STAT = 
-61.00,8031.00 )  AND SDO_FILTER( GEOM_POIN, MDSYS.SDO_GEOMETRY(2003, 
:srid, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),:ordinates 
),'querytype=window') = 'TRUE'


The problem is
WHERE  ( LONG_STAT = -61.00,8031.00 )
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-15 Thread Eichner, Andreas - SID
Hey guys,

 Its not clear to me that commas as the decimal separator is supported in
 XML/GML. I can't find any documentation to indicate that it is. Can you
 point some out to me?

 Is there a documentation that says that it is not?
 Folks from gdal list also think that it is not supported...I guess you are
 right. But as I said on the gdal list, many countries are using a comma as
 a decimal separatorwhat other people on the planet do?
 Anyway the comma is another problem that I try to manage later..

I just had a look at the discussion on the list and tried to find some hints in 
the specs and that's what I found:

The Filter Encoding Specification v1.1.0 just states:

  The Literal element is used to encode literal scalar and geometric values.

but FES v2.0.0 adds:

  Literals can, optionally, be typed using the type attribute. The value of 
the attribute type is the name of type from some type system.

and give as an example:

  The following XML fragment: Literal type=xs:date1963-10-13/Literal 
encodes a date value. The type of the value is xs:date as defined in (see W3C 
XML Schema Part 2).

From that I would conclude that if it's not a geometric value a Literal is 
basically an untyped character representation unless otherwise specified using 
the type attribute in which case the content should be treated as the 
character representation of the specified type. The type of comparison needs 
to be inferred from its operands. But the spec does not mandate any type 
conversion or inference rules. So how it is done is implementation defined. In 
the case of PropertyIs-operations the type of the named property usually 
selects the type any other operand will be converted to. In other cases this 
will mostly be done using the strongest type that all operands can be 
converted to. I assume an implementation should support at least the basic 
datatypes defined in the XML Schema spec. So implementations will most 
probably treat numerical literals with decimals as xs:float, xs:double or 
xs:decimal and their lexical representation uses . as decimal separator. But 
they are free to suppo
 rt any other representation including one using , as decimal separator.
Geometric literals must be encoded using GML and that uses a list of xs:double 
for pos and posList and therefore uses . as decimal separator too. AFAIK 
only the deprecated coordinates element supports the decimal attribute to 
set it to something else.

Regarding the matchCase handling the spec (FES 1.1) states:
  This type definition includes the matchCase attribute which is of type 
Boolean and controls whether string comparisons are caseless or not.
So this attribute has no meaning for all other comparison types and should 
therefore be ignored.

All that said I think it is a mistake to use the matchCase attribute to 
determine the type of the comparison and its operands. And numeric literals 
should be written using the lexical representation of a XML schema basic type 
like float or double using . as the decimal separator because they are 
expected to be the most commonly supported ones.

HTH
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-15 Thread Rahkonen Jukka (MML)

Hi,

I think that the real trouble is that with certain database and client settings 
the numerical data that is stored into Oracle is not interpreted correctly and 
correct place to fix the issue is somewhere very close to Oracle. Not in making 
GML parser to accept commas or to make WFS string comparisons to work correctly 
with numerical data in Oracle.

GDAL had similar troubles for sure with Finnish, Italian and French locales and 
probably with all the other locales using comma as decimal separator as well. 
In practice it meant for me that GDAL truncated decimal numbers 1234,56 at 
comma 1234. For many years I used some workarounds but after this GDAL fix it 
has not been necessary any more:
http://trac.osgeo.org/gdal/ticket/5709

I suggest to study the patch 'OCI: force NLS_NUMERIC_CHARACTERS to .  (patch 
by giorgiomugnaini, #5709)' and consider if it could be applied to the native 
Oracle driver in Mapserver. I guess and hope that Mapserver would recognize the 
datatype correctly if the Oracle layer is configured to read Oracle through 
CONNECTIONTYPE OGR and GDAL 2.0 is in use.

Perhaps setting environment ALTER SESSION SET NLS_NUMERIC_CHARACTERS = '. ' 
locally before starting Mapserver would be enough but I do not know how and 
where to set it.

-Jukka Rahkonen-


Steve.Toutant wrote:

Is there a documentation that says that it is not?
Folks from gdal list also think that it is not supported...I guess you are 
right. But as I said on the gdal list, many countries are using a comma as a 
decimal separatorwhat other people on the planet do?
Anyway the comma is another problem that I try to manage later..

For now, We have an application that generate and launch spatial queries on 
WFS, matchCase=false by default. Before modifying the code I want to understand 
what is going on
It seems,when using numeric value, that matchCase as no impact in PostGIS, but 
it is important in oracle to be set to true

gml_type = auto, returns double in postgis and oracle, so that is fine
A WFS getFeature with the operator PropertyIsEqualTo AND matchCase=false
using this value -64.225
PostGis: it works
Oracle (from mike's test): it fails...matchCase must be set to true

A WFS getFeature with the operator PropertyIsEqualTo AND matchCase=false
using this value -64,225
PotsGis: not tested
Oracle: it fails...matchCase must be set to true

Is there a reason why, with oracle, matchCase should be set to true when using 
numeric value, or that could be fixed?
Regards
Steve
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-14 Thread Smith, Michael ERDC-RDE-CRREL-NH
The matchCase triggers a string comparison. matchCase doesn't seem to make 
sense for a number.

That being said, I can look into the specific case of matchCase and a numeric 
comparison and make sire that it isn't used.

Mike

Michael Smith
US Army Corps
Remote Sensing GIS/Center
michael.sm...@usace.army.mil


From: steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca
Date: Thursday, May 14, 2015 at 9:28 AM
To: Michael Smith 
michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil
Cc: MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org, 
thomas bonfort thomas.bonf...@gmail.commailto:thomas.bonf...@gmail.com
Subject: Re: [EXTERNAL] Re: [mapserver-users] Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

Is there a documentation that says that it is not?
Folks from gdal list also think that it is not supported...I guess you are 
right. But as I said on the gdal list, many countries are using a comma as a 
decimal separatorwhat other people on the planet do?
Anyway the comma is another problem that I try to manage later..

For now, We have an application that generate and launch spatial queries on 
WFS, matchCase=false by default. Before modifying the code I want to understand 
what is going on
It seems,when using numeric value, that matchCase as no impact in PostGIS, but 
it is important in oracle to be set to true

gml_type = auto, returns double in postgis and oracle, so that is fine
A WFS getFeature with the operator PropertyIsEqualTo AND matchCase=false
using this value -64.225
PostGis: it works
Oracle (from mike's test): it fails...matchCase must be set to true

A WFS getFeature with the operator PropertyIsEqualTo AND matchCase=false
using this value -64,225
PotsGis: not tested
Oracle: it fails...matchCase must be set to true

Is there a reason why, with oracle, matchCase should be set to true when using 
numeric value, or that could be fixed?
Regards
Steve



Smith, Michael ERDC-RDE-CRREL-NH 
michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil

2015-05-14 09:17


A
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca
cc
MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org, 
thomas bonfort thomas.bonf...@gmail.commailto:thomas.bonf...@gmail.com
Objet
Re: [EXTERNAL] Re: [mapserver-users] Mapserver 7+oracle - wfs 
getFeature with filter on numeric field









Its not clear to me that commas as the decimal separator is supported in 
XML/GML. I can't find any documentation to indicate that it is. Can you point 
some out to me?

In any event, I didn't test with comma decimal separators.

Mike



Michael Smith
US Army Corps
Remote Sensing GIS/Center
michael.sm...@usace.army.milmailto:michael.sm...@usace.army.mil


From: steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca
Date: Thursday, May 14, 2015 at 8:54 AM
To: Michael Smith 
michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil
Cc: MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org, 
thomas bonfort thomas.bonf...@gmail.commailto:thomas.bonf...@gmail.com
Subject: Re: [EXTERNAL] Re: [mapserver-users] Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

Thanks Mike for having a look at it.
Your decimals are separated by a comma or a dot?


Smith, Michael ERDC-RDE-CRREL-NH 
michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil

2015-05-13 18:53

A
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca, thomas bonfort 
thomas.bonf...@gmail.commailto:thomas.bonf...@gmail.com
cc
MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Objet
Re: [EXTERNAL] Re: [mapserver-users] Mapserver 7+oracle - wfs 
getFeature with filter on numeric field











Steve,

I tested this out with 7.1 with numeric type fields and it works for me as long 
as I don't use matchCase=false. That seems to kick it in to a string 
comparison. matchCase=true and just PropertyIsEqualTo work fine.

In our metadata we use gml_types   auto when the database knows the types 
and explicit declarations (eg gml_attributename_type   integer) when it 
doesn't work.

The key is that the field type has to report as a numeric type or the backend 
treats it as a string comparison.

Mike

Michael Smith
US Army Corps
Remote Sensing GIS/Center
michael.sm...@usace.army.milmailto:michael.sm...@usace.army.mil


From: steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca
Date: Wednesday, May 13, 2015 at 10:35 AM
To: thomas bonfort thomas.bonf...@gmail.commailto:thomas.bonf...@gmail.com
Cc: MapserverList OSGEO

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-14 Thread Smith, Michael ERDC-RDE-CRREL-NH
Its not clear to me that commas as the decimal separator is supported in 
XML/GML. I can't find any documentation to indicate that it is. Can you point 
some out to me?

In any event, I didn't test with comma decimal separators.

Mike



Michael Smith
US Army Corps
Remote Sensing GIS/Center
michael.sm...@usace.army.mil


From: steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca
Date: Thursday, May 14, 2015 at 8:54 AM
To: Michael Smith 
michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil
Cc: MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org, 
thomas bonfort thomas.bonf...@gmail.commailto:thomas.bonf...@gmail.com
Subject: Re: [EXTERNAL] Re: [mapserver-users] Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

Thanks Mike for having a look at it.
Your decimals are separated by a comma or a dot?




Smith, Michael ERDC-RDE-CRREL-NH 
michael.sm...@erdc.dren.milmailto:michael.sm...@erdc.dren.mil

2015-05-13 18:53


A
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca, thomas bonfort 
thomas.bonf...@gmail.commailto:thomas.bonf...@gmail.com
cc
MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Objet
Re: [EXTERNAL] Re: [mapserver-users] Mapserver 7+oracle - wfs 
getFeature with filter on numeric field









Steve,

I tested this out with 7.1 with numeric type fields and it works for me as long 
as I don't use matchCase=false. That seems to kick it in to a string 
comparison. matchCase=true and just PropertyIsEqualTo work fine.

In our metadata we use gml_types   auto when the database knows the types 
and explicit declarations (eg gml_attributename_type   integer) when it 
doesn't work.

The key is that the field type has to report as a numeric type or the backend 
treats it as a string comparison.

Mike

Michael Smith
US Army Corps
Remote Sensing GIS/Center
michael.sm...@usace.army.milmailto:michael.sm...@usace.army.mil


From: steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca
Date: Wednesday, May 13, 2015 at 10:35 AM
To: thomas bonfort thomas.bonf...@gmail.commailto:thomas.bonf...@gmail.com
Cc: MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: [EXTERNAL] Re: [mapserver-users] Mapserver 7+oracle - wfs getFeature 
with filter on numeric field
Resent-From: Michael Smith 
michael.sm...@usace.army.milmailto:michael.sm...@usace.army.mil

Precision: we are using MS7.1
Removing matchcase part makes oracle, and postgis, crash.
I have this error:

ows:ExceptionReport 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instancehttp://www.google.com/url?q=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instancesa=Dsntz=1usg=AFQjCNFERp6A_kcvqihMCKJ7EHX8O14vIA
 
xmlns:ows=http://www.opengis.net/owshttp://www.google.com/url?q=http%3A%2F%2Fwww.opengis.net%2Fowssa=Dsntz=1usg=AFQjCNE9_q7eSkcBl4XJimXTw1Zx0EiDow
 version=1.1.0 
language=en-USxsi:schemaLocation=http://www.opengis.net/ows 
/ahttp://www.google.com/url?q=http%3A%2F%2Fwww.opengis.net%2Fowssa=Dsntz=1usg=AFQjCNE9_q7eSkcBl4XJimXTw1Zx0EiDowhttp://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsdhttp://www.google.com/url?q=http%3A%2F%2Fschemas.opengis.net%2Fows%2F1.0.0%2FowsExceptionReport.xsdsa=Dsntz=1usg=AFQjCNGmnK6iSrh-cSWEtM2VV17uuSbVNA
ows:Exception exceptionCode=NoApplicableCode locator=mapserv
ows:ExceptionText
msWFSGetFeature(): WFS server error. FLTApplyFilterToLayer() failed 
msOracleSpatialLayerWhichShapes(): OracleSpatial error. Check your data 
statement and server logs
/ows:ExceptionText


The problem might be the decimals?
Here is the request
wfs:Query typeName=feature:SMDVDP_STAT_METE srsName=EPSG:32198
ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;
ogc:PropertyIsEqualTo
ogc:PropertyNameLONG_STAT/ogc:PropertyName
ogc:Literal-61,8031/ogc:Literal
/ogc:PropertyIsEqualTo
/ogc:Filter
/wfs:Query
/wfs:GetFeature


thomas bonfort thomas.bonf...@gmail.commailto:thomas.bonf...@gmail.com

2015-05-13 05:40

A
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca
cc
MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Objet
Re: [mapserver-users] Mapserver 7+oracle - wfs getFeature with filter 
on numeric field











can you try the same request without the matchCase part and report
back please?

On 12 May 2015 at 18:11,  
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca wrote:
 I have a problem using a FILTER in a wfs getFeature request on an oracle DB
 with MS7
 When I launch a getFeature request with a Filter on a numeric field it
 doesn't work,
 ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyIsEqualTo
 matchCase=falseogc:PropertyNameLONG_STAT/ogc:PropertyNameogc:Literal-61/ogc:Literal

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-14 Thread Steve . Toutant
Is there a documentation that says that it is not?
Folks from gdal list also think that it is not supported...I guess you are 
right. But as I said on the gdal list, many countries are using a comma as 
a decimal separatorwhat other people on the planet do?
Anyway the comma is another problem that I try to manage later..

For now, We have an application that generate and launch spatial queries 
on WFS, matchCase=false by default. Before modifying the code I want to 
understand what is going on
It seems,when using numeric value, that matchCase as no impact in PostGIS, 
but it is important in oracle to be set to true

gml_type = auto, returns double in postgis and oracle, so that is fine
A WFS getFeature with the operator PropertyIsEqualTo AND matchCase=false
using this value -64.225
PostGis: it works
Oracle (from mike's test): it fails...matchCase must be set to true

A WFS getFeature with the operator PropertyIsEqualTo AND matchCase=false
using this value -64,225
PotsGis: not tested 
Oracle: it fails...matchCase must be set to true

Is there a reason why, with oracle, matchCase should be set to true when 
using numeric value, or that could be fixed?
Regards
Steve





Smith, Michael ERDC-RDE-CRREL-NH michael.sm...@erdc.dren.mil 
2015-05-14 09:17

A
steve.tout...@inspq.qc.ca steve.tout...@inspq.qc.ca
cc
MapserverList OSGEO mapserver-users@lists.osgeo.org, thomas bonfort 
thomas.bonf...@gmail.com
Objet
Re: [EXTERNAL] Re: [mapserver-users] Mapserver 7+oracle - wfs getFeature 
with filter on numeric field








Its not clear to me that commas as the decimal separator is supported in 
XML/GML. I can't find any documentation to indicate that it is. Can you 
point some out to me?

In any event, I didn't test with comma decimal separators. 

Mike

 

Michael Smith
US Army Corps
Remote Sensing GIS/Center
michael.sm...@usace.army.mil


From: steve.tout...@inspq.qc.ca steve.tout...@inspq.qc.ca
Date: Thursday, May 14, 2015 at 8:54 AM
To: Michael Smith michael.sm...@erdc.dren.mil
Cc: MapserverList OSGEO mapserver-users@lists.osgeo.org, thomas bonfort 
thomas.bonf...@gmail.com
Subject: Re: [EXTERNAL] Re: [mapserver-users] Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

Thanks Mike for having a look at it. 
Your decimals are separated by a comma or a dot?




Smith, Michael ERDC-RDE-CRREL-NH michael.sm...@erdc.dren.mil 
2015-05-13 18:53 


A
steve.tout...@inspq.qc.ca steve.tout...@inspq.qc.ca, thomas bonfort 
thomas.bonf...@gmail.com
cc
MapserverList OSGEO mapserver-users@lists.osgeo.org
Objet
Re: [EXTERNAL] Re: [mapserver-users] Mapserver 7+oracle - wfs getFeature 
with filter on numeric field










Steve, 

I tested this out with 7.1 with numeric type fields and it works for me as 
long as I don't use matchCase=false. That seems to kick it in to a 
string comparison. matchCase=true and just PropertyIsEqualTo work fine.

In our metadata we use gml_types   auto when the database knows the 
types and explicit declarations (eg gml_attributename_type   integer) 
when it doesn't work.

The key is that the field type has to report as a numeric type or the 
backend treats it as a string comparison.

Mike 
 
Michael Smith 
US Army Corps 
Remote Sensing GIS/Center 
michael.sm...@usace.army.mil 


From: steve.tout...@inspq.qc.ca steve.tout...@inspq.qc.ca
Date: Wednesday, May 13, 2015 at 10:35 AM
To: thomas bonfort thomas.bonf...@gmail.com
Cc: MapserverList OSGEO mapserver-users@lists.osgeo.org
Subject: [EXTERNAL] Re: [mapserver-users] Mapserver 7+oracle - wfs 
getFeature with filter on numeric field
Resent-From: Michael Smith michael.sm...@usace.army.mil

Precision: we are using MS7.1
Removing matchcase part makes oracle, and postgis, crash.
I have this error: 

ows:ExceptionReport xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns:ows=http://www.opengis.net/ows; version=1.1.0 
language=en-USxsi:schemaLocation=http://www.opengis.net/ows /a
http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd;
ows:Exception exceptionCode=NoApplicableCode locator=mapserv
ows:ExceptionText
msWFSGetFeature(): WFS server error. FLTApplyFilterToLayer() failed 
msOracleSpatialLayerWhichShapes(): OracleSpatial error. Check your data 
statement and server logs
/ows:ExceptionText 


The problem might be the decimals? 
Here is the request 
wfs:Query typeName=feature:SMDVDP_STAT_METE srsName=EPSG:32198
ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;
ogc:PropertyIsEqualTo 
ogc:PropertyNameLONG_STAT/ogc:PropertyName
ogc:Literal-61,8031/ogc:Literal
/ogc:PropertyIsEqualTo 
/ogc:Filter 
/wfs:Query 
/wfs:GetFeature 


thomas bonfort thomas.bonf...@gmail.com 
2015-05-13 05:40


A
steve.tout...@inspq.qc.ca
cc
MapserverList OSGEO mapserver-users@lists.osgeo.org
Objet
Re: [mapserver-users] Mapserver 7+oracle - wfs getFeature with filter on 
numeric field












can you try the same request without the matchCase part and report
back please?

On 12 May 2015 at 18:11,  steve.tout...@inspq.qc.ca wrote:
 I

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-14 Thread Steve . Toutant
Thanks Mike for having a look at it.
Your decimals are separated by a comma or a dot?






Smith, Michael ERDC-RDE-CRREL-NH michael.sm...@erdc.dren.mil 
2015-05-13 18:53

A
steve.tout...@inspq.qc.ca steve.tout...@inspq.qc.ca, thomas bonfort 
thomas.bonf...@gmail.com
cc
MapserverList OSGEO mapserver-users@lists.osgeo.org
Objet
Re: [EXTERNAL] Re: [mapserver-users] Mapserver 7+oracle - wfs getFeature 
with filter on numeric field








Steve,

I tested this out with 7.1 with numeric type fields and it works for me as 
long as I don't use matchCase=false. That seems to kick it in to a 
string comparison. matchCase=true and just PropertyIsEqualTo work fine.

In our metadata we use gml_types   auto when the database knows the 
types and explicit declarations (eg gml_attributename_type   integer) 
when it doesn't work.

The key is that the field type has to report as a numeric type or the 
backend treats it as a string comparison.

Mike

Michael Smith
US Army Corps
Remote Sensing GIS/Center
michael.sm...@usace.army.mil


From: steve.tout...@inspq.qc.ca steve.tout...@inspq.qc.ca
Date: Wednesday, May 13, 2015 at 10:35 AM
To: thomas bonfort thomas.bonf...@gmail.com
Cc: MapserverList OSGEO mapserver-users@lists.osgeo.org
Subject: [EXTERNAL] Re: [mapserver-users] Mapserver 7+oracle - wfs 
getFeature with filter on numeric field
Resent-From: Michael Smith michael.sm...@usace.army.mil

Precision: we are using MS7.1 
Removing matchcase part makes oracle, and postgis, crash.
I have this error: 

ows:ExceptionReport xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns:ows=http://www.opengis.net/ows; version=1.1.0 
language=en-USxsi:schemaLocation=http://www.opengis.net/ows /a
http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd;
ows:Exception exceptionCode=NoApplicableCode locator=mapserv
ows:ExceptionText
msWFSGetFeature(): WFS server error. FLTApplyFilterToLayer() failed 
msOracleSpatialLayerWhichShapes(): OracleSpatial error. Check your data 
statement and server logs
/ows:ExceptionText 


The problem might be the decimals? 
Here is the request 
wfs:Query typeName=feature:SMDVDP_STAT_METE srsName=EPSG:32198
ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;
ogc:PropertyIsEqualTo 
ogc:PropertyNameLONG_STAT/ogc:PropertyName 
ogc:Literal-61,8031/ogc:Literal 
/ogc:PropertyIsEqualTo 
/ogc:Filter 
/wfs:Query 
/wfs:GetFeature 




thomas bonfort thomas.bonf...@gmail.com 
2015-05-13 05:40 


A
steve.tout...@inspq.qc.ca 
cc
MapserverList OSGEO mapserver-users@lists.osgeo.org
Objet
Re: [mapserver-users] Mapserver 7+oracle - wfs getFeature with filter on 
numeric field










can you try the same request without the matchCase part and report
back please?

On 12 May 2015 at 18:11,  steve.tout...@inspq.qc.ca wrote:
 I have a problem using a FILTER in a wfs getFeature request on an oracle 
DB
 with MS7
 When I launch a getFeature request with a Filter on a numeric field it
 doesn't work,
 ogc:Filter xmlns:ogc=http://www.opengis.net/ogc
ogc:PropertyIsEqualTo
 
matchCase=falseogc:PropertyNameLONG_STAT/ogc:PropertyNameogc:Literal-61/ogc:Literal/ogc:PropertyIsEqualTo/ogc:Filter
 here is the error we get in the browser
 ows:Exception exceptionCode=NoApplicableCode locator=mapserv
ows:ExceptionTextmsWFSGetFeature(): WFS server error.
 FLTApplyFilterToLayer() failed
 msOracleSpatialLayerWhichShapes(): OracleSpatial error. Check your data
 statement and server logs/ows:ExceptionText

 from mapserver logs
 [Tue May 12 11:59:10 2015].177992 msOracleSpatialLayerTranslateFilter.
 String:  ([LONG_STAT] =*-61)

 LONG_STAT is a NUMBER in the DB
 DescribefeatureType returns
   element name=NO_STAT_CLIM minOccurs=0 type=string/
  element name=NO_STAT_FADQ minOccurs=0 type=string/
  element name=NOM_STAT minOccurs=0 type=string/
  element name=LATI_STAT minOccurs=0 type=string/
  element name=LONG_STAT minOccurs=0 type=string/
  element name=ALTI_STAT minOccurs=0 type=string/

 I tried to add gml_types auto in the mapfile, but it still returns
 string as data type
 I tried gml_LONG_STAT_type = Integer in the mapfile, 
describeFeatureType
 returns element name=LONG_STAT minOccurs=0 type=double/  but I
 still get an error in getFeature

 I'm using CONNECTIONTYPE oraclespatial in the mapfile

 I can provide more information

 Is it a known issue or can I do something about that?

 Thank you!
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users





___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-14 Thread Steve . Toutant
And setting it to true doesn't make more sense.
I guess it is already not used when the source is postgis

Thank you very much for your help in this
Steve





Smith, Michael ERDC-RDE-CRREL-NH michael.sm...@erdc.dren.mil 
2015-05-14 09:43

A
steve.tout...@inspq.qc.ca steve.tout...@inspq.qc.ca
cc
MapserverList OSGEO mapserver-users@lists.osgeo.org, thomas bonfort 
thomas.bonf...@gmail.com
Objet
Re: [EXTERNAL] Re: [mapserver-users] Mapserver 7+oracle - wfs getFeature 
with filter on numeric field








The matchCase triggers a string comparison. matchCase doesn't seem to make 
sense for a number. 

That being said, I can look into the specific case of matchCase and a 
numeric comparison and make sire that it isn't used.

Mike

Michael Smith
US Army Corps
Remote Sensing GIS/Center
michael.sm...@usace.army.mil


From: steve.tout...@inspq.qc.ca steve.tout...@inspq.qc.ca
Date: Thursday, May 14, 2015 at 9:28 AM
To: Michael Smith michael.sm...@erdc.dren.mil
Cc: MapserverList OSGEO mapserver-users@lists.osgeo.org, thomas bonfort 
thomas.bonf...@gmail.com
Subject: Re: [EXTERNAL] Re: [mapserver-users] Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

Is there a documentation that says that it is not?
Folks from gdal list also think that it is not supported...I guess you are 
right. But as I said on the gdal list, many countries are using a comma as 
a decimal separatorwhat other people on the planet do?
Anyway the comma is another problem that I try to manage later..

For now, We have an application that generate and launch spatial queries 
on WFS, matchCase=false by default. Before modifying the code I want to 
understand what is going on
It seems,when using numeric value, that matchCase as no impact in PostGIS, 
but it is important in oracle to be set to true

gml_type = auto, returns double in postgis and oracle, so that is fine
A WFS getFeature with the operator PropertyIsEqualTo AND matchCase=false
using this value -64.225 
PostGis: it works 
Oracle (from mike's test): it fails...matchCase must be set to true

A WFS getFeature with the operator PropertyIsEqualTo AND matchCase=false
using this value -64,225 
PotsGis: not tested 
Oracle: it fails...matchCase must be set to true

Is there a reason why, with oracle, matchCase should be set to true when 
using numeric value, or that could be fixed?
Regards 
Steve 



Smith, Michael ERDC-RDE-CRREL-NH michael.sm...@erdc.dren.mil 
2015-05-14 09:17 


A
steve.tout...@inspq.qc.ca steve.tout...@inspq.qc.ca
cc
MapserverList OSGEO mapserver-users@lists.osgeo.org, thomas bonfort 
thomas.bonf...@gmail.com
Objet
Re: [EXTERNAL] Re: [mapserver-users] Mapserver 7+oracle - wfs getFeature 
with filter on numeric field










Its not clear to me that commas as the decimal separator is supported in 
XML/GML. I can't find any documentation to indicate that it is. Can you 
point some out to me?

In any event, I didn't test with comma decimal separators. 

Mike 

  
 
Michael Smith 
US Army Corps 
Remote Sensing GIS/Center 
michael.sm...@usace.army.mil 


From: steve.tout...@inspq.qc.ca steve.tout...@inspq.qc.ca
Date: Thursday, May 14, 2015 at 8:54 AM
To: Michael Smith michael.sm...@erdc.dren.mil
Cc: MapserverList OSGEO mapserver-users@lists.osgeo.org, thomas bonfort 
thomas.bonf...@gmail.com
Subject: Re: [EXTERNAL] Re: [mapserver-users] Mapserver 7+oracle - wfs 
getFeature with filter on numeric field

Thanks Mike for having a look at it.
Your decimals are separated by a comma or a dot?


Smith, Michael ERDC-RDE-CRREL-NH michael.sm...@erdc.dren.mil 
2015-05-13 18:53


A
steve.tout...@inspq.qc.ca steve.tout...@inspq.qc.ca, thomas bonfort 
thomas.bonf...@gmail.com
cc
MapserverList OSGEO mapserver-users@lists.osgeo.org
Objet
Re: [EXTERNAL] Re: [mapserver-users] Mapserver 7+oracle - wfs getFeature 
with filter on numeric field












Steve, 

I tested this out with 7.1 with numeric type fields and it works for me as 
long as I don't use matchCase=false. That seems to kick it in to a 
string comparison. matchCase=true and just PropertyIsEqualTo work fine.

In our metadata we use gml_types   auto when the database knows the 
types and explicit declarations (eg gml_attributename_type   integer) 
when it doesn't work.

The key is that the field type has to report as a numeric type or the 
backend treats it as a string comparison.

Mike 
 
Michael Smith 
US Army Corps 
Remote Sensing GIS/Center 
michael.sm...@usace.army.mil


From: steve.tout...@inspq.qc.ca steve.tout...@inspq.qc.ca
Date: Wednesday, May 13, 2015 at 10:35 AM
To: thomas bonfort thomas.bonf...@gmail.com
Cc: MapserverList OSGEO mapserver-users@lists.osgeo.org
Subject: [EXTERNAL] Re: [mapserver-users] Mapserver 7+oracle - wfs 
getFeature with filter on numeric field
Resent-From: Michael Smith michael.sm...@usace.army.mil

Precision: we are using MS7.1
Removing matchcase part makes oracle, and postgis, crash.
I have this error: 

ows:ExceptionReport xmlns:xsi=http://www.w3.org/2001

Re: [mapserver-users] [EXTERNAL] Re: Mapserver 7+oracle - wfs getFeature with filter on numeric field

2015-05-13 Thread Smith, Michael ERDC-RDE-CRREL-NH
Steve,

I tested this out with 7.1 with numeric type fields and it works for me as long 
as I don't use matchCase=false. That seems to kick it in to a string 
comparison. matchCase=true and just PropertyIsEqualTo work fine.

In our metadata we use gml_types   auto when the database knows the types 
and explicit declarations (eg gml_attributename_type   integer) when it 
doesn't work.

The key is that the field type has to report as a numeric type or the backend 
treats it as a string comparison.

Mike

Michael Smith
US Army Corps
Remote Sensing GIS/Center
michael.sm...@usace.army.mil


From: steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca 
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca
Date: Wednesday, May 13, 2015 at 10:35 AM
To: thomas bonfort thomas.bonf...@gmail.commailto:thomas.bonf...@gmail.com
Cc: MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: [EXTERNAL] Re: [mapserver-users] Mapserver 7+oracle - wfs getFeature 
with filter on numeric field
Resent-From: Michael Smith 
michael.sm...@usace.army.milmailto:michael.sm...@usace.army.mil

Precision: we are using MS7.1
Removing matchcase part makes oracle, and postgis, crash.
I have this error:

ows:ExceptionReport 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instancehttp://www.google.com/url?q=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instancesa=Dsntz=1usg=AFQjCNFERp6A_kcvqihMCKJ7EHX8O14vIA
 
xmlns:ows=http://www.opengis.net/owshttp://www.google.com/url?q=http%3A%2F%2Fwww.opengis.net%2Fowssa=Dsntz=1usg=AFQjCNE9_q7eSkcBl4XJimXTw1Zx0EiDow
 version=1.1.0 
language=en-USxsi:schemaLocation=http://www.opengis.net/ows 
/ahttp://www.google.com/url?q=http%3A%2F%2Fwww.opengis.net%2Fowssa=Dsntz=1usg=AFQjCNE9_q7eSkcBl4XJimXTw1Zx0EiDowhttp://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsdhttp://www.google.com/url?q=http%3A%2F%2Fschemas.opengis.net%2Fows%2F1.0.0%2FowsExceptionReport.xsdsa=Dsntz=1usg=AFQjCNGmnK6iSrh-cSWEtM2VV17uuSbVNA
ows:Exception exceptionCode=NoApplicableCode locator=mapserv
ows:ExceptionText
msWFSGetFeature(): WFS server error. FLTApplyFilterToLayer() failed 
msOracleSpatialLayerWhichShapes(): OracleSpatial error. Check your data 
statement and server logs
/ows:ExceptionText


The problem might be the decimals?
Here is the request
wfs:Query typeName=feature:SMDVDP_STAT_METE srsName=EPSG:32198
ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;
ogc:PropertyIsEqualTo
ogc:PropertyNameLONG_STAT/ogc:PropertyName
ogc:Literal-61,8031/ogc:Literal
/ogc:PropertyIsEqualTo
/ogc:Filter
/wfs:Query
/wfs:GetFeature




thomas bonfort thomas.bonf...@gmail.commailto:thomas.bonf...@gmail.com

2015-05-13 05:40


A
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca
cc
MapserverList OSGEO 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Objet
Re: [mapserver-users] Mapserver 7+oracle - wfs getFeature with filter 
on numeric field









can you try the same request without the matchCase part and report
back please?

On 12 May 2015 at 18:11,  
steve.tout...@inspq.qc.camailto:steve.tout...@inspq.qc.ca wrote:
 I have a problem using a FILTER in a wfs getFeature request on an oracle DB
 with MS7
 When I launch a getFeature request with a Filter on a numeric field it
 doesn't work,
 ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;ogc:PropertyIsEqualTo
 matchCase=falseogc:PropertyNameLONG_STAT/ogc:PropertyNameogc:Literal-61/ogc:Literal/ogc:PropertyIsEqualTo/ogc:Filter
 here is the error we get in the browser
 ows:Exception exceptionCode=NoApplicableCode locator=mapserv
ows:ExceptionTextmsWFSGetFeature(): WFS server error.
 FLTApplyFilterToLayer() failed
 msOracleSpatialLayerWhichShapes(): OracleSpatial error. Check your data
 statement and server logs/ows:ExceptionText

 from mapserver logs
 [Tue May 12 11:59:10 2015].177992 msOracleSpatialLayerTranslateFilter.
 String:  ([LONG_STAT] =*-61)

 LONG_STAT is a NUMBER in the DB
 DescribefeatureType returns
   element name=NO_STAT_CLIM minOccurs=0 type=string/
  element name=NO_STAT_FADQ minOccurs=0 type=string/
  element name=NOM_STAT minOccurs=0 type=string/
  element name=LATI_STAT minOccurs=0 type=string/
  element name=LONG_STAT minOccurs=0 type=string/
  element name=ALTI_STAT minOccurs=0 type=string/

 I tried to add gml_types auto in the mapfile, but it still returns
 string as data type
 I tried gml_LONG_STAT_type = Integer in the mapfile, describeFeatureType
 returns element name=LONG_STAT minOccurs=0 type=double/  but I
 still get an error in getFeature

 I'm using CONNECTIONTYPE oraclespatial in the mapfile

 I can provide more information

 Is it a known issue or can I do something about that?

 Thank you!
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users