ossimString C-local conversion patch

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ossimString C-local conversion patch

Stéphane ALBERT
Hello,

I'm developer on the OTB project (https://www.orfeo-toolbox.org/) which uses OSSIM and runs on some Linux/Windows/OSX non-english systems (such as fr_FR.UTF-8). Those systems use the comma ',' as decimal point as opposed to the POSIX dot '.' decimal separator.

However, the product meta-data always use the point '.' decimal separator and the ossimString class always considers the system locale (on a French system the decimal separator will be the comma ','). So, there are some issues regarding conversion of meta-data values on our target platforms. As for an example a '1.5' string would be converted to a 1 numerical value.

Please find enclosed a patch I started but remains unfinished and untested which consists in:
  1. adding a useCLocal force flag to all string-numerical conversion functions of the ossimString
  2. use the std::istringstream.imbue( std::locale::classic() ) to do that
  3. also include some ossimString private template functions to factorize some code
  4. use the useCLocale everywhere in the OSSIM library were meta-data string-value conversion occurs and let other use of the ossimString class choose to use the system or C/POSIX locale.

The OTB PSC and developer team would like to know if the people of the OSSIM project would be interested in including such a a patch in future OSSIM releases.

Best regards,

http://orfeo-toolbox.org

Stéphane ALBERT
Ingénieur d'études et développement
Business Unit E-SPACE & Geo Information, Département APPLICATIONS

CS Systèmes d'Information
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - France


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer

