<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    psql -d osm -c "UPDATE passeios SET rua = (SELECT FID_ FROM
    eixos_rua ORDER BY
    ST_Distance(eixos_rua.wkb_geometry,passeios.wkb_geometry) ASC LIMIT
    1)"<br>
    <br>
    <br>
    <br>
    <br>
    Esta querie n&atilde;o est&aacute; a funcionar, fica a processar eternamente,
    ningu&eacute;m sabe uma alternativa?4<br>
    Obrigado<br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    On 18-08-2011 10:13, Joaquim Luis wrote:
    <blockquote cite="mid:4E4CD7D1.6060503@ualg.pt" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      N&atilde;o sei se ser&aacute; o caso aqui mas o Notepad &eacute; uma l&aacute;stima como
      editor. Nomeadamente n&atilde;o &eacute; capaz de detectar/escrever os unix EOLs
      (End Of Line) o que para os scripts no Cygwin &eacute; mortal. A&iacute;, se as
      linhas n&atilde;o terminarem apenas com um '\n' (unix) mas sim com um
      '\n\r' (Win) os scripts n&atilde;o se executam.<br>
      Pode ser que seja o caso presente tamb&eacute;m.<br>
      <br>
      Joaquim<br>
      <br>
      <br>
      <br>
      <blockquote cite="mid:4E4CD3BD.3020102@sapo.pt" type="cite">
        <meta content="text/html; charset=ISO-8859-1"
          http-equiv="Content-Type">
        Mesmo assim n&atilde;o funciona, mas n&atilde;o percebo, na consola se
        executar o s&oacute; esse passo d&aacute;. S&oacute; n&atilde;o resulta no bloco de notas,
        estranho...<br>
        <br>
        <br>
        <br>
        <br>
        On 17-08-2011 23:06, Jo&atilde;o Carvalho wrote:
        <blockquote
