Hi Jorge, you can try this:<br><br><?<br>$new_shp_filename = "...system_path/new.shp";<br>$host = "localhost"; // or your host name or IP Adress<br>$port = "5432"; // may be another<br>$user = "postgres"; // or your postgres user
<br>$password = "*******"; // top secret :)<br>$database_name = "gisdata"; // the database with the geomatries and the tabular data<br>$query = "SELECT some_geom_function(the_geom) AS the_geom, field1, field2, ..., fieldN FROM table_name WHERE ... some condition";
<br><br>exec("pgsql2shp -f $new_shp_filename -h $host -p $port -u $user -P $password $database_name" \" $query \" ")<br><br>?><br><br>Best Regards from Chile<br><br>René Felipe Viancos<br><br><br>
<div><span class="gmail_quote">2006/2/21, Jorge Arigony <<a href="mailto:arigony@web.de">arigony@web.de</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi listers,<br><br>how can i export automatically each row from a query result to a different new shape?<br><br>I am using php to query the database from a browser.<br><br>Thanks in advance,<br>Jorge Arigony<br>______________________________________________________________________
<br>XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im <a href="http://WEB.DE">WEB.DE</a> Club!<br>Jetzt gratis testen! <a href="http://freemail.web.de/home/landingpad/?mc=021130">http://freemail.web.de/home/landingpad/?mc=021130
</a><br><br>_______________________________________________<br>postgis-users mailing list<br><a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">
http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>René F. Viáncos S.<br>Director de Geomática y TIC<br>Vicerrectoría de Investigación y Desarrollo<br>Universidad de Chile
<br>Tel (56-2) 632 62 09<br>Cel (56 9) 933 72 66<br><a href="mailto:rviancos@uchile.cl">rviancos@uchile.cl</a><br><a href="mailto:rviancos@gmail.com">rviancos@gmail.com</a><br><a href="http://www.investigacion.uchile.cl">
www.investigacion.uchile.cl</a>