ossim-C-locale-string.patch (33K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ossimString C-local conversion patch

Garrett Potts-5
Hello:

Nice!  We are interested but we now do everything via “Pull Requests” from the github code off the “dev” branch so it is easier to review the diffs and merge them into the baseline for testing.  If you can use github to fork the ossim code and switch to the dev branch and then do a pull request off that dev branch then we can review and take a look at the code.  I probably will not be able to get to it until Monday though.

Take care  and thank you


Garrett

On Jul 21, 2016, at 6:42 AM, Stéphane ALBERT <[hidden email]> wrote:

Hello,

I'm developer on the OTB project (https://www.orfeo-toolbox.org/) which uses OSSIM and runs on some Linux/Windows/OSX non-english systems (such as fr_FR.UTF-8). Those systems use the comma ',' as decimal point as opposed to the POSIX dot '.' decimal separator.

However, the product meta-data always use the point '.' decimal separator and the ossimString class always considers the system locale (on a French system the decimal separator will be the comma ','). So, there are some issues regarding conversion of meta-data values on our target platforms. As for an example a '1.5' string would be converted to a 1 numerical value.

Please find enclosed a patch I started but remains unfinished and untested which consists in:
  1. adding a useCLocal force flag to all string-numerical conversion functions of the ossimString
  2. use the std::istringstream.imbue( std::locale::classic() ) to do that
  3. also include some ossimString private template functions to factorize some code
  4. use the useCLocale everywhere in the OSSIM library were meta-data string-value conversion occurs and let other use of the ossimString class choose to use the system or C/POSIX locale.

The OTB PSC and developer team would like to know if the people of the OSSIM project would be interested in including such a a patch in future OSSIM releases.

Best regards,

http://orfeo-toolbox.org

Stéphane ALBERT
Ingénieur d'études et développement
Business Unit E-SPACE & Geo Information, Département APPLICATIONS

CS Systèmes d'Information
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - France

<ossim-C-locale-string.patch>------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ossimString C-local conversion patch

Garrett Potts-5
In reply to this post by Stéphane ALBERT
Hello:

Nice!  We are interested but we now do everything via “Pull Requests” from the github code off the “dev” branch so it is easier to review the diffs and merge them into the baseline for testing.  If you can use github to fork the ossim code and switch to the dev branch and then do a pull request off that dev branch then we can review and take a look at the code.  I probably will not be able to get to it until Monday though.

Take care  and thank you


Garrett

On Jul 21, 2016, at 6:42 AM, Stéphane ALBERT <[hidden email]> wrote:

Hello,

I'm developer on the OTB project (https://www.orfeo-toolbox.org/) which uses OSSIM and runs on some Linux/Windows/OSX non-english systems (such as fr_FR.UTF-8). Those systems use the comma ',' as decimal point as opposed to the POSIX dot '.' decimal separator.

However, the product meta-data always use the point '.' decimal separator and the ossimString class always considers the system locale (on a French system the decimal separator will be the comma ','). So, there are some issues regarding conversion of meta-data values on our target platforms. As for an example a '1.5' string would be converted to a 1 numerical value.

Please find enclosed a patch I started but remains unfinished and untested which consists in:
  1. adding a useCLocal force flag to all string-numerical conversion functions of the ossimString
  2. use the std::istringstream.imbue( std::locale::classic() ) to do that
  3. also include some ossimString private template functions to factorize some code
  4. use the useCLocale everywhere in the OSSIM library were meta-data string-value conversion occurs and let other use of the ossimString class choose to use the system or C/POSIX locale.

The OTB PSC and developer team would like to know if the people of the OSSIM project would be interested in including such a a patch in future OSSIM releases.

Best regards,

http://orfeo-toolbox.org

Stéphane ALBERT
Ingénieur d'études et développement
Business Unit E-SPACE & Geo Information, Département APPLICATIONS

CS Systèmes d'Information
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - France

<ossim-C-locale-string.patch>------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ossimString C-local conversion patch

Kramer, Oscar
In reply to this post by Garrett Potts-5
FYI: You can find ossim on github at https://github.com/ossimlabs. You can proceed to whichever repo is of interest (ossim, ossim-plugins, etc) and select the "Pull Request" tab to create a new request. Make sure you are working off of that repos "dev" branch, not "master"

Oscar

From: Potts, Garrett [[hidden email]]
Sent: Thursday, July 21, 2016 07:23
To: Stéphane ALBERT
Cc: ossim users; [hidden email]
Subject: Re: [OSSIM] ossimString C-local conversion patch

Hello:

Nice!  We are interested but we now do everything via “Pull Requests” from the github code off the “dev” branch so it is easier to review the diffs and merge them into the baseline for testing.  If you can use github to fork the ossim code and switch to the dev branch and then do a pull request off that dev branch then we can review and take a look at the code.  I probably will not be able to get to it until Monday though.

Take care  and thank you


Garrett

On Jul 21, 2016, at 6:42 AM, Stéphane ALBERT <[hidden email]> wrote:

Hello,

I'm developer on the OTB project (https://www.orfeo-toolbox.org/) which uses OSSIM and runs on some Linux/Windows/OSX non-english systems (such as fr_FR.UTF-8). Those systems use the comma ',' as decimal point as opposed to the POSIX dot '.' decimal separator.

However, the product meta-data always use the point '.' decimal separator and the ossimString class always considers the system locale (on a French system the decimal separator will be the comma ','). So, there are some issues regarding conversion of meta-data values on our target platforms. As for an example a '1.5' string would be converted to a 1 numerical value.

Please find enclosed a patch I started but remains unfinished and untested which consists in:
  1. adding a useCLocal force flag to all string-numerical conversion functions of the ossimString
  2. use the std::istringstream.imbue( std::locale::classic() ) to do that
  3. also include some ossimString private template functions to factorize some code
  4. use the useCLocale everywhere in the OSSIM library were meta-data string-value conversion occurs and let other use of the ossimString class choose to use the system or C/POSIX locale.

The OTB PSC and developer team would like to know if the people of the OSSIM project would be interested in including such a a patch in future OSSIM releases.

Best regards,

http://orfeo-toolbox.org

Stéphane ALBERT
Ingénieur d'études et développement
Business Unit E-SPACE & Geo Information, Département APPLICATIONS

CS Systèmes d'Information
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - France

<ossim-C-locale-string.patch>------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer
Loading...