cite="mid:CAFaYEV1YNeMR73UhyoxWt-3uaeK4+GrM5LsZ97YssVC5WOu8UQ@mail.gmail.com"
          type="cite">J&aacute; experimentaste com pelicas em vez das aspas?
          <div>Ou meteres tudo na mesma linha?</div>
          <div><br>
            <div><br>
              <div class="gmail_quote">No dia 17 de Agosto de 2011
                16:43, Pedro Costa <span dir="ltr">&lt;<a
                    moz-do-not-send="true"
                    href="mailto:pedrocostaarma@sapo.pt">pedrocostaarma@sapo.pt</a>&gt;</span>
                escreveu:<br>
                <blockquote class="gmail_quote" style="margin: 0pt 0pt
                  0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204);
                  padding-left: 1ex;">
                  <div bgcolor="#FFFFFF" text="#000000"> <br>
                    Algu&eacute;m consegue identificar porque estes comandos
                    n&atilde;o funcionam na shell:<br>
                    <br>
                    <br>
                    # psql -d osm "UPDATE p_celorico <br>
                    SET rua = (<br>
                    SELECT FID_<br>
                    FROM ev_celorico<br>
                    ORDER BY
                    ST_Distance(ev_celorico.wkb_geometry,p_celorico.wkb_geometry)
                    ASC<br>
                    LIMIT 1)"<br>
                    <br>
                    # psql -d osm "UPDATE p_mota<br>
                    SET rua = (<br>
                    SELECT FID_<br>
                    FROM ev_mota<br>
                    ORDER BY
                    ST_Distance(ev_mota.wkb_geometry,p_mota.wkb_geometry)
                    ASC<br>
                    LIMIT 1)"<br>
                    <br>
                    # psql -d osm "UPDATE p_fermil<br>
                    SET rua = (<br>
                    SELECT FID_<br>
                    FROM ev_fermil<br>
                    ORDER BY
                    ST_Distance(ev_fermil.wkb_geometry,p_fermil.wkb_geometry)
                    ASC<br>
                    LIMIT 1)"<br>
                    <br>
                    # psql -d osm "UPDATE p_gandarela
                    <div class="im"><br>
                      SET rua = (<br>
                      SELECT FID_<br>
                      FROM ev_gandarela<br>
                      ORDER BY
                      ST_Distance(ev_gandarela.wkb_geometry,p_gandarela.wkb_geometry)
                      ASC<br>
                      LIMIT 1)"<br>
                      <br>
                      <br>
                      <br>
                    </div>
                    A parte que est&aacute; entre aspas funciona perfeitamento
                    no pgadmin. S&oacute; na shell &eacute; que n&atilde;o consigo. Algu&eacute;m
                    tem alguma ideia?<br>
                    <br>
                    Obrigado
                    <div class="im"><br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      On 17-08-2011 16:16, Jo&atilde;o Carvalho wrote: </div>
                    <div>
                      <div class="h5">
                        <blockquote type="cite">Experimenta a meter o
                          nome do esquema antes do nome da tabela.<br>
                          <br>
                          Se n&atilde;o resultar, meter a query no pgadmin para
                          perceberes o erro.<br>
                          <br>
                          Jo&atilde;o<br>
                          <br>
                          <div class="gmail_quote">No dia 17 de Agosto
                            de 2011 16:06, Pedro Costa <span dir="ltr">&lt;<a
                                moz-do-not-send="true"
                                href="mailto:pedrocostaarma@sapo.pt"
                                target="_blank">pedrocostaarma@sapo.pt</a>&gt;</span>
                            escreveu:<br>
                            <blockquote class="gmail_quote"
                              style="margin: 0pt 0pt 0pt 0.8ex;
                              border-left: 1px solid rgb(204, 204, 204);
                              padding-left: 1ex;">
                              <div bgcolor="#FFFFFF" text="#000000">
                                Obrigado. Tou com outro problema, eu
                                coloco o seguinte no script:<br>
                                <br>
                                <br>
                                "<br>
                                <br>
                                # psql-d osm -c "UPDATE p_gandarela<br>
                                SET rua = (<br>
                                SELECT FID_<br>
                                FROM ev_gandarela<br>
                                ORDER BY
                                ST_Distance(ev_gandarela.wkb_geometry,p_gandarela.wkb_geometry)
                                ASC<br>
                                LIMIT 1)"<br>
                                <br>
                                "<br>
                                <br>
                                <br>
                                Mas n&atilde;o funciona, algu&eacute;m consegue
                                identificar o prblema?<br>
                                <br>
                                e j&aacute; agora como funciona a instru&ccedil;&atilde;o do
                                psql2shp?<br>
                                <br>
                                obrigado
                                <div>
                                  <div><br>
                                    <br>
                                    <br>
                                    <br>
                                    <br>
                                    <br>
                                    On 17-08-2011 15:37, Lu&iacute;s Ferreira
                                    wrote:
                                    <blockquote type="cite"> Era isso :)<br>
                                      <br>
                                      Eu escrevi<br>
                                      #! /bin/sh<br>
                                      <br>
                                      mas s&oacute; reparei depois q usas o
                                      bash. O sh &eacute; um link para o dash e
                                      eu n&atilde;o sei quais as diferen&ccedil;as.<br>
                                      <br>
                                      Bom trabalho.<br>
                                      <br>
                                      Lu&iacute;s Ferreira<br>
                                      <br>
                                      On Qua, 2011-08-17 at 15:30 +0100,
                                      Pedro Costa wrote:<br>
                                      <blockquote type="CITE"> J&aacute;
                                        descobri como o executar,
                                        faltava o "
                                        <pre>chmod +x"


obrigado
</pre>
                                        <br>
                                        <br>
                                        <br>
                                        On 17-08-2011 15:20, Lu&iacute;s
                                        Ferreira wrote: <br>
                                        <blockquote type="CITE"> Ol&aacute;
                                          Pedro,<br>
                                          <br>
                                          Respondendo de "chofre" :) ,
                                          parece-me que com o pgadmin
                                          apenas consegues exportar as
                                          tabelas para SQL plain text,
                                          que poder&aacute;s depois importar.<br>
                                          <br>
                                          Para exportar para shapefile
                                          usa o pgsql2shp ou, ainda mais
                                          facilmente, usa o QGIS.<br>
                                          <br>
                                          Lu&iacute;s Ferreira <br>
                                          <br>
                                          <br>
                                          On Qua, 2011-08-17 at 15:07
                                          +0100, Pedro Costa wrote:
                                          <blockquote type="CITE">
                                            <pre>Pessoal existe maneira de exportar as tabelas do pgadmin de uma 
