[postgis-users] postgis-users Digest, Vol 122, Issue 30

Brian Sanjeewa Rupasinghe jinkabs at gmail.com
Mon Apr 30 13:04:18 PDT 2012


How to build PostGIS 2.0 jar file from SVN. Any instructions?
On Mon, Apr 30, 2012 at 8:00 PM, <
postgis-users-request at postgis.refractions.net> wrote:

> Send postgis-users mailing list submissions to
>        postgis-users at 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 at postgis.refractions.net
>
> You can reach the person managing the list at
>        postgis-users-owner at 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: options to scaleout POSTGIS DATABASE (Robert Coup)
>   2. Re: Topology GetRingEdges (Sandro Santilli)
>   3. Changing band pixel type (George Washington)
>   4. Re: Changing band pixel type (Pierre Racine)
>   5. PostGIS 2.0 connection to Java (Brian Sanjeewa Rupasinghe)
>   6. Re: PostGIS 2.0 connection to Java (Skye Book)
>   7. Re: Topology GetRingEdges (Bob Pawley)
>   8. Nearest Neighbor problem using GIST Index (<->    function)
>      (Alexandre Neto)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 30 Apr 2012 11:40:03 +1200
> From: Robert Coup <robert.coup at onetrackmind.co.nz>
> Subject: Re: [postgis-users] options to scaleout POSTGIS DATABASE
> To: Greg Williamson <gwilliamson39 at yahoo.com>,  PostGIS Users
>        Discussion <postgis-users at postgis.refractions.net>
> Message-ID:
>        <CAFLLRp+KuB3zf-VPfZUg4KnMaszy9vP12hJvL34dQ+vqpjgJWg at mail.gmail.com
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> On Mon, Apr 30, 2012 at 5:00 AM, Greg Williamson <gwilliamson39 at yahoo.com
> >wrote:
>
> >
> > There is no automatic switchover as far as I know in the streaming
> > replication -- you have to have identify that there is a failure and
> > intervene; the switch of a server from standby mode to active is quite
> fast
> > in and of itself. Making outside systems award of the new server is
> > trickier -- perhaps having a VIP which is the connection point to the
> > outside world, then swap what the VIP points to when you failover to the
> > backup server.
> >
>
> A shared-IP & Pacemaker/etc is one option.
>
> PgBouncer provides a connection pool across a set of replicas and deals
> with simple health checks - it's straightforward to setup
>
> Rob :)
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://postgis.refractions.net/pipermail/postgis-users/attachments/20120430/634dbeb7/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Mon, 30 Apr 2012 11:51:12 +0200
> From: Sandro Santilli <strk at keybit.net>
> Subject: Re: [postgis-users] Topology GetRingEdges
> To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
> Message-ID: <20120430095112.GB4927 at gnash>
> Content-Type: text/plain; charset=us-ascii
>
> On Fri, Apr 27, 2012 at 01:11:27PM -0700, Bob Pawley wrote:
> > Hi
> >
> > I have established the schema and tables as outlined in the
> documentation example 11.8 TopoGeometry Constructors.
> >
> > However, I am still missing something.
> >
> > When I run GetRingEdges -
> >
> >     select  topology.GetRingEdges('TEST', 1), entities.wkb_geometry
> >     from entities, num_search
> >     where st_intersects(entities.wkb_geometry, num_search.the_geom2);
> >
> > The return are only the geometries which are actually intersected by
> st_intersects.(In this particular case only four of the eight lines that
> make up the polygon).
> >
> > I was hoping the whole closed geometry  to be returned.
> >
> > What am I missing??
>
> I don't understand what your query above is trying to select.
> You are calling GetRingEdges with a constant edge id, why so ?
>
> --strk;
>
>  ,------o-.
>  |   __/  |    Delivering high quality PostGIS 2.0 !
>  |  / 2.0 |    http://strk.keybit.net - http://vizzuality.com
>  `-o------'
>
>
>
> ------------------------------
>
> Message: 3
> Date: Mon, 30 Apr 2012 11:33:00 +0000
> From: George Washington <gws293 at hotmail.com>
> Subject: [postgis-users] Changing band pixel type
> To: <postgis-users at postgis.refractions.net>
> Message-ID: <COL116-W52A0945287A4104E0F512494280 at phx.gbl>
> Content-Type: text/plain; charset="iso-8859-1"
>
>
> Hi, I imported a raster image in postgis 2.0 (Win 7) and it shows a pixel
> type of 32BF, an overkill for my needs.Is there a way of changing the pixel
> type to, say, 8BUI or 16BUI? I found st_bandpixeltype to access the type,
> but not yet a way to set it.Many thanks
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://postgis.refractions.net/pipermail/postgis-users/attachments/20120430/0b2b5d8e/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 4
> Date: Mon, 30 Apr 2012 09:33:56 -0400
> From: Pierre Racine <Pierre.Racine at sbf.ulaval.ca>
> Subject: Re: [postgis-users] Changing band pixel type
> To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
> Message-ID:
>        <87A96661E65C5541AB4D20721C2DD7F8CFBB49DD56 at EXCH-MBX-A.ulaval.ca>
> Content-Type: text/plain; charset="us-ascii"
>
> CREATE TABLE newrasttable AS
> SELECT ST_MapAlgebraExpr(rast, '8BUI', '[rast]') rast
> FROM oldrasttable
>
> Pierre
>
> > -----Original Message-----
> > From: postgis-users-bounces at postgis.refractions.net [mailto:
> postgis-users-
> > bounces at postgis.refractions.net] On Behalf Of George Washington
> > Sent: Monday, April 30, 2012 7:33 AM
> > To: postgis-users at postgis.refractions.net
> > Subject: [postgis-users] Changing band pixel type
> >
> > Hi, I imported a raster image in postgis 2.0 (Win 7) and it shows a
> pixel type of
> > 32BF, an overkill for my needs.
> > Is there a way of changing the pixel type to, say, 8BUI or 16BUI? I found
> > st_bandpixeltype to access the type, but not yet a way to set it.
> > Many thanks
> >
>
>
>
> ------------------------------
>
> Message: 5
> Date: Mon, 30 Apr 2012 16:10:37 +0100
> From: Brian Sanjeewa Rupasinghe <jinkabs at gmail.com>
> Subject: [postgis-users] PostGIS 2.0 connection to Java
> To: postgis-users at postgis.refractions.net
> Message-ID:
>        <CAEMA-4guTkR43en_pnVu9PBBMNvx6F0qjtRMLJnkGPqTdcDNOg at mail.gmail.com
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> Where can i find postgis 2.0.jar file to connect postGIS with Java. Link in
> the PostGIS site is broken.
>
> Brian.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://postgis.refractions.net/pipermail/postgis-users/attachments/20120430/76ed821f/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 6
> Date: Mon, 30 Apr 2012 11:25:59 -0400
> From: Skye Book <skye.book at gmail.com>
> Subject: Re: [postgis-users] PostGIS 2.0 connection to Java
> To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
> Message-ID:
>        <CAA2EaMqmcFABkLdomXpDrdbfEOMenoO6GQx8i8K7MkWw5SNfbw at mail.gmail.com
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> I've been building the driver from SVN, it's worked out fine for me.
> On Apr 30, 2012 11:10 AM, "Brian Sanjeewa Rupasinghe" <jinkabs at gmail.com>
> wrote:
>
> > Hi,
> >
> > Where can i find postgis 2.0.jar file to connect postGIS with Java. Link
> > in the PostGIS site is broken.
> >
> > Brian.
> >
> > _______________________________________________
> > 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://postgis.refractions.net/pipermail/postgis-users/attachments/20120430/f2c22ed1/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 7
> Date: Mon, 30 Apr 2012 08:30:56 -0700
> From: "Bob Pawley" <rjpawley at shaw.ca>
> Subject: Re: [postgis-users] Topology GetRingEdges
> To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
> Message-ID: <88A01C8872BB49C3A97B7403B7DB59F3 at BobPC>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
>        reply-type=original
>
> Well, it would seem to me that I need to identify the geometry at some
> point
> as a start (and end) for "walking" the geom, hence, the ST_Intersects.
>
> I've attempted to use the geom column in the edge_data table but so far
> haven't been able to make this work (errors returned) -
>
> select topology.getringedges(edge_data, 1), entities.wkb_geometry
>    from "TEST".edge_data, entities
>    where "TEST".edge_data.edge_id = 1
>
> So far, this is the only combination that I can make work.
>
> My problem may be that I am confused on the atopology varchar for which the
> GetRingEdge is looking, if it isn't the geom of table edge_data.
>
> And I am also wondering why the TEST schema produced by toTopoGeom requires
> double quotes in order to be recognized?
>
> Or am I entirely missing the point?
>
> Bob
>
> -----Original Message-----
> From: Sandro Santilli
> Sent: Monday, April 30, 2012 2:51 AM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] Topology GetRingEdges
>
> On Fri, Apr 27, 2012 at 01:11:27PM -0700, Bob Pawley wrote:
> > Hi
> >
> > I have established the schema and tables as outlined in the documentation
> > example 11.8 TopoGeometry Constructors.
> >
> > However, I am still missing something.
> >
> > When I run GetRingEdges -
> >
> >     select  topology.GetRingEdges('TEST', 1), entities.wkb_geometry
> >     from entities, num_search
> >     where st_intersects(entities.wkb_geometry, num_search.the_geom2);
> >
> > The return are only the geometries which are actually intersected by
> > st_intersects.(In this particular case only four of the eight lines that
> > make up the polygon).
> >
> > I was hoping the whole closed geometry  to be returned.
> >
> > What am I missing??
>
> I don't understand what your query above is trying to select.
> You are calling GetRingEdges with a constant edge id, why so ?
>
> --strk;
>
>  ,------o-.
>  |   __/  |    Delivering high quality PostGIS 2.0 !
>  |  / 2.0 |    http://strk.keybit.net - http://vizzuality.com
>  `-o------'
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
> ------------------------------
>
> Message: 8
> Date: Mon, 30 Apr 2012 16:49:47 +0100
> From: Alexandre Neto <senhor.neto at gmail.com>
> Subject: [postgis-users] Nearest Neighbor problem using GIST Index
>        (<->    function)
> To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
> Message-ID:
>        <CA+H0G_Gkkf4B4N-w9PdZysLJAAW3C+0pO_nKeQe+_Tg6py58AQ at mail.gmail.com
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> I'm trying to use Postgis 2.0 new function <-> (Geometry Distance
> Centroid<
> http://postgis.refractions.net/docs/geometry_distance_centroid.html>)
> in order to calculate, for each row of my table (cosn1), the distance to
> the nearest polygon of the same class.
>
> I was trying to use the following code:
>
> WITH index_query AS (
>  SELECT g1.gid As ref_gid, ST_Distance(g1.the_geom,g2.the_geom) As ENN
> FROM "cosn1" As g1, "cosn1" As g2
> WHERE g1.gid <> g2.gid AND g1.class = g2.class
> ORDER BY g1.gid, g1.the_geom <-> g2.the_geom)
>  SELECT DISTINCT ON (ref_gid) ref_gid, ENN
>  FROM index_query
>  ORDER BY ref_gid, ENN;
>
> But then I realize the warning:
>
>
> Note: Index only kicks in if one of the geometries is a constant (not in a
> subquery/cte). e.g. 'SRID=3005;POINT(1011102 450541)'::geometry instead of
> a.geom
>
> Meaning that the Index wont be used at all, and the query will take almost
> the same time as before using:
>
> SELECT DISTINCT ON(g1.gid)  g1.gid As ref_gid,
> ST_Distance(g1.the_geom,g2.the_geom) As ENN
> FROM "cosn1" As g1, "cosn1" As g2
> WHERE g1.gid <> g2.gid AND g1.class = g2.class
> ORDER BY g1.gid, ST_Distance(g1.the_geom,g2.the_geom)
>
> Can anyone point me a workaround that allows me to improve performance of
> my query?
>
> Thank you very much.
>
> Alexandre Neto
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://postgis.refractions.net/pipermail/postgis-users/attachments/20120430/a950e2ed/attachment-0001.html
> >
>
> ------------------------------
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
> End of postgis-users Digest, Vol 122, Issue 30
> **********************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120430/bc3eb05b/attachment.html>


More information about the postgis-users mailing list