[postgis-users] postgis query results to shape
Jorge Arigony
arigony at web.de
Wed Feb 22 06:18:21 PST 2006
Muchas Gracias Réne,
But I still have two problems:
(1) I am using PostgreSQL/PostGIS on WinXP, so
the DOS does not differentiate "-p" from "-P"...
any suggestion?
(2) When I don't use a password to connect to the
database, I receive the following message:
'FATAL: database "username" does not exist' , but
"username" is not the database, it is my username for this computer.
I'm trying:
pgsql2shp -f test.shp database table
Does someone have an advice?
Thank you very much,
Jorge
At 01:41 22.02.2006, you wrote:
>Hi Jorge, you can try this:
>
><?
>$new_shp_filename = "...system_path/new.shp";
>$host = "localhost"; // or your host name or IP Adress
>$port = "5432"; // may be another
>$user = "postgres"; // or your postgres user
>$password = "*******"; // top secret :)
>$database_name = "gisdata"; // the database with
>the geomatries and the tabular data
>$query = "SELECT some_geom_function(the_geom) AS
>the_geom, field1, field2, ..., fieldN FROM
>table_name WHERE ... some condition";
>
>exec("pgsql2shp -f $new_shp_filename -h $host -p
>$port -u $user -P $password $database_name" \" $query \" ")
>
>?>
>
>Best Regards from Chile
>
>René Felipe Viancos
>
>
>2006/2/21, Jorge Arigony <<mailto:arigony at web.de>arigony at web.de>:
>Hi listers,
>
>how can i export automatically each row from a
>query result to a different new shape?
>
>I am using php to query the database from a browser.
>
>Thanks in advance,
>Jorge Arigony
>______________________________________________________________________
>XXL-Speicher, PC-Virenschutz, Spartarife & mehr:
>Nur im <http://WEB.DE>WEB.DE Club!
>Jetzt gratis testen!
><http://freemail.web.de/home/landingpad/?mc=021130>http://freemail.web.de/home/landingpad/?mc=021130
>
>
>_______________________________________________
>postgis-users mailing list
><mailto:postgis-users at postgis.refractions.net>postgis-users at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
>
>--
>René F. Viáncos S.
>Director de Geomática y TIC
>Vicerrectoría de Investigación y Desarrollo
>Universidad de Chile
>Tel (56-2) 632 62 09
>Cel (56 9) 933 72 66
><mailto:rviancos at uchile.cl>rviancos at uchile.cl
><mailto:rviancos at gmail.com>rviancos at gmail.com
><http://www.investigacion.uchile.cl>www.investigacion.uchile.cl
>_______________________________________________
>postgis-users mailing list
>postgis-users at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20060222/dcce836c/attachment.html>
More information about the postgis-users
mailing list