determinada base de dados para shapefile?

Obrigado
_______________________________________________
Portugal mailing list
<a moz-do-not-send="true" href="mailto:Portugal@lists.osgeo.org" target="_blank">Portugal@lists.osgeo.org</a>
<a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/portugal" target="_blank">http://lists.osgeo.org/mailman/listinfo/portugal</a>
</pre>
                                          </blockquote>
                                          <br>
                                          <br>
                                          <br>
                                          <pre>_______________________________________________
Portugal mailing list
<a moz-do-not-send="true" href="mailto:Portugal@lists.osgeo.org" target="_blank">Portugal@lists.osgeo.org</a>
<a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/portugal" target="_blank">http://lists.osgeo.org/mailman/listinfo/portugal</a>
</pre>
                                        </blockquote>
                                        <br>
                                        <pre>_______________________________________________
Portugal mailing list
<a moz-do-not-send="true" href="mailto:Portugal@lists.osgeo.org" target="_blank">Portugal@lists.osgeo.org</a>
<a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/portugal" target="_blank">http://lists.osgeo.org/mailman/listinfo/portugal</a>
</pre>
                                      </blockquote>
                                      <br>
                                      <br>
                                      <fieldset></fieldset>
                                      <br>
                                      <pre>_______________________________________________
Portugal mailing list
<a moz-do-not-send="true" href="mailto:Portugal@lists.osgeo.org" target="_blank">Portugal@lists.osgeo.org</a>
<a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/portugal" target="_blank">http://lists.osgeo.org/mailman/listinfo/portugal</a>
</pre>
                                    </blockquote>
                                    <br>
                                  </div>
                                </div>
                              </div>
                              <br>
_______________________________________________<br>
                              Portugal mailing list<br>
                              <a moz-do-not-send="true"
                                href="mailto:Portugal@lists.osgeo.org"
                                target="_blank">Portugal@lists.osgeo.org</a><br>
                              <a moz-do-not-send="true"
                                href="http://lists.osgeo.org/mailman/listinfo/portugal"
                                target="_blank">http://lists.osgeo.org/mailman/listinfo/portugal</a><br>
                              <br>
                            </blockquote>
                          </div>
                          <br>
                          <br>
                          <fieldset></fieldset>
                          <br>
                          <pre>_______________________________________________
Portugal mailing list
<a moz-do-not-send="true" href="mailto:Portugal@lists.osgeo.org" target="_blank">Portugal@lists.osgeo.org</a>
<a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/portugal" target="_blank">http://lists.osgeo.org/mailman/listinfo/portugal</a>
</pre>
                        </blockquote>
                        <br>
                      </div>
                    </div>
                  </div>
                  <br>
                  _______________________________________________<br>
                  Portugal mailing list<br>
                  <a moz-do-not-send="true"
                    href="mailto:Portugal@lists.osgeo.org">Portugal@lists.osgeo.org</a><br>
                  <a moz-do-not-send="true"
                    href="http://lists.osgeo.org/mailman/listinfo/portugal"
                    target="_blank">http://lists.osgeo.org/mailman/listinfo/portugal</a><br>
                  <br>
                </blockquote>
              </div>
              <br>
            </div>
          </div>
          <br>
          <fieldset class="mimeAttachmentHeader"></fieldset>
          <br>
          <pre wrap="">_______________________________________________
Portugal mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Portugal@lists.osgeo.org">Portugal@lists.osgeo.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/portugal">http://lists.osgeo.org/mailman/listinfo/portugal</a>
</pre>
        </blockquote>
        <br>
        <pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Portugal mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Portugal@lists.osgeo.org">Portugal@lists.osgeo.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/portugal">http://lists.osgeo.org/mailman/listinfo/portugal</a>
</pre>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>