[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    [postgis-users] Re: postgis-users Digest, Vol 32, Issue 52
From:       orkun <temiz () deprem ! gov ! tr>
Date:       2005-06-30 6:22:18
Message-ID: 42C38F9A.3000409 () deprem ! gov ! tr
[Download RAW message or body]

postgis-users-request@postgis.refractions.net wrote:

> Send postgis-users mailing list submissions to
> 	postgis-users@postgis.refractions.net
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://postgis.refractions.net/mailman/listinfo/postgis-users
> or, via email, send a message with subject or body 'help' to
> 	postgis-users-request@postgis.refractions.net
> 
> You can reach the person managing the list at
> 	postgis-users-owner@postgis.refractions.net
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of postgis-users digest..."
> 
> 
> Today's Topics:
> 
> 1. Re: PostGIS/Mapserver Mapfile Question (Stephen Woodbridge)
> 2. I need geo-database ? (orkun)
> 3. AW: [postgis-users] I need geo-database ? (Uwe Seher)
> 4. sql command to see layers ( J?rgen Mischker )
> 5. Re: sql command to see layers (Stephen Woodbridge)
> 6. JDBC and PostGIS (Gustavo Henrique Sberze Ribas)
> 7. Re: sql command to see layers ( J?rgen Mischker )
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Tue, 28 Jun 2005 19:39:46 -0400
> From: Stephen Woodbridge <woodbri@swoodbridge.com>
> Subject: Re: [postgis-users] PostGIS/Mapserver Mapfile Question
> To: PostGIS Users Discussion <postgis-users@postgis.refractions.net>
> Message-ID: <42C1DFC2.1020703@swoodbridge.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> Don,
> 
> Well I did not migrate the whole shebang. I started playing with postGIS 
> v0.9 on a freeBSD server, then I loaded the v1.0 on the Windows XP 
> laptop and I moved some selected tables using backup/restore (the 
> postgis_restore.pl) so this is probably the root of my problem.
> 
> In general, it seems like there should be a procedure the allows me to 
> copy a table from one server to another even if it has geometry columns 
> in it. I guess I need to look at the postgis_restore.pl and backup 
> scripts and see what they are doing.
> 
> There also seems to be a freeze on the freeBSD ports as non of the newer 
> software releases have made it into the ports directory, so I am face 
> with another problem of how to back port the database I now have built 
> and working in postGIS v1.0 on XP back to the freeBSD postGIS v0.9. This 
> will be easier in that I would drop the outdated database there and want 
> to migrate the whole thing I have built on XP back to the freeBSD server.
> 
> -Steve
> 
> Don Drake wrote:
> 
> 
> > I just completed an upgrade of Postgres7.4/PostGIS0.9 -->
> > Postgres8.0.3/PostGIS1.0.1 this week using a backup and the
> > postgis_restore.pl script with no real problems.
> > 
> > The geometry_columns table (and spatial_ref..) tables were backed up and
> > restored just fine for me. 
> > 
> > Did you backup/restore a single schema maybe?
> > 
> > -Don
> > 
> > -----Original Message-----
> > From: postgis-users-bounces@postgis.refractions.net
> > [mailto:postgis-users-bounces@postgis.refractions.net] On Behalf Of Stephen
> > Woodbridge
> > Sent: Tuesday, June 28, 2005 1:03 PM
> > To: PostGIS Users Discussion
> > Subject: Re: [postgis-users] PostGIS/Mapserver Mapfile Question
> > 
> > Mark,
> > 
> > Awesome, that worked great.
> > 
> > So, what is the "correct" procedure if you want to move a table with 
> > geometry from database to another. Obviously, backup/restore does not do 
> > the "whole" thing.
> > 
> > -Steve
> > 
> > Mark Cave-Ayland wrote:
> > 
> > 
> > 
> > > > -----Original Message-----
> > > > From: postgis-users-bounces@postgis.refractions.net 
> > > > [mailto:postgis-users-bounces@postgis.refractions.net] On 
> > > > Behalf Of Stephen Woodbridge
> > > > Sent: 28 June 2005 18:22
> > > > To: PostGIS Users Discussion
> > > > Subject: Re: [postgis-users] PostGIS/Mapserver Mapfile Question
> > > > 
> > > > 
> > > > OK, it looks like there are no entries in the geometry_columns table. 
> > > > The zcta table is the only one that currently has a geometry column. 
> > > > When I did the backup/restore, I did not save the 
> > > > geometry_columns table 
> > > > it there and easy way to regenerate this?
> > > > 
> > > > -Steve
> > > > 
> > > > 
> > > 
> > > Hi Steve,
> > > 
> > > Sorry if it wasn't clear; the SQL given before should do that job for you.
> > > The corrected version is:
> > > 
> > > BEGIN;
> > > CREATE TABLE old_geometry_columns WITH OIDS AS SELECT * FROM
> > > geometry_columns;
> > > DELETE FROM geometry_columns;
> > > SELECT probe_geometry_columns();
> > > COMMIT;
> > > 
> > > 
> > > You can probably delete the old_geometry_columns table once you're done,
> > > especially as in your case it was empty to begin with :)
> > > 
> > > 
> > > Kind regards,
> > > 
> > > Mark.
> > > 
> > > ------------------------
> > > WebBased Ltd
> > > 17 Research Way
> > > Tamar Science Park
> > > Plymouth
> > > PL6 8BT 
> > > 
> > > T: +44 (0)1752 797131
> > > F: +44 (0)1752 791023
> > > W: http://www.webbased.co.uk
> > > 
> > > 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Wed, 29 Jun 2005 10:39:03 +0300
> From: orkun <temiz@deprem.gov.tr>
> Subject: [postgis-users] I need geo-database ?
> To: postgis-users@postgis.refractions.net
> Message-ID: <42C25017.1090300@deprem.gov.tr>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> hello
> 
> I am new to postgis and geo-database.
> 
> I want to know what db table containing geographic columns is more 
> beneficial
> than conventional db table.
> 
> For example as far as I know,
> In ESRI's shape file has a shape column. But it is closed to see the 
> geometric shape with coordinates.  And one can not query on real 
> coordinates on  table.
> 
> Can you tell me more about the comparision of geo-table with 
> conventiaonal table ?
> so I could say that I need geo-database  and  conventianal  table (and  
> ESRI' shape file)
> are not enough to carry out certain works.
> 
> What does geo-table provide more than conventional-table does ?
> 
> kind regards
> 
> regards
> 
> Ahmet Temiz
> 
> ______________________________________
> XamimeLT - installed on mailserver for domain @deprem.gov.tr
> Queries to: postmaster@deprem.gov.tr
> ______________________________________
> The views and opinions expressed in this e-mail message are the sender's own
> and do not necessarily represent the views and the opinions of Earthquake Research \
> Dept. of General Directorate of Disaster Affairs.
> 
> Bu e-postadaki fikir ve gorusler gonderenin sahsina ait olup, yasal olarak T.C.
> B.I.B. Afet Isleri Gn.Mud. Deprem Arastirma Dairesi'ni baglayici nitelikte \
> degildir. 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Wed, 29 Jun 2005 10:47:08 +0200
> From: "Uwe Seher" <uwe.seher@arteng.de>
> Subject: AW: [postgis-users] I need geo-database ?
> To: "PostGIS Users Discussion" <postgis-users@postgis.refractions.net>
> Message-ID: <LHEAIANPDGBGBPEBEBMGCENKCAAA.uwe.seher@arteng.de>
> Content-Type: text/plain;	charset="iso-8859-1"
> 
> Hello!
> 
> 
> 
> > I am new to postgis and geo-database.
> > 
> > 
> 
> Welcome in a fascinating new world ;)
> 
> 
> 
> > In ESRI's shape file has a shape column. But it is closed to see the
> > geometric shape with coordinates.  And one can not query on real
> > coordinates on  table.
> > 
> > 
> 
> In the Shape-column are the coordinates of the geometry in a binary format.
> I think it is something (or it is) like WKB-format from PostGIS. You can
> access the coordinates and objects in the shape-column by programming in
> Arcobjects.
> 
> 
> 
> > Can you tell me more about the comparision of geo-table with
> > conventiaonal table ?
> > 
> > 
> 
> The difference is only the geometry-column where the geometry is stored.
> With this Field you can make some geoprocessing functions directly in the
> database and you dont have to bother ArcGIS ;).
> 
> 
> 
> > so I could say that I need geo-database  and  conventianal  table (and
> > ESRI' shape file)
> > are not enough to carry out certain works.
> > 
> > 
> 
> No, in theory you need only a geodatabase table (or a view) with a
> geometry-field. You can handle it as a common db-table.
> In the real world you get some problems, because ArcGIS doesnt process the
> PostGIS-Formt. But ther is the pgArc-extension on sourcforge and myself is
> working on something comparable.
> 
> 
> 
> > What does geo-table provide more than conventional-table does ?
> > 
> > 
> 
> the geometry-field. And PostGIS some additional Functionality. Geo-tables in
> MySQL for example can only handle the geometry without functionality.
> 
> 
> 
> > kind regards
> > 
> > regards
> > 
> > Ahmet Temiz
> > 
> > 
> 
> Greetings
> 
> Uwe Seher
> 
> 
> 
> 
> > -----Ursprüngliche Nachricht-----
> > Von: postgis-users-bounces@postgis.refractions.net
> > [mailto:postgis-users-bounces@postgis.refractions.net]Im Auftrag von
> > orkun
> > Gesendet: Mittwoch, 29. Juni 2005 09:39
> > An: postgis-users@postgis.refractions.net
> > Betreff: [postgis-users] I need geo-database ?
> > 
> > 
> > hello
> > 
> > I am new to postgis and geo-database.
> > 
> > I want to know what db table containing geographic columns is more
> > beneficial
> > than conventional db table.
> > 
> > For example as far as I know,
> > 
> > Can you tell me more about the comparision of geo-table with
> > conventiaonal table ?
> > 
> > 
> > ______________________________________
> > XamimeLT - installed on mailserver for domain @deprem.gov.tr
> > Queries to: postmaster@deprem.gov.tr
> > ______________________________________
> > The views and opinions expressed in this e-mail message are the
> > sender's own
> > and do not necessarily represent the views and the opinions of
> > Earthquake Research Dept.
> > of General Directorate of Disaster Affairs.
> > 
> > Bu e-postadaki fikir ve gorusler gonderenin sahsina ait olup,
> > yasal olarak T.C.
> > B.I.B. Afet Isleri Gn.Mud. Deprem Arastirma Dairesi'ni baglayici
> > nitelikte degildir.
> > 
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users@postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> > 
> > 
> 
> ____________
> Virus checked by G DATA AntiVirusKit
> 
> 
> 
> ------------------------------
> 
> Message: 4
> Date: Wed, 29 Jun 2005 16:37:19 +0200
> From: " J?rgen Mischker " <juergen.mischker@boku.ac.at>
> Subject: [postgis-users] sql command to see layers
> To: <postgis-users@postgis.refractions.net>
> Message-ID: <s2c2ce47.062@gwdata.boku.ac.at>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> I am looking for a sql command that shows only the (geog.) layers in a postgis \
> database. 
> also: a php class doing the same thing would be a big help. I found a postgis php \
> class @ http://phpclasses.byting.at/browse/package/2039.html, but this particular \
> function is missing. 
> Cheers for help
> juergen
> 
> DI Jürgen Mischker
> Insitut f. Vermessung, Fernerkundung und Landinformation,
> Universität für Bodenkultur, BOKU, Wien
> Institute of Surveying, Remote Sensing and Land Information.
> University of Natural Resources and Applied Life Science, Vienna.
> Tel.: +43 1 47654-5132
> Fax.: +43 1 47654-5142
> email: jmischker@boku.ac.at
> 
> 
> 
> ------------------------------
> 
> Message: 5
> Date: Wed, 29 Jun 2005 10:43:34 -0400
> From: Stephen Woodbridge <woodbri@swoodbridge.com>
> Subject: Re: [postgis-users] sql command to see layers
> To: PostGIS Users Discussion <postgis-users@postgis.refractions.net>
> Message-ID: <42C2B396.7020104@swoodbridge.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> You might try   "select * from geometry_columns;"
> 
> -Steve W
> 
> Jürgen Mischker wrote:
> 
> 
> > I am looking for a sql command that shows only the (geog.) layers in a postgis \
> > database. 
> > also: a php class doing the same thing would be a big help. I found a postgis php \
> > class @ http://phpclasses.byting.at/browse/package/2039.html, but this particular \
> > function is missing. 
> > Cheers for help
> > juergen
> > 
> > DI Jürgen Mischker
> > Insitut f. Vermessung, Fernerkundung und Landinformation,
> > Universität für Bodenkultur, BOKU, Wien
> > Institute of Surveying, Remote Sensing and Land Information.
> > University of Natural Resources and Applied Life Science, Vienna.
> > Tel.: +43 1 47654-5132
> > Fax.: +43 1 47654-5142
> > email: jmischker@boku.ac.at
> > 
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users@postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> > 
> > 
> > 
> 
> 
> 
> ------------------------------
> 
> Message: 6
> Date: Wed, 29 Jun 2005 11:59:21 -0300
> From: "Gustavo Henrique Sberze Ribas" <gribas@cpqd.com.br>
> Subject: [postgis-users] JDBC and PostGIS
> To: "PostGIS Users Discussion" <postgis-users@postgis.refractions.net>
> Message-ID:
> 	<E6F2049DCBE10840B22DC64587E6F3EC08EB9B@MAILSRV1.aquarius.cpqd.com.br>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hi,
> 
> I'm having some issues while trying to use PreparedStatements
> to query a PostGIS database... I can't make it work :(
> 
> I've added the geometric type entries as usual:
> 
> ((org.postgresql.PGConnection)conn).addDataType("geometry",org.postgis.PGgeometry.class);
>  ((org.postgresql.PGConnection)conn).addDataType("box3d",org.postgis.PGbox3d.class);
>  
> And tried this simple insert query:
> 
> Point p = new Point(-47.12, -22.374);
> p.setSrid(4326); 
> 
> PreparedStatement ps = conn.prepareStatement("INSERT INTO jdbc_test(geom,id) \
>                 VALUES(?,?)");
> --> ps.setObject(1, p); // replaces first  "?" so geom = Point(-47.12, -22.374)
> ps.setInt(2, 1);    // replaces second "?" so id   = 1
> ps.executeUpdate();
> 
> It crashes giving a PSQLException saying it couldn't find the appropriate type.
> So I tried the following, with no sucess either:
> 
> ps.setObject(1, p, java.sql.Types.OTHER);         // can't convert Point to \
> Types.OTHER ps.setObject(1, p, conn.getSQLType("geometry"));  // can't convert \
> Point to Types.OTHER ps.setObject(1, p, conn.getPGType("geometry"));   // \
> Unsuported value: 72.190 ps.setObject(1, p, Geometry.POINT); // ERROR: column \
> "geom" is of type geometry but  // expression is of type character
> ps.setObject(1, p, p.type);         // ERROR: column "geom" is of type geometry but \
>  // expression is of type character
> ps.setString(1, p.toString());      // ERROR: column "geom" is of type geometry but \
>  ^^^^^^                        // expression is of type character
> 
> 
> Any thoughts ? I've attached a java program based on 
> TestServer.java that implements this small test.
> 
> 
> System Info:
> 
> PostgreSQL 8.0.3 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 \
> (mingw-special) POSTGIS="1.0.1" GEOS="2.1.1" PROJ="Rel. 4.4.9, 29 Oct 2004" \
>                 USE_STATS DBPROC="0.3.0" RELPROC="0.3.0"
> PGDrivers:  postgresql-8.0-311.jdbc3.jar (last stable release) 
> postgis_1_0_0.jar (came with windows installer)
> java version "1.5.0_03"
> 			  
> 
> Thanks,
> Gustavo
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: Test.java
> Type: application/octet-stream
> Size: 3680 bytes
> Desc: Test.java
> Url : http://lists.refractions.net/pipermail/postgis-users/attachments/20050629/003e6715/Test-0001.obj
>  
> ------------------------------
> 
> Message: 7
> Date: Wed, 29 Jun 2005 17:17:29 +0200
> From: " J?rgen Mischker " <juergen.mischker@boku.ac.at>
> Subject: Re: [postgis-users] sql command to see layers
> To: <postgis-users@postgis.refractions.net>
> Message-ID: <s2c2d7b6.035@gwdata.boku.ac.at>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> thanks steve, nice and too easy...
> 
> i use the postgis_class_inc.php and came up with the following php code the get my \
> feature list: 
> include("postgis_class_inc.php");
> $pg = new postgis();
> $pg->connect("novisad");
> $pg->exec("select array(select f_table_name from geometry_columns)");
> $rs = $pg->farray();
> print_r($rs);
> 
> but the output in my browser is correct but pretty ugly:
> 
> Array ( [0] => {judenburg,tracks,rivers,trattenbachdem} [?column?] => \
> {judenburg,tracks,rivers,trattenbachdem} ) 
> any hints?
> juergen
> 
> DI Jürgen Mischker
> Insitut f. Vermessung, Fernerkundung und Landinformation,
> Universität für Bodenkultur, BOKU, Wien
> Institute of Surveying, Remote Sensing and Land Information.
> University of Natural Resources and Applied Life Science, Vienna.
> Tel.: +43 1 47654-5132
> Fax.: +43 1 47654-5142
> email: jmischker@boku.ac.at
> 
> 
> 
> ------------------------------
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
> 
> End of postgis-users Digest, Vol 32, Issue 52
> *********************************************
> 
> 
> 
> 
I have one more question.

Supposing, I had a polygon field in postgis table and wanted to
connect it to my favorite gis program (GRASS).
Will I able to see these polygons on grass's (view) monitor ?
or in reverse direction
is it possible to transfer polygons from grass to postgis
to hold polygons in a polygon field.

(Thank you Uwe,   Your explanations were really comprehensive.)

regards


Ahmet Temiz


______________________________________
XamimeLT - installed on mailserver for domain @deprem.gov.tr
Queries to: postmaster@deprem.gov.tr
______________________________________
The views and opinions expressed in this e-mail message are the sender's own
and do not necessarily represent the views and the opinions of Earthquake Research \
Dept. of General Directorate of Disaster Affairs.

Bu e-postadaki fikir ve gorusler gonderenin sahsina ait olup, yasal olarak T.C.
B.I.B. Afet Isleri Gn.Mud. Deprem Arastirma Dairesi'ni baglayici nitelikte degildir.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic