RE: [mapserver-users] Runtime Substitution bug

2011-09-16 Thread Nicolas BOUTET
Hi Steve,

If I remove the substitution variable and replace it by a value, it doesn’t 
matter if there is a space or not.

I also tried with some others SQL statements where the substitution variable is 
not at the end of the SQL String. There is no problem with those SQL Statements.

 

Nicolas

 

De : Steve Lime [mailto:sdl...@gmail.com] 
Envoyé : jeudi 15 septembre 2011 20:47
À : Nicolas BOUTET
Cc : ; 
Objet : Re: [mapserver-users] Runtime Substitution bug

 

If you take var. substitution out of it by hard coding an idblock value does 
the space still matter?

 

Steve

Sent from my iPad


On Sep 15, 2011, at 11:07 AM, "Nicolas BOUTET"  
wrote:

Hello,

 

I’m using MapServer 6.0.1 in conjunction with GDAL 1.8 (Tamas binaries) with 
IIS 7.5, and I get an issue while using runtime substitution.

 

I have a LAYER where the data source if defined like this :

 

   CONNECTIONTYPE OGR

   CONNECTION   "OCI:…/….@gti5500"

   DATA "SELECT idblock, entitiesMbr

   FROM block

   WHERE idblock = %idBlock% "

 

Please note that there is a space character at the end of the SQL statement, 
after the variable to substitute.

All is working fine while the space is still here.

If I remove it, I get an Error 500 from the Server and the Windows Application 
logs register an error in the MSVCR100.dll module.

 

Of course, the layer contains also a validation block like this:

VALIDATION

   idblock 
'^[0-9]{1,6}$'

   END

 

It seems that this is a bug in variable substitution. Can you confirm this? 
Have you already observe this kind of issue?

 

Regards

 

Nicolas

___
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


[mapserver-users] Runtime Substitution bug

2011-09-15 Thread Nicolas BOUTET
Hello,

 

I'm using MapServer 6.0.1 in conjunction with GDAL 1.8 (Tamas binaries) with
IIS 7.5, and I get an issue while using runtime substitution.

 

I have a LAYER where the data source if defined like this :

 

   CONNECTIONTYPE OGR

   CONNECTION
"OCI:./..@gti5500"

   DATA "SELECT idblock, entitiesMbr

   FROM block

   WHERE idblock = %idBlock% "

 

Please note that there is a space character at the end of the SQL statement,
after the variable to substitute.

All is working fine while the space is still here.

If I remove it, I get an Error 500 from the Server and the Windows
Application logs register an error in the MSVCR100.dll module.

 

Of course, the layer contains also a validation block like this:

VALIDATION

   idblock
'^[0-9]{1,6}$'

   END

 

It seems that this is a bug in variable substitution. Can you confirm this?
Have you already observe this kind of issue?

 

Regards

 

Nicolas

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


[mapserver-users] MSVCR fault when using OGR and OCI datasources ?

2011-09-01 Thread Nicolas BOUTET
Hello,

 

Using the 6.0.1 version of MapServer and the 1.8.1 version of GDAL (using
Tamas Szekeres binaries
 ), I got and error when I try to request a WFS
layer. This layer get data from an Oracle Database using OGR and OCI.

The same layer works well when I use MapServer 5.6 and GDAL 1.7. WMS layers
work well, and WFS GetCapabilities requests are working well also.

 

Here is the Windows event registered when the GetFeature request is sent :

 

The Window Event:

Faulting application name: mapserv.exe, version: 0.0.0.0, time stamp:
0x4e208c15

Faulting module name: MSVCR80.dll, version: 8.0.50727.4927, time stamp:
0x4a27427d

Exception code: 0xc005

Fault offset: 0x0001e272

Faulting process id: 0xabc

Faulting application start time: 0x01cc687fe11d27a6

Faulting application path: D:\wwwRoot\MapServer6\cgi-bin\mapserv.exe

Faulting module path:
C:\Windows\WinSxS\amd64_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4927_n
one_88dce9872fb18caf\MSVCR80.dll

Report Id: 1efbc4e2-d473-11e0-9fc6-005056991513

 

