pgsql2shp

View: New views
7 Messages — Rating Filter:   Alert me  

pgsql2shp

by anhtin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all
I am developing application Web use Mapserver and Database Postgis
I want Export Data Corrdinate in Post Gis to shapfile. But Export with condition
ex: select * from Province where id in '1,2,3,4,67,34,23,22'
or with
ex: Select with Box or with corrdinate spatial (2945845 45958383, 39359459 2342345345, 234823488 4548848, 334834838 85885685) corrdinate is illustrate
How can i do that ???
Show me 3 ways.


Re: pgsql2shp

by Arnaud Lesauvage-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

anhtin a écrit :
> I want Export Data Corrdinate in Post Gis to shapfile. But Export with
> condition

pgsql2shp can take a table (eventually schema-qualified) or a query as a source.
>From the command-line help :

USAGE: pgsql2shp [<options>] <database> [<schema>.]<table>
       pgsql2shp [<options>] <database> <query>



--
Arnaud
_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

Re: pgsql2shp

by anhtin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

thanks
can u send me some ex??
Can i run this command in Postgis sql ???
thanks :)


Arnaud Lesauvage-5 wrote:
anhtin a écrit :
> I want Export Data Corrdinate in Post Gis to shapfile. But Export with
> condition

pgsql2shp can take a table (eventually schema-qualified) or a query as a source.
>From the command-line help :

USAGE: pgsql2shp [<options>] <database> [<schema>.]<table>
       pgsql2shp [<options>] <database> <query>



--
Arnaud
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

RE: pgsql2shp

by Regina Obe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 pgsql2shp -f myshp -h myserver -u apguser -P apgpassword mygisdb
"select * from province WHERE id IN(1,2,3,4,67,34,23,22)"

Note the myshp is the shapefile name without the suffix
So if you wanted to output  province.shp and province.dbf you would just
type in province for myshp

Hope that helps,
Regina


-----Original Message-----
From: postgis-users-bounces@...
[mailto:postgis-users-bounces@...] On Behalf Of
anhtin
Sent: Thursday, April 12, 2007 5:34 AM
To: postgis-users@...
Subject: [postgis-users] pgsql2shp


Hi all
I am developing application Web use Mapserver and Database Postgis
I want Export Data Corrdinate in Post Gis to shapfile. But Export with
condition
ex: select * from Province where id in '1,2,3,4,67,34,23,22'
How can i do that ???


--
View this message in context:
http://www.nabble.com/pgsql2shp-tf3564424.html#a9956047
Sent from the PostGIS - User mailing list archive at Nabble.com.

_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.

_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

RE: pgsql2shp

by anhtin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

thanks very much all support to me

How can i customize the Query
Ex: i have Box (295149 2315499, 465992 2163790)
can I export this box ???



Obe, Regina DND\MIS wrote:
 pgsql2shp -f myshp -h myserver -u apguser -P apgpassword mygisdb
"select * from province WHERE id IN(1,2,3,4,67,34,23,22)"

Note the myshp is the shapefile name without the suffix
So if you wanted to output  province.shp and province.dbf you would just
type in province for myshp

Hope that helps,
Regina


-----Original Message-----
From: postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] On Behalf Of
anhtin
Sent: Thursday, April 12, 2007 5:34 AM
To: postgis-users@postgis.refractions.net
Subject: [postgis-users] pgsql2shp


Hi all
I am developing application Web use Mapserver and Database Postgis
I want Export Data Corrdinate in Post Gis to shapfile. But Export with
condition
ex: select * from Province where id in '1,2,3,4,67,34,23,22'
How can i do that ???


--
View this message in context:
http://www.nabble.com/pgsql2shp-tf3564424.html#a9956047
Sent from the PostGIS - User mailing list archive at Nabble.com.

_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.

_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Re: RE: pgsql2shp

by pcreso :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


--- anhtin <anhtin@...> wrote:

>
> thanks very much all support to me
>
> How can i customize the Query
> Ex: i have Box (295149 2315499, 465992 2163790)
> can I export this box ???
>


I'm not sure what you mean by export, but if you want to use this box in a
query, try something like:

pgsql2shp -f myshp -h myserver -u apguser -P apgpassword mygisdb
 "select * from province WHERE id IN(1,2,3,4,67,34)
  and geom && SetSRID('BOX3D(295149 2315499, 465992 2163790)'::box3d,-1)

See the docs at http://postgis.refractions.net/docs/ch04.html#id2640015

Cheers,

  Brent Wood


>
>
> Obe, Regina     DND\MIS wrote:
> >
> >  pgsql2shp -f myshp -h myserver -u apguser -P apgpassword mygisdb
> > "select * from province WHERE id IN(1,2,3,4,67,34,23,22)"
> >
> > Note the myshp is the shapefile name without the suffix
> > So if you wanted to output  province.shp and province.dbf you would just
> > type in province for myshp
> >
> > Hope that helps,
> > Regina
> >
> >
> > -----Original Message-----
> > From: postgis-users-bounces@...
> > [mailto:postgis-users-bounces@...] On Behalf Of
> > anhtin
> > Sent: Thursday, April 12, 2007 5:34 AM
> > To: postgis-users@...
> > Subject: [postgis-users] pgsql2shp
> >
> >
> > Hi all
> > I am developing application Web use Mapserver and Database Postgis
> > I want Export Data Corrdinate in Post Gis to shapfile. But Export with
> > condition
> > ex: select * from Province where id in '1,2,3,4,67,34,23,22'
> > How can i do that ???
> >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/pgsql2shp-tf3564424.html#a9956047
> > Sent from the PostGIS - User mailing list archive at Nabble.com.
> >
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users@...
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
> > -----------------------------------------
> > The substance of this message, including any attachments, may be
> > confidential, legally privileged and/or exempt from disclosure
> > pursuant to Massachusetts law. It is intended
> > solely for the addressee. If you received this in error, please
> > contact the sender and delete the material from any computer.
> >
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users@...
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/pgsql2shp-tf3564424.html#a9971889
> Sent from the PostGIS - User mailing list archive at Nabble.com.
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@...
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>

_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

Re: RE: pgsql2shp

by saytinh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

you use Command Prompt to convert shp from postgres. I want convert postgress -> shp in ASP.net. Can you help me?