[postgis-users] basic functionalities of PostGIS

=?utf-8?Q?Nicklas_Av=E9n?= nicklas.aven at jordogskog.no
Tue Jan 4 00:16:54 PST 2011


Apostolis

What confuses here is that union means different things in Arc world and PostGIS. PostGIS union is dissolved in ArcMap (I think).

The problem is that the easy way in PostGIS only compares 2 geometries at a time and here you need to get a result from many polygons. 

As I understand the ArcMap uion is about the same as decribed here:
http://trac.osgeo.org/postgis/wiki/UsersWikiExamplesOverlayTables

and  also the accepted answer here:
http://gis.stackexchange.com/questions/83/separate-polygons-based-on-intersection-using-postgis

It is maybe not exactly the same because this PostGIS approach will only give one p
HTH

Nicklas 

2011-01-04 skrev Ben Madin :

Apostolis,
>
>On 04/01/2011, at 4:55 AM, ΑΠΟΣΤΟΛΟΣ ΛΕΛΕΝΤΖΗΣ wrote:
>
>> Indeed, i understand the power of spatial SQL, but now i am a beginner, and i need a lot of work.
>> 
>> As i mentioned, i want to union two layers, typing a spatial SQL query.
>> I want to take the same result, if i use the tool union of ArcGIS. But, i don't like to talk with terminal of ArcGIS, so i want to execute one of the classic spatial action, namely UNION (A or B).
>> Because, i can't type the right command..could you help me???
>
>It is fairly well documented, but this example unions two polygons (A Red, B Green).
>
>
>
>
>
>
>SELECT ST_AsText( 
>	ST_Union( 
>		ST_GeomFromText( 
>			'POLYGON (( 1 1,1 3, 3 3 ,3 1,1 1))' -- Polygon A
>		), 
>		ST_GeomFromText( 
>			'POLYGON((2 2, 2 4, 4 4, 4 2, 2 2))' -- Polygon B
>		) 
>	) 
>);
>
>                   st_astext                    
>------------------------------------------------
> POLYGON((1 1,1 3,2 3,2 4,4 4,4 2,3 2,3 1,1 1))
>(1 row)
>
>
>
>
>_______________________________________________
>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/20110104/e32811a3/attachment.html>


More information about the postgis-users mailing list