<div dir="ltr"><div><div><div><div><div>Hi,<br></div>this is not really a postgis question.<br></div>According to npgsql website, the best way to get answers<br></div>is to post questions on <a href="http://stackoverflow.net">stackoverflow.net</a> with the npgsql tag.<br><br></div>However, to answer your question, you can use the Environement.Newline property<br></div><div>to create a string value containing line feeds. <br>Note that this property will output \r\n</div><div>or \n depending of the platform running your code (NT \ linux).<br></div><div>Note that the interpretation of the sequence will depend of your platform too.<br></div><div><br></div><div>If you just want to lay an instruction over mutliple line, <br>you can add a _ at the end of each line (except the last one). <br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-12-28 21:57 GMT+01:00 Liglio Cavalcante <span dir="ltr"><<a href="mailto:liglio.pessoal@nexxa.com.br" target="_blank">liglio.pessoal@nexxa.com.br</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I have a problem to separate lines in the argument "colormap". I am using a<br>
npgsql driver, and concatenating a command string to use the function<br>
st_colormap. What can I use to break lines ?<br>
<br>
-- This is not working: Chr(10) = ASCII LineFeed<br>
strColorMap &= "nv 0 0 0 0" & Chr(10)<br>
strCores &= val_nivel1 & " 255 0 145 255" & Chr(10)<br>
strCores &= val_nivel2 & " 181 19 111 255" & Chr(10)<br>
strCores &= val_nivel3 & " 19 0 104 255" & Chr(10)<br>
strCommand = "SELECT ST_ColorMap( rast, '" + strColorMap + "') as rast FROM<br>
tb_rasterdensity"<br>
<br>
To look like this:<br>
ST_ColorMap( rast,<br>
'nv 0 0 0 0<br>
0.5 255 0 145 255<br>
1 181 19 111 255<br>
3 19 0 104 255<br>
') as rast FROM tb_rasterdensity)<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://postgis.17.x6.nabble.com/problem-using-st-colormap-in-a-command-string-tp5010778.html" rel="noreferrer" target="_blank">http://postgis.17.x6.nabble.<wbr>com/problem-using-st-colormap-<wbr>in-a-command-string-tp5010778.<wbr>html</a><br>
Sent from the PostGIS - User mailing list archive at Nabble.com.<br>
______________________________<wbr>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/postgis-users</a></blockquote></div><br></div>