<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Duarte,<br><br>A razão por ter adoptado por st_ndims = 4 é que os pontos que estou a tratar têm cota z.<br><br>Fiz o que me proposeste e de facto os vectores não se encontravam uniformizados.<br><br><br><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANkAAACFCAIAAABZkMqtAAAIVElEQVR4nO2dPW7jPBCGcyfB+Iq9yVapv8JHcOkjGEhhQHV8hRT2AeIjBMgFDN9AW8ixKHH4zxHJyftigMVqZYkz80j8Ecl9+QNBdehl/GMLQeU0sXg8HocK1Pd96SI0JhkR6/v+cDg8WDwcDvcKNEa2dClakoyIgUUJkhExsChBMiIGFiVIRsTAogTJiBhYlCAZEQOLEiQjYmBRgmREDCxKkIyIgcVEXfebl4c2++v9fr+fXl8WR9jVVMSMAouJAovZJIJFJfuvJ7Zi0QKL3nKlCSwmSmexgMAil8BiqMAil8jIKo6YasSFArCcLrLZX121rHrHzf6ks6jHfHFE4XcqpR1qk/uWiBE/WoTE/9+nuxHF9ImeT5paYNHox2Z/zc7iZrO8jpp1891ePFnUb7DZX/XLKje1uk9HzPKjR4nUx8Hjzr4sGqMng0VL+hlYNN3G4zQ/Fn1FXMxYriWLZtAeJbKdMJU6nEVzKUWwaKovr/uNJfmBIm6ipms8Nkvgsyz23BAsUi8m6qbjeT7uW59eNSCn1/HvRHHIg+EsmqPnkabqWVw+wlQHISOLlqDTWISyaG8faif6uO/59FLhmp2g3TyuvWj0rnkWzfXJ5M8qLBr6FnlZVA66Gnaqp2rEyI6RKuMJlqcPLP7IlQ/JLHq4Dxb5ZB4t07KiNarWqaOVu6zAosv9Fepoa7F/DYunVy2ktpjFwegVTbI9TiU2J4s+7nv3Xa77TWTfhepbp7BIpqkJFo2ytqnix7qXF30cdIyEsLHocp9tTMdxWiiLrjS1zKKjRZWdRd9xyJVYVPxjGut2wB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22gA8sumTcIQAsJtqjy/I8AhbBYhEjciyIxbztRbDIa7sv4xTP2cuyfhapfwWLjVuD70XTmM5s9PvHC7DYjrXI4tuw+1q+yElHwGJT1iaL3YrfAMEiu/W3NdqL01dmXV+RZz5tnbkRYLGwYc6YfUPd+E3SwGJEFouXIYsXYLF5A4tgsRYDi1wCixFZLF6GLF6AxeYNLHIJLEZksXgZsngBFps3sMglsBiRxeJlyOIFWGzewCKXwGJEFouXIYsXYLF5E8hiPfvSnqFfqYlF7EvbqJ3P5+6tdNrStHwvoo5u1M7nc2mWMggsSrAni8VLEmdgUY6BRS6BxVADi1wCi6EGFrkEFkMNLHIJLKq2WOWkLwLsyrG42E1gucmi1R3VEbDYgI3L/55pGxNJruZcmUVia+T34XtwbVBr2F03C4vKCsD0tQVgUc+3tu6YPFhLHW1Y+Pw00+666Sya17uk8QgWZ5nzyHctLJLbIf+YZXddThbTaASLNquZRet70bK7bhYW1aX58/o6AUawaDF9e66uEhat7UX77roMfReVxoQNJMCiycZ+K7mfTjEWP6Z+NNGiUM6x7K4LFhszE4hdJe/FDyOOzt11GVhUG5Coo7OaBcSuEhbfho7aVdFnd93sLGZ6K4JFzfqbY1O5eljUyfPZXTczi7OeC8Z08pkTxK5uFgnjfS9m/a+vwOLTLuaeqWr1sHix9GCexsjibJwx/bMLWBy6t8cQCZnXSwXji+PGnrP2q883wNG4WMwNIlicpdag4ix2b7PRnFHOuRGm3XVzsJj7f6UEi3FWTx0dZ6ksEtMi5oqGEyyGGlgEi7UYWASLtdhvZ5FPYDHUwCKXwGKogUUugcVQA4tcAouhBha5BBZDDSxyCSyGGljkElgMNYH7jI04Ftd2u/3v/yPM33a73bF97Xa7EcIHixBUXP8ASaYsLvq/EDgAAAAASUVORK5CYII=" alt=""><br><br><br><br>Como poderei então converter e uniformizar os registos.<br><br>Existe a função st_force , será a indicada ?<br><pre class="programlisting"><code>ALTER agua_boca_rega geom ADD geom2d geometry
UPDATE geom SET geom2d = ST_Force_2D(the_geom) </code><br></pre><pre class="programlisting"><br></pre><br><br><br><br><div>> Date: Mon, 11 Aug 2014 02:38:12 -0700<br>> From: dncarreira@gmail.com<br>> To: qgis-pt@lists.osgeo.org<br>> Subject: Re: [QGIS-pt] coluna da geometria geom e the_geom<br>> <br>> Carlos,<br>> <br>> Qual a razão de ter st_ndims = 4? Os vectores têm coordenadas x,y,z,m?<br>> <br>> Se for o caso, penso que o QGIS não edita dados 3d. E não sei se edita dados<br>> com coordenada m. Penso que não, mas talvez alguém possa confirmar?<br>> <br>> Por outro lado, ao adicionar a constraint de obrigar os vectores a terem 4<br>> coords, deu erro. Logo pelo menos parte dos vectores não têm essa dimensão.<br>> Tens de verificar que tipo de vectores estão afinal nessa tabela.<br>> <br>> Este sql deve mostrar as dims existentes:<br>> <br>> select st_ndims(geom),count(*) from <tabela_espacial> group by<br>> st_ndims(geom);<br>> <br>> Convém que numa tabela todos os vectores sejam do mesmo tipo. Se for<br>> preciso, terás de converter alguns vectores para uniformizar. Ou criar uma<br>> nova tabela com apenas xy. Se precisares da coord z poderá ser suficiente<br>> uma coluna com esses valores?<br>> <br>> Quanto ao facto de teres o problema inicial de tabelas "mortas" a aparecer é<br>> porque o postgis <2.0 não mantém automaticamente o registo das tabelas<br>> espaciais (vê public.geometry_columns). Para manter este registo actual,<br>> deves criar e apagar tabelas espaciais com as funções de gestão do postgis<br>> ou terás de manter os registos manualmente com inserts e deletes:<br>> <br>> AddGeometryColumn<br>> DropGeometryColumn<br>> DropGeometryTable<br>> Populate_Geometry_Columns<br>> Probe_Geometry_Columns<br>> <br>> Toda a info aqui:<br>> http://postgis.refractions.net/documentation/manual-1.5/reference.html#Management_Functions<br>> <br>> Abr,<br>> Duarte<br>> <br>> <br>> <br>> <br>> <br>> <br>> --<br>> View this message in context: http://osgeo-org.1560.x6.nabble.com/coluna-da-geometria-geom-e-the-geom-tp5155514p5155768.html<br>> Sent from the QGIS-pt mailing list archive at Nabble.com.<br>> _______________________________________________<br>> QGIS-pt mailing list<br>> QGIS-pt@lists.osgeo.org<br>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/qgis-pt<br></div> </div></body>
</html>