<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>RE: [postgis-users] data extract</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16481" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=221575614-13112007><FONT face=Arial 
color=#0000ff size=2>You can actually go straight from sql statement to shape 
file</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=221575614-13112007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=221575614-13112007><FONT face=Arial 
color=#0000ff size=2>as shown at the bottom of this 
cheatsheet</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=221575614-13112007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=221575614-13112007><FONT face=Arial 
color=#0000ff size=2><A 
href="http://www.bostongis.com/postgis_quickguide.bqg">http://www.bostongis.com/postgis_quickguide.bqg</A></FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=221575614-13112007><FONT face=Arial color=#0000ff size=2>Hope 
that helps,</FONT></SPAN></DIV>
<DIV><SPAN class=221575614-13112007><FONT face=Arial color=#0000ff 
size=2>Regina</FONT></SPAN></DIV>
<DIV><BR></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> 
postgis-users-bounces@postgis.refractions.net 
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of 
</B>Gregory Williamson<BR><B>Sent:</B> Tuesday, November 13, 2007 6:48 
AM<BR><B>To:</B> PostGIS Users Discussion; PostGIS Users 
Discussion<BR><B>Subject:</B> RE: [postgis-users] data 
extract<BR></FONT><BR></DIV>
<DIV></DIV><!-- Converted from text/plain format -->
<P><FONT size=2>a) Create a table with the select (e.g. create [temp] table 
my_table as <select ...>;)<BR><BR>and then either:<BR><BR>b) populate 
geometry columns with the relevant columns and use the pgsql2shp to create a 
shape file<BR><BR>or<BR><BR>c) copy my_table to '/tmp/my_table.unl' with 
delimiter '|' null '';<BR><BR>depending on what you need the data for .... the 
first option gets you the ability to go to ESRI, MMS, etc. The 2nd is more for 
moving to another postGIS system.<BR><BR>HTH,<BR><BR>Greg Williamson<BR>Senior 
DBA<BR>GlobeXplorer LLC, a DigitalGlobe company<BR><BR>Confidentiality Notice: 
This e-mail message, including any attachments, is for the sole use of the 
intended recipient(s) and may contain confidential and privileged information 
and must be protected in accordance with those provisions. Any unauthorized 
review, use, disclosure or distribution is prohibited. If you are not the 
intended recipient, please contact the sender by reply e-mail and destroy all 
copies of the original message.<BR><BR>(My corporate masters made me say 
this.)<BR><BR>-----Original Message-----<BR>From: 
postgis-users-bounces@postgis.refractions.net on behalf of Andre 
Schoonbee<BR>Sent: Tue 11/13/2007 4:46 AM<BR>To: 'PostGIS Users 
Discussion'<BR>Subject: RE: [postgis-users] data 
extract<BR><BR>Thanks!<BR><BR>Now the next question.<BR>I now want to export 
(dump) the data I have selected.<BR><BR>Andre<BR><BR>-----Original 
Message-----<BR>From: postgis-users-bounces@postgis.refractions.net<BR>[<A 
href="mailto:postgis-users-bounces@postgis.refractions.net">mailto:postgis-users-bounces@postgis.refractions.net</A>] 
On Behalf Of George<BR>Pavlov<BR>Sent: Tuesday, November 13, 2007 9:27 AM<BR>To: 
PostGIS Users Discussion<BR>Subject: RE: [postgis-users] data 
extract<BR><BR>select *<BR>from your_table<BR>where unique_id in (<BR>  
select max(unique_id)<BR>  from your_table<BR>  group by 
structure_type<BR>);<BR><BR><BR>> -----Original Message-----<BR>> From: 
postgis-users-bounces@postgis.refractions.net<BR>> [<A 
href="mailto:postgis-users-bounces@postgis.refractions.net">mailto:postgis-users-bounces@postgis.refractions.net</A>] 
On<BR>> Behalf Of Andre Schoonbee<BR>> Sent: Monday, November 12, 2007 
11:20 PM<BR>> To: 'PostGIS Users Discussion'<BR>> Subject: [postgis-users] 
data extract<BR>> Importance: High<BR>><BR>> I have various tables in 
my POSTGIS database. Each table<BR>> contains a type field (column) that 
define the type of<BR>> structure, such as the type of road eg. I want to 
extract a<BR>> few sample data from each table, but should contain at 
least<BR>> one of each type so that a developer can test this data<BR>> 
against a mapserver mapfile. I do not want to dump the entire<BR>> database 
(to big).That should the sql command looks 
like<BR>><BR>> <BR>><BR>> 
Regards<BR>><BR>> <BR>><BR>> 
Andre<BR>><BR>> <BR>><BR>> 
________________________________<BR>><BR>> From: 
postgis-users-bounces@postgis.refractions.net<BR>> [<A 
href="mailto:postgis-users-bounces@postgis.refractions.net">mailto:postgis-users-bounces@postgis.refractions.net</A>] 
On<BR>> Behalf Of Zedler, Doug<BR>> Sent: Wednesday, October 03, 2007 5:03 
PM<BR>> To: postgis-users@postgis.refractions.net<BR>> Subject: 
[postgis-users] Installation Error<BR>><BR>> <BR>><BR>> I'm 
trying to install PostgreSQL and PostGIS to play with it<BR>> and learn about 
it.  I installed PostgreSQL 8.2.4 just fine. <BR>> I am able to 
connect using pgAdmin III and such.  When I run<BR>> the PostGIS 1.3.1 
installation executable, I get the following 
error:<BR>><BR>> <BR>><BR>> createdb: could not connect to 
database postgres: FATAL: <BR>> password authentication failed for user 
"postgres"<BR>><BR>> <BR>><BR>> I am able to connect to the 
postgres database using pgAdmin<BR>> III under the postgres role using the 
same password I'm<BR>> putting into the installation wizard, and I'm not 
mixing up<BR>> the password for the database role with the password for 
the<BR>> local account on my machine.  Any suggestions are 
appreciated.<BR>><BR>> <BR>><BR>> 
Thanks,<BR>><BR>> <BR>><BR>> Douglas B. Zedler<BR>><BR>> 
IT Programmer/Analyst<BR>><BR>> Fort Worth Fire Department<BR>><BR>> 
817.392.8463<BR>><BR>> <BR>><BR>><BR>_______________________________________________<BR>postgis-users 
mailing list<BR>postgis-users@postgis.refractions.net<BR><A 
href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR><BR>_______________________________________________<BR>postgis-users 
mailing list<BR>postgis-users@postgis.refractions.net<BR><A 
href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR><BR></FONT></P></BODY></HTML>

<HTML><BODY><P><hr size=1></P>
<P><STRONG>
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.
</STRONG></P></BODY></HTML>