[GRASS-user] patch boundaries

Daniel Victoria daniel.victoria at gmail.com
Fri Jun 8 05:44:43 PDT 2012


Hi Markus M,

Thanks, it worked. I need to study grass vector datavase and topology
concept a bit better to grasp all these things

Cheers
Daniel

On Fri, Jun 8, 2012 at 4:13 AM, Markus Metz
<markus.metz.giswork at googlemail.com> wrote:
> On Fri, Jun 8, 2012 at 5:58 AM, Daniel Victoria
> <daniel.victoria at gmail.com> wrote:
>> Hi all,
>>
>> I'm having a hard time trying to get one boundary polygon file from
>> four smaller shapes. I'm using wingrass7, daily build from today.
>>
>> This is how it goes. I have four boundaries which I imported and
>> patched (v.patch).
>> I then tried to dissolve the four separate boundaries into one but
>> first, since the tiles do not match perfectly (they don't overlap), I
>> tried v.clean with tools break polygons, snap boundaries and remove
>> duplicate. Then, when I try to v.dissolve, nothing happens, I still
>> end up with 4 polygons. Then I saw that I only had one item in the
>> attribute table however, I have four polygons in the vector. I tried
>> using v.to.db to add the missing polygons to the attribute table but I
>> did not have any luck. I believe I'm missing something obvious which I
>> just can't see. Any help is very much appreciated.
>
> You can try to import all shapefiles at once (one shapefile is one OGR
> layer and ends up as one GRASS layer):
>
> v.in.ogr dsn=duke_analisys out=duke_analysis snap=1 min_area=100 --v
>
> The snapping threshold comes from trial and error. In the imported
> vector, the number of areas is equal to the number of centroids, 4,
> thus there are no holes left inside or between polygons.
>
> Have a look at the categories:
> v.category in=duke_analysis out=duke_analysis_cat1 op=report
>
> Add category 1 to layer 1 for each centroid (needed for dissolving):
> v.category in=duke_analysis out=duke_analysis_cat1 layer=1 op=add
> cat=1 step=0 type=centroid
>
> Dissolve by categories:
> v.dissolve input=duke_analysis_cat1 layer=1 output=duke_analysis_dissolved
>
> One area left, done.
>
> HTH,
>
> Markus M
>
>>
>> Thanks
>> Daniel
>>
>> PS - I attached the files because they are very small, just in case
>> someone wants to take a look. They are in UTM 19S WGS84
>>
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>


More information about the grass-user mailing list