[postgis-users] data extract

Gregory Williamson Gregory.Williamson at digitalglobe.com
Tue Nov 13 03:48:26 PST 2007


a) Create a table with the select (e.g. create [temp] table my_table as <select ...>;)

and then either:

b) populate geometry columns with the relevant columns and use the pgsql2shp to create a shape file

or

c) copy my_table to '/tmp/my_table.unl' with delimiter '|' null '';

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.

HTH,

Greg Williamson
Senior DBA
GlobeXplorer LLC, a DigitalGlobe company

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.

(My corporate masters made me say this.)

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net on behalf of Andre Schoonbee
Sent: Tue 11/13/2007 4:46 AM
To: 'PostGIS Users Discussion'
Subject: RE: [postgis-users] data extract
 
Thanks!

Now the next question.
I now want to export (dump) the data I have selected. 

Andre

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of George
Pavlov
Sent: Tuesday, November 13, 2007 9:27 AM
To: PostGIS Users Discussion
Subject: RE: [postgis-users] data extract

select *
from your_table
where unique_id in (
  select max(unique_id)
  from your_table
  group by structure_type
);


> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net 
> [mailto:postgis-users-bounces at postgis.refractions.net] On 
> Behalf Of Andre Schoonbee
> Sent: Monday, November 12, 2007 11:20 PM
> To: 'PostGIS Users Discussion'
> Subject: [postgis-users] data extract
> Importance: High
> 
> I have various tables in my POSTGIS database. Each table 
> contains a type field (column) that define the type of 
> structure, such as the type of road eg. I want to extract a 
> few sample data from each table, but should contain at least 
> one of each type so that a developer can test this data 
> against a mapserver mapfile. I do not want to dump the entire 
> database (to big).That should the sql command looks like
> 
>  
> 
> Regards
> 
>  
> 
> Andre
> 
>  
> 
> ________________________________
> 
> From: postgis-users-bounces at postgis.refractions.net 
> [mailto:postgis-users-bounces at postgis.refractions.net] On 
> Behalf Of Zedler, Doug
> Sent: Wednesday, October 03, 2007 5:03 PM
> To: postgis-users at postgis.refractions.net
> Subject: [postgis-users] Installation Error
> 
>  
> 
> I'm trying to install PostgreSQL and PostGIS to play with it 
> and learn about it.  I installed PostgreSQL 8.2.4 just fine.  
> I am able to connect using pgAdmin III and such.  When I run 
> the PostGIS 1.3.1 installation executable, I get the following error:
> 
>  
> 
> createdb: could not connect to database postgres: FATAL:  
> password authentication failed for user "postgres"
> 
>  
> 
> I am able to connect to the postgres database using pgAdmin 
> III under the postgres role using the same password I'm 
> putting into the installation wizard, and I'm not mixing up 
> the password for the database role with the password for the 
> local account on my machine.  Any suggestions are appreciated.
> 
>  
> 
> Thanks,
> 
>  
> 
> Douglas B. Zedler
> 
> IT Programmer/Analyst
> 
> Fort Worth Fire Department
> 
> 817.392.8463
> 
>  
> 
> 
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

_______________________________________________
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/20071113/5e3ead36/attachment.html>


More information about the postgis-users mailing list