I’m not sure I understand where this is to make the change for MAXPOINTS?
“In the v.surf.rst/v.vol.rst, there is a MAXPOINTS value defined (surf.h). MAXPOINTS simply says how many input points are allowed to be computed without segmentation. I had to increase the value of MAXPOINTS in surf.h to 1346 (or a bit more) and then to use segmax=1346 to avoid segmentation.”
(sidenote) : Something else I found cool, was using some contour lines from a USGS map, and patching in the spot elevations (I’m working on projects in central/south florida where its quite flat, so any supplemental elevation data helps). It seems that, since they are both on layer 1, that the module incorporates the use of the points from the contour lines as well as the spot elevations that were patched in. Nice! In that other software you cant have different geometries in the same file. I never understood why this would be practical. In GRASS, this is a refreshing flexibility!
I'm not sure I understand where this is to make the change for MAXPOINTS?
"In the v.surf.rst/v.vol.rst, there is a MAXPOINTS value defined
(surf.h).
MAXPOINTS simply says how many input points are allowed to be computed
without segmentation. I had to increase the value of MAXPOINTS in surf.h
to
1346 (or a bit more) and then to use segmax=1346 to avoid segmentation."
This is in the source code and you have to recompile v.surf.rst.
Sorry for interuption, but I could not find place where in v.surf.rst
MAXPOINTS is used for anything else than printing a warning. URL to
line in SVN? If I'm correct, no need to recompile anything.
Maris.
2009/2/27, Moritz Lennert <mlennert@club.worldonline.be>:
without segmentation. I had to increase the value of MAXPOINTS in surf.h
This is in the source code and you have to recompile v.surf.rst.
On Fri, Feb 27, 2009 at 9:17 PM, Maris Nartiss <maris.gis@gmail.com> wrote:
Sorry for interuption, but I could not find place where in v.surf.rst
MAXPOINTS is used for anything else than printing a warning. URL to
line in SVN? If I'm correct, no need to recompile anything.
You see that MAXPOINTS is assigned to KMAX2 and
then used.
Here at Trento, we are currently trying to see how to
- either dynamically define MAXPOINTS/KMAX2
- or minimize the overhead while maximising MAXPOINTS.
The problem is:
grep malloc v.*rst/* | grep KMAX2
v.vol.rst/user2.c: /* if(!(point=(struct
point_3d*)G_malloc(sizeof(struct point_3d)*(KMAX2+1))))
v.vol.rst/user2.c: if (!(b = (double
*)G_malloc(sizeof(double) * (KMAX2 + 2)))) {
v.vol.rst/user2.c: if (!(w = (double
*)G_malloc(sizeof(double) * (KMAX2 + 1)))) {
v.vol.rst/user3.c: if (!(w2 = (double *)G_malloc(sizeof(double) *
(KMAX2 + 1))))
v.vol.rst/user3.c: if (!(wz2 = (double *)G_malloc(sizeof(double)
* (KMAX2 + 1))))
v.vol.rst/user3.c: if (!(wz1 = (double *)G_malloc(sizeof(double)
* (KMAX2 + 1))))
The KMAX2 is directly linked to G_malloc() so that can cannot easily
set it to a high number.
> Sorry for interuption, but I could not find place where in v.surf.rst
> MAXPOINTS is used for anything else than printing a warning. URL to
> line in SVN? If I'm correct, no need to recompile anything.
I think you are right for v.surf.rst.
but v.vol.rst seems to use it.
Markus:
You see that MAXPOINTS is assigned to KMAX2 and then used.
.... but that part of the source is commented out and the KMAX2 setting
is the same on both sides of the if/else.
Here at Trento, we are currently trying to see how to
- either dynamically define MAXPOINTS/KMAX2
- or minimize the overhead while maximising MAXPOINTS.