Here are some part of the MapFile (the definition of the WFS layers is in a
separate file) :

 

MAP

CONFIG  PROJ_LIB
"D:/MapServerProj/nad/"

CONFIG  GDAL_DRIVER_PATH
"D:/gdalplugins1.8/"

CONFIG  "MS_ERRORFILE"
"D:/MapServerMaps/Errors_MapAgriQuest6.txt"

DEBUG   5

..

WEB

   IMAGEPATH
"D:/wwwroot/MapServer6/temp/"

   IMAGEURL "/temp/"

   METADATA

   "ows_enable_request" "*"

   ..

   END

END

..

INCLUDE "MapAgriQuest_Blocks.map"

..

END # Map

 

Here is the definition of the layer:

 

LAYER

   NAME "LOCALIZED_BLOCKS"

   METADATA

   "ows_title"
"LOCALIZED_BLOCKS"

   ..

   END

   VALIDATION

   idUser
'^[0-9]{1,6}$' # %idUser% must be numeric and
between 1 and 6 characters

   idLanguage
'^[0-9]{1,2}$'  # %idLanguage% must be numeric and
between 1 and 2 characters

   END 

   TYPE POLYGON

CONNECTIONTYPE  OGR

CONNECTION  "OCI:/@"

   DATA "SELECT ..

   FROM ..

   WHERE .."

   STATUS  ON

   ...

END

 

Best regards

 

Nicolas

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


RE: [mapserver-users] Parameterized MapFile using CGI variable

2011-04-29 Thread Nicolas BOUTET
Yes, I realize reading you that the include statement can be inserted at any
place in the main Map file.

So, it works !!!

 

Thanks a lot David

 

De : Fawcett, David (MPCA) [mailto:david.fawc...@state.mn.us] 
Envoyé : vendredi 29 avril 2011 17:03
À : nicolas.bou...@geosys.com; mapserver-users@lists.osgeo.org
Objet : RE: [mapserver-users] Parameterized MapFile using CGI variable

 

Nicolas, 

 

I didn’t have a mapfile that utilizes connection handy, but I did test using
INCLUDE to substitute the value for DATA in an individual layer.  

 

Here is part of the layer definition:

 

LAYER

  NAME "watersheds"

  STATUS DEFAULT

  #DATA 'majclip'

  INCLUDE "inc_data_majclip.map"

  TYPE POLYGON

 

The file inc_data_majclip.map contains:

 

  DATA "majclip"

 

Based on this, I would assume that you should be able to do the same with
the CONNECTION for each of your layers.

 

David.

 

From: Nicolas BOUTET [mailto:nicolas.bou...@geosys.com] 
Sent: Friday, April 29, 2011 9:49 AM
To: Fawcett, David (MPCA); mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] Parameterized MapFile using CGI variable

 

Thank you David,

 

Yes, using INCLUDE should be a good solution. But as I know in MapServer
5.6, CONNECTION is a parameter of my LAYER objects, and not an object
itself. So I cannot have a CONNECTION object declared in a separate map
file… And I prefer to not have to duplicate the layers in different map
files.

 

Nicolas

 

 

De : Fawcett, David (MPCA) [mailto:david.fawc...@state.mn.us] 
Envoyé : vendredi 29 avril 2011 16:37
À : nicolas.bou...@geosys.com; mapserver-users@lists.osgeo.org
Objet : RE: [mapserver-users] Parameterized MapFile using CGI variable

 

One potential way to do it would be with the use of ‘include’s.  

 

http://mapserver.org/mapfile/Include.html

 

The primary mapfile wouldn’t have a connection object, but it would contain:

 

INCLUDE “connect_info.map”

 

Then on each machine, you would have a different version of connect_info.map
that contained the correct connection object for that machine.  

 

This wouldn’t give you the flexibility of changing it through the CGI
interface, but would allow you to use the same exact mapfile on both
machines.  

 

David.

 

From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Nicolas BOUTET
Sent: Friday, April 29, 2011 8:57 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Parameterized MapFile using CGI variable

 

Dear All,

 

