Re: [postgis-users] Instructions on Installing Postgis on Solaris

2010-06-24 Thread Chen, Li [Contractor]
I wish I could, but I really don't know how to use wiki other than reading it 
:) 
Could you add it for me please?

Cheers,

Li

-Original Message-
From: postgis-users-boun...@postgis.refractions.net 
[mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Mark 
Cave-Ayland
Sent: Friday, 25 June 2010 2:40 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Instructions on Installing Postgis on Solaris

Chen, Li [Contractor] wrote:

> So I am sending the following instructions to share experience with 
> others who also want to install postgis on solaris. The main steps are 
> the same as listed in the postgis manual, but I added some details where 
> I think appropriate.

Thank you! Would you like to create a Solaris page on the PostGIS wiki 
containing this information?


ATB,

Mark.

-- 
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Polygon to line

2010-06-24 Thread Edward Mac Gillavry

Hi Ricardo,

Having been through the mailing list's archives myself over the last few weeks, 
i came up with the following recipe:







First you dump all multipolygons into polygons:

SELECT
(ST_Dump(the_geom)).geom AS the_geom
INTO  polygon_table
FROM multipolygon_table 

and create an index on that one

CREATE INDEX geo_idx_polygon_temp ON polygon_table_temp USING GIST (the_geom);
VACUUM ANALYZE polygon_table_temp;

then you create a new table that contains the borders using ST_Intersection:

CREATE TABLE borders AS 
SELECT
ST_Intersection(t1.the_geom,t2.the_geom) AS the_geom
FROM
polygon_table_temp AS t1,
polygon_table_temp AS t2
WHERE
t1.the_geom && t2.the_geom;

These borders are duplicated, as the intersection is computed twice (A 
intersects B and B intersects A). Also contains records of geometry other than 
multilinestring

DELETE FROM borders WHERE GeometryType(the_geom) <> 'MULTILINESTRING'::text; 
SELECT Populate_Geometry_Columns('borders'::regclass);

ALTER TABLE borders ADD COLUMN gid SERIAL;

ALTER TABLE borders ADD PRIMARY KEY (gid);

CREATE INDEX geo_idx_borders ON borders USING GIST (the_geom);
VACUUM ANALYZE borders;

 so remove duplicates:

DELETE FROM borders WHERE
borders.gid <  
(SELECT  MAX(b.gid )
FROM borders b
WHERE b.the_geom && borders.the_geom 
AND ST_Equals(borders.the_geom, b.the_geom));

REINDEX TABLE borders;
VACUUM ANALYZE borders;

That should do it. Thanks to previous postings to this mailing list!

regards,

Edward



Date: Thu, 24 Jun 2010 16:53:54 -0300
From: vilella.rica...@gmail.com
To: postgis-users@postgis.refractions.net
Subject: [postgis-users] Polygon to line

Hi all, is the first time I use the list. I have a polygon that represent a 
country, if i want extract only the sides that touch with other polygon. How i 
have to do? The result should be a MultiLineString or a LineString representing 
the limits of the country but without the coast line if it has one. I tried 
with ST_Touches but i can't get it work.
  ___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] Polygon to line

2010-06-24 Thread Ricardo Vilella
Hi all, is the first time I use the list. I have a polygon that represent a
country, if i want extract only the sides that touch with other polygon. How
i have to do? The result should be a MultiLineString or a LineString
representing the limits of the country but without the coast line if it has
one. I tried with ST_Touches but i can't get it work.
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Instructions on Installing Postgis on Solaris

2010-06-24 Thread Mark Cave-Ayland

Chen, Li [Contractor] wrote:

So I am sending the following instructions to share experience with 
others who also want to install postgis on solaris. The main steps are 
the same as listed in the postgis manual, but I added some details where 
I think appropriate.


Thank you! Would you like to create a Solaris page on the PostGIS wiki 
containing this information?



ATB,

Mark.

--
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] Which naming convention to use

2010-06-24 Thread Sindile Bidla
When talking about Postgis and PostgreSQL which is the correct:
Postgis/PostgreSQL or PostgreSQL/Postgis.

-- 
Sent from my mobile device

Sindile Bidla
Tel: 0823408538
Fax: 0865246419
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Round up coordinates?

2010-06-24 Thread Nicklas Avén
Hallo

The problem is that even if you round your coordinates with ST_SnapToGrid, the 
edges between the vertexes will cross "not rounded land". So the intersection 
will most likely fail without the buffer if the intersection is expected 
somewhere between the rounded vertex points.

Another way of doing it is using ST_DWithin instead. I don't know which one is 
most effective.

Hope That Helps
Nicklas


2010-06-23 João Paulo Hespanha  wrote:

I have a number of cadastral boundaries (in predio_polylines) and
>property beacons (in propertybeacon) in a PostGIS database. The
>coordinates have a non-default srid of 9102160 and are stored with
>double precision. 
>When I run the following topological query (boundaries crossing a
>certain beacon) without the buffer, I get no results. The data has an
>internal resolution of 0.01 meter (from original source) and quality no
>better than 0.1 meter. How can I round up the coordinates such that the
>query can run without the buffer?
>
>BTW, is it possible to build a small graphical form to run the querying,
>changing the b.gid parameter? (in uDIG? :-)
>
>
>Topo query:
>select
>   l.gid,
>   l.nfolhapred,
>   b.gid,
>   b.tipo
>from
>   predio_polylines as l,
>   propertybeacon as b
>where
>   b.gid = 1000 AND
>   (ST_Intersects(ST_Buffer(ST_EndPoint(l.the_geom), 0.01),
>ST_Buffer(b.the_geom, 0.01)) OR
>   ST_Intersects(ST_Buffer(ST_StartPoint(l.the_geom), 0.01),
>ST_Buffer(b.the_geom, 0.01)));
>
>
>___
>postgis-users mailing list
>postgis-users@postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users