1

What is the purpose of the parameter 'separator' in the Mapnik CSV plugin DataSource

Example of the code:

         parameters p;
        p["type"]="csv";
        p["inline"]=quotedStr;
        p["separator"]="|";

What is the purpose of last line?

1 Answer 1

1

From the plugin web page:

column separator

The plugin will read the first line of the file to count the occurrences of ,, \t, |, and ; as possible delimiters of columns. You can disable this auto-detection by passing the separator option.

In other words, by default the plugin will look for a number of separators other than comma as the column separator. If you don't want it to do this, use the separator parameter to specify the character that separates columns in your data. The main reason to override the separator is that your data contains one of the default characters and you don't want it to be interpreted as a column break.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.