[postgis-users] pgsql2shp/shp2pgsql and php

David TECHER davidtecher at yahoo.fr
Thu Apr 1 03:37:43 PST 2004


you should use from php

shell_exec("shp2pgsql ...");

or 

shell_exec(pgsql2shp ..."),

or writing a shell (foo.sh) from php-script with in
foo.sh:

shp2pgsql ....
pgsql2shp ...

and do shell_exec(foo.sh)

I think this method could be improved :)
 --- Stefan Donath <DonathStefan at gmx.de> a écrit : >
thanks for that information. i'll figure out myself
> how to handle that. but
> how do i run pgsql2shp and shp2pgsql from a
> php-script?
> 
> stefan
> 
> 
> 
> 
> 
> 
> 
> be careful with pgsql2shp
> 
> it will give you one column called gid in your shp
> while shp2pgsql adds a column called gid
> 
> so you can have two columns with the same name
> 
> creates 
> 
> 
>  --- Stefan Donath <DonathStefan at gmx.de> a écrit
> : >
> hi list,
> > 
> > in order to keep my spatial data up to date i need
> > to copy them from postgis
> > to windows client. i want to use php to:
> > 
> >    1. execute pgsql2shp for selected geometries
> >    2. send the results to the client
> >    3. save the shapes on the client
> > 
> > and later:
> > 
> >    4. send the (however updated) shapes back to
> > postgis-server
> >    5. execute shp2pgsql
> > 
> > are there any ideas around how to do it? or maybe
> > php-scripts?
> > thanks, stefan.
> > 
> > -- 
> > +++ NEU bei GMX und erstmalig in Deutschland:
> > TÜV-geprüfter Virenschutz +++
> > 100% Virenerkennung nach Wildlist. Infos:
> > http://www.gmx.net/virenschutz
> > 
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> >
>
http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
> 
> 
> -- 
> +++ NEU bei GMX und erstmalig in Deutschland:
> TÜV-geprüfter Virenschutz +++
> 100% Virenerkennung nach Wildlist. Infos:
> http://www.gmx.net/virenschutz
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
>
http://postgis.refractions.net/mailman/listinfo/postgis-users 


	

	
		
Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout ! 
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com



More information about the postgis-users mailing list