<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Obrigado.<br>
    <br>
    Quando importo as shapes para a BD aparece isto " INSERT command for
    new feature failed.<br>
    ERROR:&nbsp; new row for relation "eixos_rua" violates check constraint
    "enforce_geotype_wkb_geometry"<br>
    <br>
    Imagino que o erro esteja relacionado com isto...Algu&eacute;m tem ideia de
    como resolver?<br>
    <br>
    Obrigado<br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    On 18-08-2011 11:25, Eloi Ribeiro wrote:
    <blockquote
cite="mid:CANPxM8gBji=0BbVntmup8Erh38pF-e4T2sLc6U2UvkFGSCCwDg@mail.gmail.com"
      type="cite">OK. O&nbsp;&uacute;nico&nbsp;que me ocorre &eacute; na terminal ir a ao menu
      Editar -&gt;&nbsp;Prefer&ecirc;ncia&nbsp;do perfil -&gt; na quinta aba, em "Mover
      para traz" aumenta o numero de filas e quando termine o
      script&nbsp;selecionas&nbsp;e copias tudo para um ficheiro de texto. Imagino
      que haja algo mais sofisticado que isto.
      <div>
        <br>
      </div>
      <div><br clear="all">
        Eloi Ribeiro<br>
        GIS Analyst<br>
        39,45&ordm; -0,40&ordm;<br>
        <a moz-do-not-send="true"
          href="http://eloiribeiro.wordpress.com" target="_blank">http://eloiribeiro.wordpress.com</a><br>
        <br>
        <br>
        <div class="gmail_quote">2011/8/18 Pedro Costa <span dir="ltr">&lt;<a
              moz-do-not-send="true"
              href="mailto:pedrocostaarma@sapo.pt">pedrocostaarma@sapo.pt</a>&gt;</span><br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex;">
            <div bgcolor="#FFFFFF" text="#000000"> N&atilde;o, &eacute; o seguinte, eu
              ao importar a shape para o pgadmin perco sempre algumas
              features, e n&atilde;o sei porque, e para saber o que &eacute;, queria
              que o texto que aparece na consola quando executo o
              comando ficasse num arquivo de texto para analisar e
              identificar a falha, entendeu?<br>
              <br>
              obrigado
              <div class="im"><br>
                <br>
                <br>
                <br>
                <br>
                On 18-08-2011 11:01, Eloi Ribeiro wrote: </div>
              <div>
                <div class="h5">
                  <blockquote type="cite">Com&nbsp;shp2pgsql cria um ficheiro
                    de texto plano com as ordens em SQL. &Eacute; isso?
                    <div>
                      <div>
                        <div style="text-align:left"><font
                            color="#0000ff" face="Consolas, 'Bitstream
                            Vera Sans Mono', 'Courier New', Courier,
                            monospace"><span
                              style="font-size:11px;line-height:14px"><br>
                            </span></font></div>
                        Eloi Ribeiro<br>
                        GIS Analyst<br>
                        39,45&ordm; -0,40&ordm;<br>
                        <a moz-do-not-send="true"
                          href="http://eloiribeiro.wordpress.com"
                          target="_blank">http://eloiribeiro.wordpress.com</a><br>
                        <br>
                        <br>
                        <div class="gmail_quote">2011/8/18 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><br>
                          <blockquote class="gmail_quote"
                            style="margin:0 0 0 .8ex;border-left:1px
                            #ccc solid;padding-left:1ex">
                            <div bgcolor="#FFFFFF" text="#000000"> J&aacute;
                              resolvi o problema, retirei o "#" antes e
                              j&aacute; executa, no entanto, com alguns shapes
                              a querie n&atilde;o funciona &eacute; estranho. ALgu&eacute;m
                              sabe tamb&eacute;m como fa&ccedil;o para que o texto
                              resultante do seguinte comando seja
                              exportado para um ficheiro de texto?<br>
                              <br>
                              &nbsp;ogr2ogr -overwrite -skipfailures -s_srs
                              EPSG:27492 -t_srs EPSG:27492 -f
                              "PostgreSQL" PG:"host=localhost
                              user=geobox dbname=osm password=geobox"
                              Passeios.shp<br>
                              <br>
                              <br>
                              tentei colocar &gt;teste.txt no fim mas o
                              ficheiro resultante aparece em branco.
                              <div>
                                <div><br>
                                  <br>
                                  Obrigado<br>
                                  <br>
                                  <br>
                                  <br>
                                  <br>
                                  On 17-08-2011 23:06, Jo&atilde;o Carvalho
                                  wrote:
                                  <blockquote 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"
                                              target="_blank">pedrocostaarma@sapo.pt</a>&gt;</span>
                                          escreveu:<br>
                                          <blockquote
                                            class="gmail_quote"
                                            style="margin:0 0 0
                                            .8ex;border-left:1px #ccc
                                            solid;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><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><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>
                                                  <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:0
                                                        0 0
                                                        .8ex;border-left:1px
                                                        #ccc
                                                        solid;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"
                                              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>
                                      </div>
                                    </div>
                                    <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>
                      </div>
                    </div>
                    <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>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Portugal mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Portugal@lists.osgeo.org">Portugal@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/portugal">http://lists.osgeo.org/mailman/listinfo/portugal</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>