Re: [GRASS-user] v.generalize for polygons?

2008-03-03 Thread Wolf Bergenheim

Hamish,

I played around with the map you gave me, and I think I found a way 
around the problem (though I'm still not very sure about what the real 
problem is, perhaps too many small areas or too many shorter segments 
(the boundary seems to be built of a number of smaller lines). I'll try 
to create another problematic map.

Anyway, here is how I was able to generalize it:

# First I fuse the short segments into one long boundary
v.build.polylines --o input=rc_merge_coast3 output=fused
# Then I clean away some (relatively) small islands
v.clean --o in=fused out=clean tool=rmarea thresh=50.0
# finally generalize
v.generalize -r --o input=clean output=gen method=douglas_reduction 
reduction=20


The generalized map contains about 20% of the original points.

--Wolf

On 28.02.2008 06:16, Hamish wrote:

Hamish:

I have a high-res vector area map of regional districts which I
wish to generalize. I am having trouble with finding the correct
method in v.generalize to use. Currently every thing I try tends
to break the area topology and leave only a portion of the now-
open boundary.


I have now tried with a related vector, linked below, and it worked
(very!) nicely for that. But it fails with a derivative vector map.
v.digit shows no problems with topography.

Wolf:

What methods did you try?


many of them.. mainly douglas with a number of threshold values.

What exact commands have you tried that fail? 


at the simplest:   v.generalize in= out=
but some areas are missing.



Can you share the problematic map? (you can email it to me directly)


sure,

starting with:
http://www.stats.govt.nz/statistics-by-area/regional-statistics/geography-mapping/download-digital-boundaries.htm
-- Census based NZMG 2006 (37mb shapefile .zip)

I am looking at regional boundaries (RC) from REGC06_LV2.shp

this map generalizes nicely, but it includes the 12 nautical mile
territorial buffer around the coastline. When I overlay that map with a
detailed coastline is when I see the problem.

I'll send a sample of the v.overlay output off-list.


v.generalize does preserve nodes, and as long as the input map is 
topologically correct so should the output map be.


ok. (confirmed, it does a very nice job simplifying the above
shapefile)


Perhaps your threshold is way off?


Possible, as I am just learning. But I did try a number of ranges and
slowly increase. All would be ok for slight generalization then big
breakage.

e.g. it has a big jump between thresh=0.4865 and 0.487

Good:
   v.generalize in=rc_merge_coast3 out=rc_gen thresh=0.4865 --o
   ...
   Number of vertices was reduced from 569815 to 521969 [91%]

Bad:
   v.generalize in=rc_merge_coast3 out=rc_gen thresh=0.487 --o
   ...
   Number of vertices was reduced from 569815 to 336380 [59%]


Daniel:

However, there is a flag(-r?) which prevents the module from removing
them.


Flags:
  -c   Copy attributes
  -r   Remove lines and areas smaller than threshold



thanks,
Hamish




  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping




--

:3 ) Wolf Bergenheim ( 8:

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] v.generalize for polygons?

2008-02-27 Thread Daniel Bundala
Hi,

I am not sure that I understand correcly what you are trying to do,
but as far as I remember, the boundaries are generalized as polylines.
That is, if the boundary contains some corners, they might be removed
which might create the holes. Also, ovesimplified lines are removed
by default. These are the lines that are shorter than the threshold.
However, there is a flag(-r?) which prevents the module from removing
them.

Daniel

On Wed, Feb 27, 2008 at 2:19 AM, Hamish [EMAIL PROTECTED] wrote:
 Hi,

  I have a high-res vector area map of regional districts which I wish to 
 generalize. I am having trouble with finding the correct method in 
 v.generalize to use. Currently every thing I try tends to break the area 
 topology and leave only a portion of the now-open boundary.

  i.e. it should preserve nodes, only generalize (remove) non-node vertices.
  We can assume there is only a single boundary line between areas, so there 
 shouldn't be topological issues. (or at least only in tiny corner cases where 
 the new generalized line overlaps another feature, but that should be easy to 
 fix with v.clean)

  the idea is to simplify the map before running v.extrude to get something 
 like this:
  http://grass.osgeo.org/grass60/screenshots/images/inc_employ_usa_2002.jpg

  but without the 600,000 extruded faces created from every little twist in 
 the coastline.


  Hamish
  ___
  grass-user mailing list
  grass-user@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/grass-user

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] v.generalize for polygons?

2008-02-27 Thread Hamish
Hamish:
  I have a high-res vector area map of regional districts which I
  wish to generalize. I am having trouble with finding the correct
  method in v.generalize to use. Currently every thing I try tends
  to break the area topology and leave only a portion of the now-
  open boundary.

I have now tried with a related vector, linked below, and it worked
(very!) nicely for that. But it fails with a derivative vector map.
v.digit shows no problems with topography.

Wolf:
 What methods did you try?

many of them.. mainly douglas with a number of threshold values.

 What exact commands have you tried that fail? 

at the simplest:   v.generalize in= out=
but some areas are missing.


 Can you share the problematic map? (you can email it to me directly)

sure,

starting with:
http://www.stats.govt.nz/statistics-by-area/regional-statistics/geography-mapping/download-digital-boundaries.htm
-- Census based NZMG 2006 (37mb shapefile .zip)

I am looking at regional boundaries (RC) from REGC06_LV2.shp

this map generalizes nicely, but it includes the 12 nautical mile
territorial buffer around the coastline. When I overlay that map with a
detailed coastline is when I see the problem.

I'll send a sample of the v.overlay output off-list.


 v.generalize does preserve nodes, and as long as the input map is 
 topologically correct so should the output map be.

ok. (confirmed, it does a very nice job simplifying the above
shapefile)

 Perhaps your threshold is way off?

Possible, as I am just learning. But I did try a number of ranges and
slowly increase. All would be ok for slight generalization then big
breakage.

e.g. it has a big jump between thresh=0.4865 and 0.487

Good:
   v.generalize in=rc_merge_coast3 out=rc_gen thresh=0.4865 --o
   ...
   Number of vertices was reduced from 569815 to 521969 [91%]

Bad:
   v.generalize in=rc_merge_coast3 out=rc_gen thresh=0.487 --o
   ...
   Number of vertices was reduced from 569815 to 336380 [59%]


Daniel:
 However, there is a flag(-r?) which prevents the module from removing
 them.

Flags:
  -c   Copy attributes
  -r   Remove lines and areas smaller than threshold



thanks,
Hamish




  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] v.generalize for polygons?

2008-02-26 Thread Hamish
Hi,

I have a high-res vector area map of regional districts which I wish to 
generalize. I am having trouble with finding the correct method in v.generalize 
to use. Currently every thing I try tends to break the area topology and leave 
only a portion of the now-open boundary.

i.e. it should preserve nodes, only generalize (remove) non-node vertices.
We can assume there is only a single boundary line between areas, so there 
shouldn't be topological issues. (or at least only in tiny corner cases where 
the new generalized line overlaps another feature, but that should be easy to 
fix with v.clean)

the idea is to simplify the map before running v.extrude to get something like 
this:
http://grass.osgeo.org/grass60/screenshots/images/inc_employ_usa_2002.jpg

but without the 600,000 extruded faces created from every little twist in the 
coastline.


Hamish
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user