I have 2 MapServer servers. One for Production use, and the other for
Validation use.

The MAP files placed on those servers are similar except that each server
has a different Oracle database as datasource.

For now, I have some different CONNECTION values depending if the map file
is on the Production or on the Validation server. So finally I must have
different MAP files.

 

Is there a way to have exactly the same map files on the 2 servers, and to
use a variable to parameterize the CONNECTION.

 

For example, I would like to set the CONNECTION of my layers to
“%ORACLECONNECTIONSTRING%” and to set a CGI Environment variable named
ORACLECONNECTIONSTRING to the correct value on each server. 

 

Nicolas

 

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


RE: [mapserver-users] Parameterized MapFile using CGI variable

2011-04-29 Thread Nicolas BOUTET
Thank you David,

 

Yes, using INCLUDE should be a good solution. But as I know in MapServer
5.6, CONNECTION is a parameter of my LAYER objects, and not an object
itself. So I cannot have a CONNECTION object declared in a separate map
file… And I prefer to not have to duplicate the layers in different map
files.

 

Nicolas

 

 

De : Fawcett, David (MPCA) [mailto:david.fawc...@state.mn.us] 
Envoyé : vendredi 29 avril 2011 16:37
À : nicolas.bou...@geosys.com; mapserver-users@lists.osgeo.org
Objet : RE: [mapserver-users] Parameterized MapFile using CGI variable

 

One potential way to do it would be with the use of ‘include’s.  

 

http://mapserver.org/mapfile/Include.html

 

The primary mapfile wouldn’t have a connection object, but it would contain:

 

INCLUDE “connect_info.map”

 

Then on each machine, you would have a different version of connect_info.map
that contained the correct connection object for that machine.  

 

This wouldn’t give you the flexibility of changing it through the CGI
interface, but would allow you to use the same exact mapfile on both
machines.  

 

David.

 

From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Nicolas BOUTET
Sent: Friday, April 29, 2011 8:57 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Parameterized MapFile using CGI variable

 

Dear All,

 

I have 2 MapServer servers. One for Production use, and the other for
Validation use.

The MAP files placed on those servers are similar except that each server
has a different Oracle database as datasource.

For now, I have some different CONNECTION values depending if the map file
is on the Production or on the Validation server. So finally I must have
different MAP files.

 

Is there a way to have exactly the same map files on the 2 servers, and to
use a variable to parameterize the CONNECTION.

 

For example, I would like to set the CONNECTION of my layers to
“%ORACLECONNECTIONSTRING%” and to set a CGI Environment variable named
ORACLECONNECTIONSTRING to the correct value on each server. 

 

Nicolas

 

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


[mapserver-users] Parameterized MapFile using CGI variable

2011-04-29 Thread Nicolas BOUTET
Dear All,

 

I have 2 MapServer servers. One for Production use, and the other for
Validation use.

The MAP files placed on those servers are similar except that each server
has a different Oracle database as datasource.

For now, I have some different CONNECTION values depending if the map file
is on the Production or on the Validation server. So finally I must have
different MAP files.

 

Is there a way to have exactly the same map files on the 2 servers, and to
use a variable to parameterize the CONNECTION.

 

For example, I would like to set the CONNECTION of my layers to
"%ORACLECONNECTIONSTRING%" and to set a CGI Environment variable named
ORACLECONNECTIONSTRING to the correct value on each server. 

 

Nicolas

 

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


[mapserver-users] Coordinates precision in GML output

2011-04-04 Thread Nicolas BOUTET
Hello all,

 

I'm serving some Oracle Geometries using MapServer as a WFS Server. 

Data are stored in Oracle using WGS84 and are served as GML using a Mercator
projection. Re-projection is also done by MapServer / PROJ.4.

 

All is working fine, but because I have a lot of geometries, with more and
more vertices, the resulting GML output is too big and I need to decrease
his size.

Because I don't need to have metric coordinates with 6 decimals (1 or 2
should be more than enough), I tried to find a way to limit the number of
decimals, with no success.

 

Does anybody know how to do this?

 

Thanks

 

Nicolas B.

 

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