Merging Regions of a shapefile

Adam Quiney aquiney at REFRACTIONS.NET
Mon Jan 16 17:43:51 EST 2006


Neil,

You could also accomplish this using FME, with a 
PolygonDissolveFactory.  FME *is* a proprietary application, with a 
reasonably hefty pricetag.  However, you can download a 15 day trial 
version from SAFE (http://www.safe.com) and give it a shot.  This will 
merge together your geometries very quickly, but if this is the only 
processing you need to do on your data, and FME license would likely be 
overkill.

--Adam

Brock Anderson wrote:

> Neil,
>
> I can't say much about OpenEV, but you may be able to use one of the 
> geometry constructors to group your region polygons together.  Perhaps 
> the "collect" function would do it?
>
> Docs here: http://postgis.refractions.net/docs/ch06.html#id2905042
>
> Brock
>
> Neil Saunders wrote:
>
>> Hi Brock,
>>
>> Thanks for your reply; However I've tried using PostGIS but could't
>> get the shapes to actually "merge" together. Ideally what I'd like to
>> do is have a tool such as OpenEV in to which I could load my
>> shapefile, select a given number of *adjacent* regions, and merge
>> selected regions to a single region, if you catch my drift. I'm
>> beginning to think that it may not be possible... :(
>>
>> Thanks once again for you input!
>>
>> Cheers,
>>
>> Neil
>>
>> On 1/16/06, Brock Anderson <banders at refractions.net> wrote:
>>  
>>
>>> Neil,
>>>
>>> I tend to use Postgres/PostGIS for this kind of processing.
>>>
>>> For example:
>>>
>>> Load the data into postgres like this:
>>>
>>>   shp2pgsql <loader options here> england.shp england_table | psql
>>>
>>> Then dump it out again into several shapefiles. Use an SQL statement to
>>> select the regions to include in each file:
>>>
>>>   pgsql2shp <dumper options here> england_table "select * where ..."
>>>   pgsql2shp <dumper options here> england_table "select * where ..."
>>>   pgsql2shp <dumper options here> england_table "select * where ..."
>>>
>>> Brock
>>>
>>> Neil Saunders wrote:
>>>
>>>   
>>>
>>>> Hi Folks,
>>>>
>>>> I've got a map of England as a shapefile, containing regions for each
>>>> county. What I'd like to do is merge selected regions in to a larger
>>>> region (E.g Devon, Somerset, Cornwall etc into "Westcountry").
>>>>
>>>> Does any one know a simple (Preferably GUI based) way of achieving 
>>>> this?
>>>>
>>>> Thanks in advance,
>>>>
>>>> Neil.
>>>>
>>>>
>>>>     
>>>
>>>   
>>
>

-- 
Adam Quiney
Analyst
Refractions Research Inc.
(250) 383-3022



More information about the mapserver-users mailing list