Re: [GRASS-user] error compiling grass65svn and addons for grass64

2010-10-20 Thread Laura Poggio
grass-devel is installed. Below the error message is I try to use make with
MODULE_TOPDIR=/path/to/grass instead of g.extension.

thank you very much!

Laura

==
gcc
-I/usr/src/packages/BUILD/grass-6.4.0/dist.x86_64-unknown-linux-gnu/include
-O2-I/usr/include/gdal/-DPACKAGE=\""grassmods"\"
-I/usr/src/packages/BUILD/grass-6.4.0/dist.x86_64-unknown-linux-gnu/include
-o OBJ.x86_64-unknown-linux-gnu/io.o -c
io.c
io.c:1:27: error: grass/glocale.h: No such file or
directory
In file included from
io.c:2:
global.h:5:23: error: grass/gis.h: No such file or
directory
global.h:6:24: error: grass/Vect.h: No such file or
directory
global.h:7:24: error: grass/dbmi.h: No such file or
directory
In file included from
io.c:2:
global.h:80: error: expected ‘)’ before ‘*’
token
global.h:81: error: expected ‘)’ before ‘*’
token
In file included from
io.c:2:
global.h:93: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘*’
token

global.h:94: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘*’
token

io.c: In function
‘open_raster’:
io.c:8: error: storage size of ‘cellhd’ isn’t
known
io.c:10: warning: assignment makes pointer from integer without a
cast
io.c:16: error: ‘CELL_TYPE’ undeclared (first use in this
function)
io.c:16: error: (Each undeclared identifier is reported only
once
io.c:16: error: for each function it appears
in.)
io.c:26: error: invalid use of undefined type ‘struct
Cell_head’
io.c:26: error: invalid use of undefined type ‘struct
Cell_head’
io.c: In function
‘create_base_maps’:
io.c:37: error: ‘CELL’ undeclared (first use in this
function)
io.c:37: error: ‘r_dirs’ undeclared (first use in this
function)
io.c:37: error: ‘r_streams’ undeclared (first use in this
function)
io.c:38: error: ‘DCELL’ undeclared (first use in this
function)
io.c:38: error: ‘r_accum’ undeclared (first use in this
function)
io.c:47: error: ‘dirs’ undeclared (first use in this
function)
io.c:47: error: expected expression before ‘)’
token
io.c:48: error: ‘streams’ undeclared (first use in this
function)
io.c:48: error: expected expression before ‘)’
token
io.c:50: error: ‘accum’ undeclared (first use in this
function)
io.c:50: error: expected expression before ‘)’
token
io.c:52: error: expected expression before ‘)’
token
io.c:53: error: expected expression before ‘)’
token
io.c:55: error: expected expression before ‘)’
token
io.c:73: error: expected expression before ‘)’ token
io.c: In function ‘stream_number’:
io.c:120: error: ‘CELL’ undeclared (first use in this function)
io.c:120: error: expected ‘;’ before ‘c_min’
io.c:121: error: storage size of ‘stream_range’ isn’t known
io.c:124: warning: assignment makes pointer from integer without a cast
io.c:126: error: ‘c_min’ undeclared (first use in this function)
io.c:126: error: ‘c_max’ undeclared (first use in this function)
io.c: In function ‘write_maps’:
io.c:136: error: ‘CELL’ undeclared (first use in this function)
io.c:136: error: ‘strahler_buf’ undeclared (first use in this function)
io.c:136: error: ‘shreeve_buf’ undeclared (first use in this function)
io.c:136: error: ‘hack_buf’ undeclared (first use in this function)
io.c:136: error: ‘horton_buf’ undeclared (first use in this function)
io.c:136: error: ‘topo_buf’ undeclared (first use in this function)
io.c:138: error: storage size of ‘history’ isn’t known
io.c:142: error: ‘CELL_TYPE’ undeclared (first use in this function)
io.c:190: error: ‘streams’ undeclared (first use in this function)
io.c: In function ‘create_table’:
io.c:285: error: ‘dbConnection’ undeclared (first use in this function)
io.c:285: error: expected ‘;’ before ‘conn’
io.c:286: error: ‘dbDriver’ undeclared (first use in this function)
io.c:286: error: ‘driver’ undeclared (first use in this function)
io.c:287: error: ‘dbHandle’ undeclared (first use in this function)
io.c:287: error: expected ‘;’ before ‘handle’
io.c:288: error: ‘dbString’ undeclared (first use in this function)
io.c:288: error: expected ‘;’ before ‘table_name’
io.c:334: error: ‘db_sql’ undeclared (first use in this function)
io.c:335: error: ‘val_string’ undeclared (first use in this function)
io.c:336: error: ‘table_name’ undeclared (first use in this function)
io.c:337: error: ‘handle’ undeclared (first use in this function)
io.c:341: error: ‘conn’ undeclared (first use in this function)
io.c:383: error: ‘DB_OK’ undeclared (first use in this function)
io.c:393: error: ‘DB_PRIV_SELECT’ undeclared (first use in this function)
io.c:393: error: ‘DB_GROUP’ undeclared (first use in this function)
io.c:393: error: ‘DB_PUBLIC’ undeclared (first use in this function)
make: *** [OBJ.x86_64-unknown-linux-gnu/io.o] Error 1

On 20 October 2010 16:45, Maris Nartiss  wrote:

> Hello,
> if SUSE provides separate -dev packages, install grass-dev package.
> Then You have to run Your make commands with
> MODULE_TOPDIR=/path/to/grass.
>
> See this issue for details: http://trac.osgeo.org/grass/ticket/620
>
> Still error You 

Re: [GRASS-user] r.reclass with floating point result

2010-10-20 Thread Hanlie Pretorius
2010/10/19, Glynn Clements :
>
> Hanlie Pretorius wrote:
>
>> So, I have two problems here: 1) I can't get r.reclass to output an
>> FCELL raster even though its help file suggest that only the input
>> file needs to be a CELL raster.
>
> A reclass table maps integers to integers. You cannot generate a
> floating-point map by reclassing.

Could you perhaps suggest a method to do so? I tried r.mapcalc, but I
also got a conversion to integers. Somehow the default raster is an
integer raster?

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


Re: [GRASS-user] error compiling grass65svn and addons for grass64

2010-10-20 Thread Maris Nartiss
Hello,
if SUSE provides separate -dev packages, install grass-dev package.
Then You have to run Your make commands with
MODULE_TOPDIR=/path/to/grass.

See this issue for details: http://trac.osgeo.org/grass/ticket/620

Still error You had when compiling 6.5 from source must be a different
one, as provided error message makes sense only to addons and not
compilation of whole GRASS.

Maris.


2010/10/20, Laura Poggio :
> Yes I have gcc, g++, make.
> The full error message for one extension is pasted below (for one extension
> as example).
>
> Thank you very much
>
> Laura
>
> ===
> Checked out revision 43978.
> Compiling ...
> In file included from catchment.c:1:
> global.h:5:23: error: grass/gis.h: No such file or directory
> global.h:6:24: error: grass/Vect.h: No such file or
> directory
> global.h:7:27: error: grass/glocale.h: No such file or
> directory
> In file included from catchment.c:1:
> global.h:64: error: expected ‘=’, ‘,’, ‘;’,
> ‘asm’ or ‘__attribute__’ before ‘*’ token
> catchment.c: In function ‘find_outlets’:
> catchment.c:29: warning: cast to pointer from integer of
> different size
> catchment.c:36: error: ‘streams’ undeclared (first use
> in this function)
> catchment.c:36: error: (Each undeclared identifier is
> reported only once
> catchment.c:36: error: for each function it appears in.)
> catchment.c:45: warning: cast to pointer from integer of
> different size
> catchment.c:48: error: ‘dirs’ undeclared (first use in
> this function)
> catchment.c: In function ‘reset_catchments’:
> catchment.c:115: error: ‘streams’ undeclared (first use
> in this function)
> catchment.c: In function ‘fill_catchments’:
> catchment.c:147: error: ‘streams’ undeclared (first use
> in this function)
> catchment.c:159: error: ‘dirs’ undeclared (first use in
> this function)
> make: *** [OBJ.x86_64-unknown-linux-gnu/catchment.o] Error 1
> ERROR: Compilation failed, sorry. Please check above error messages.
> test -d OBJ.x86_64-unknown-linux-gnu || mkdir -p
> OBJ.x86_64-unknown-linux-gnu
> gcc
> -I/usr/src/packages/BUILD/grass-6.4.0/dist.x86_64-unknown-linux-gnu/include
> -O2-I/usr/include/gdal/ -DPACKAGE=\""grassmods"\"
> -I/usr/src/packages/BUILD/grass-6.4.0/dist.x86_64-unknown-linux-gnu/include
> -o OBJ.x86_64-unknown-linux-gnu/catchment.o -c catchment.c
> (Wed Oct 20 11:56:21 2010) Command finished (6
> sec)
>
>
> On 20 October 2010 14:38,  wrote:
>
>> Have you got the following packges installed?
>> gcc
>> g++
>> make
>>
>>
>> Cheers
>> Sab
>>
>> > Hello,
>> > You have to provide whole error message. Without exact error text,
>> > it's impossible to tell what kind of problem You have.
>> >
>> > WBR,
>> > Maris.
>> >
>> >
>> > 2010/10/20, Laura Poggio :
>> >> Dear all,
>> >> I installed grass6.4 on a machine with Suse11.2 64 bit from the
>> >> official
>> >> repository. Then I tried to install  some addons with g.extension and
>> >> using
>> >> the usual configure/make/make install.
>> >> In both cases I get the following error:
>> >>
>> >> make: *** [OBJ.x86_64-unknown-linux-gnu/[...]] Error 1
>> >> ERROR: Compilation failed, sorry. Please check above error messages.
>> >>
>> >> I also tried to compile grass65 from svn and I am getting the same
>> >> error.
>> >>
>> >> Please let me know and I can provide more details. Sorry but I do not
>> >> know
>> >> what would be useful for better understanding the problem.
>> >>
>> >>
>> >> Thank you very much in advance
>> >>
>> >> Laura
>> >>
>> > ___
>> > 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] error compiling grass65svn and addons for grass64

2010-10-20 Thread Laura Poggio
Yes I have gcc, g++, make.
The full error message for one extension is pasted below (for one extension
as example).

Thank you very much

Laura

===
Checked out revision 43978.
Compiling ...
In file included from catchment.c:1:
global.h:5:23: error: grass/gis.h: No such file or directory
global.h:6:24: error: grass/Vect.h: No such file or
directory
global.h:7:27: error: grass/glocale.h: No such file or
directory
In file included from catchment.c:1:
global.h:64: error: expected ‘=’, ‘,’, ‘;’,
‘asm’ or ‘__attribute__’ before ‘*’ token
catchment.c: In function ‘find_outlets’:
catchment.c:29: warning: cast to pointer from integer of
different size
catchment.c:36: error: ‘streams’ undeclared (first use
in this function)
catchment.c:36: error: (Each undeclared identifier is
reported only once
catchment.c:36: error: for each function it appears in.)
catchment.c:45: warning: cast to pointer from integer of
different size
catchment.c:48: error: ‘dirs’ undeclared (first use in
this function)
catchment.c: In function ‘reset_catchments’:
catchment.c:115: error: ‘streams’ undeclared (first use
in this function)
catchment.c: In function ‘fill_catchments’:
catchment.c:147: error: ‘streams’ undeclared (first use
in this function)
catchment.c:159: error: ‘dirs’ undeclared (first use in
this function)
make: *** [OBJ.x86_64-unknown-linux-gnu/catchment.o] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.
test -d OBJ.x86_64-unknown-linux-gnu || mkdir -p
OBJ.x86_64-unknown-linux-gnu
gcc
-I/usr/src/packages/BUILD/grass-6.4.0/dist.x86_64-unknown-linux-gnu/include
-O2-I/usr/include/gdal/ -DPACKAGE=\""grassmods"\"
-I/usr/src/packages/BUILD/grass-6.4.0/dist.x86_64-unknown-linux-gnu/include
-o OBJ.x86_64-unknown-linux-gnu/catchment.o -c catchment.c
(Wed Oct 20 11:56:21 2010) Command finished (6
sec)


On 20 October 2010 14:38,  wrote:

> Have you got the following packges installed?
> gcc
> g++
> make
>
>
> Cheers
> Sab
>
> > Hello,
> > You have to provide whole error message. Without exact error text,
> > it's impossible to tell what kind of problem You have.
> >
> > WBR,
> > Maris.
> >
> >
> > 2010/10/20, Laura Poggio :
> >> Dear all,
> >> I installed grass6.4 on a machine with Suse11.2 64 bit from the official
> >> repository. Then I tried to install  some addons with g.extension and
> >> using
> >> the usual configure/make/make install.
> >> In both cases I get the following error:
> >>
> >> make: *** [OBJ.x86_64-unknown-linux-gnu/[...]] Error 1
> >> ERROR: Compilation failed, sorry. Please check above error messages.
> >>
> >> I also tried to compile grass65 from svn and I am getting the same
> >> error.
> >>
> >> Please let me know and I can provide more details. Sorry but I do not
> >> know
> >> what would be useful for better understanding the problem.
> >>
> >>
> >> Thank you very much in advance
> >>
> >> Laura
> >>
> > ___
> > 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] error compiling grass65svn and addons for grass64

2010-10-20 Thread razmjooeis
Have you got the following packges installed?
gcc
g++
make


Cheers
Sab

> Hello,
> You have to provide whole error message. Without exact error text,
> it's impossible to tell what kind of problem You have.
>
> WBR,
> Maris.
>
>
> 2010/10/20, Laura Poggio :
>> Dear all,
>> I installed grass6.4 on a machine with Suse11.2 64 bit from the official
>> repository. Then I tried to install  some addons with g.extension and
>> using
>> the usual configure/make/make install.
>> In both cases I get the following error:
>>
>> make: *** [OBJ.x86_64-unknown-linux-gnu/[...]] Error 1
>> ERROR: Compilation failed, sorry. Please check above error messages.
>>
>> I also tried to compile grass65 from svn and I am getting the same
>> error.
>>
>> Please let me know and I can provide more details. Sorry but I do not
>> know
>> what would be useful for better understanding the problem.
>>
>>
>> Thank you very much in advance
>>
>> Laura
>>
> ___
> 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] error compiling grass65svn and addons for grass64

2010-10-20 Thread Maris Nartiss
Hello,
You have to provide whole error message. Without exact error text,
it's impossible to tell what kind of problem You have.

WBR,
Maris.


2010/10/20, Laura Poggio :
> Dear all,
> I installed grass6.4 on a machine with Suse11.2 64 bit from the official
> repository. Then I tried to install  some addons with g.extension and using
> the usual configure/make/make install.
> In both cases I get the following error:
>
> make: *** [OBJ.x86_64-unknown-linux-gnu/[...]] Error 1
> ERROR: Compilation failed, sorry. Please check above error messages.
>
> I also tried to compile grass65 from svn and I am getting the same error.
>
> Please let me know and I can provide more details. Sorry but I do not know
> what would be useful for better understanding the problem.
>
>
> Thank you very much in advance
>
> Laura
>
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Use of r.mode

2010-10-20 Thread Micha Silver


  
  
On 20/10/2010 12:18, Monica Buescu wrote:
Hello
  
  
  

  

  
  
  About 20,000,000 cells. That should be OK.
  Do you know how many different values are actually in the
  data?
  
  Yes... In this case is 6608. In other examples it can be
3000 or 2000. Why?

  

Just to understand how complex the calculation of r.mode has to be.

  

   
  
  
  

  I'd try two things here. First can you change to a smaller
  region and
  rerun r.mode and try to display the results?

  
  Yes. It worked with a much smaller image.

  

Ah, good.

  

   
  

  Second: the result of r.mode is a "reclass" of the
  original values. So
  I suppose it has to be recalculated each time you want to
  display. You
  can make that reclass map into a permanent raster by
  running:
  r.mapcalc "output2 = output1"

  
  
  
  I tried this and after 15 minutes running I gave up. Can
this be related with memory restrictions?

  

Well, that's not good. Yes, maybe a problem with disk space or
memory? l'll have to leave to someone more knowledgeable to answer
here. 
If you just let it run for longer will it finish?

  

   

  

  

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


[GRASS-user] error compiling grass65svn and addons for grass64

2010-10-20 Thread Laura Poggio
Dear all,
I installed grass6.4 on a machine with Suse11.2 64 bit from the official
repository. Then I tried to install  some addons with g.extension and using
the usual configure/make/make install.
In both cases I get the following error:

make: *** [OBJ.x86_64-unknown-linux-gnu/[...]] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.

I also tried to compile grass65 from svn and I am getting the same error.

Please let me know and I can provide more details. Sorry but I do not know
what would be useful for better understanding the problem.


Thank you very much in advance

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


Re: [GRASS-user] Using r.reclass

2010-10-20 Thread Glynn Clements

katrin eggert wrote:

> I have a raster image that ranges from 1-300 and I want to apply reclass in
> order to reclass this image. But I only want to change 10 values
> (1,10,12,15, 100, 130, 200, 230, 250,290) and the rest I want them to be
> Null. in the rules file, shall I include the rest of the values and
> attribute them the null() value or what shall I do?

Add the rule:

* = NULL

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


Re: [GRASS-user] v.dissolve for lines?

2010-10-20 Thread Martin Landa
Hi,

2010/10/20 Markus Metz :
> v.build.polyline works as follows:
> it picks a line and from its start node, walks back as long as exactly
> one other line is connected to this node. Line directions are reversed
> as required, i.e. it does not matter if the next line is connected to
> the current node by its start or end node.
>
> Once the start line of a polyline is identified, it walks forward and
> adds all vertices (in reverse order if needed) of connected lines to
> the start line, i.e. the start line and connecting lines are reversed
> as needed. That is, if a line is reversed depends on what node is
> initially picked for building polylines.
>
> If the direction of lines is important (it's not for boundaries to
> build areas), you have to manually change line directions with either
> v.edit or the wxdigitizer or the tool by Maris.

I took a liberty to add your useful notes to v.build.polylines manual - r43979.

Martin

-- 
Martin Landa  * http://geo.fsv.cvut.cz/~landa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Use of r.mode

2010-10-20 Thread Monica Buescu
Hello


> About 20,000,000 cells. That should be OK.
> Do you know how many different values are actually in the data?
>
Yes... In this case is 6608. In other examples it can be 3000 or 2000. Why?


I'd try two things here. First can you change to a smaller region and rerun
> r.mode and try to display the results?
>
Yes. It worked with a much smaller image.


> Second: the result of r.mode is a "reclass" of the original values. So I
> suppose it has to be recalculated each time you want to display. You can
> make that reclass map into a permanent raster by running:
> r.mapcalc "output2 = output1"
>

I tried this and after 15 minutes running I gave up. Can this be related
with memory restrictions?

Thanks Micha for your help
Micha
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] v.dissolve for lines?

2010-10-20 Thread Markus Metz
Micha Silver wrote:
>  On 20/10/2010 08:36, Markus Metz wrote:
>>
>> Micha Silver wrote:
>>>
>>> Bryan Keith wrote:

 Hello,

 I have a vector line file that has lots of two-vertex lines.  Many of
 these two-vertex lines share endpoints and really just make parts of one
 longer line.  I'd like to dissolve these lines into one line when they
 have the same end point.  It looks like v.dissolve only works for areas.
 Is there somewhere else I should be looking?  Thank you.


>>> Did you have a look at v.build.polylines ?
>>> Additional note: line vectors have a direction. Two line segments with an
>>> equivalent node (end point) will *not* connect if they are in opposite
>>> directions.
>>
>> Each line has two nodes, one at the start and one at the end. If at
>> the end of one line any other line is starting or ending, this other
>> line is added to the first line, reversing the direction if necessary.
>> IOW, two lines with a common node will indeed connect, and the
>> direction of one line may need to be reversed (done automatically).
>> Very simple to test by digitizing a simple test vector.
>>
> Heh, thanks for the correction!
> Was this always the case? I seem to remember not be able to merge lines
> unless they were connected in the same direction.
> How does the line reversal work? That is, Which of the two line segments is
> chosen be get reversed?

v.build.polyline works as follows:
it picks a line and from its start node, walks back as long as exactly
one other line is connected to this node. Line directions are reversed
as required, i.e. it does not matter if the next line is connected to
the current node by its start or end node.

Once the start line of a polyline is identified, it walks forward and
adds all vertices (in reverse order if needed) of connected lines to
the start line, i.e. the start line and connecting lines are reversed
as needed. That is, if a line is reversed depends on what node is
initially picked for building polylines.

If the direction of lines is important (it's not for boundaries to
build areas), you have to manually change line directions with either
v.edit or the wxdigitizer or the tool by Maris.

Markus M

> Regards,
> Micha
>
>> In this case you can try the v.edit tool=flip option (on those
>>>
>>> segments only)
>>
>> Should not be needed as pre-processing step for v.build.polylines.
>>
>>
>> Markus M
>>
>> This mail was received via Mail-SeCure System.
>>
>>
>
>
> --
> Micha Silver
> http://www.surfaces.co.il/
> Arava Development Co.  +972-52-3665918
>
>
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Question about r.in.xyz

2010-10-20 Thread Franz Schiller
That was a typo. What I mean is that, when I imported that file it has
applied all those zscale, percent and methods. My question is: does this
"change my data"?

On Tue, Oct 19, 2010 at 7:22 PM, Daniel Victoria
wrote:

> In your r.in.xyz the input file is named filev2 while in the r.info
> command it says input is named saidav2. Is that what you mean by
> different?
>
> Daniel
>
> On Tue, Oct 19, 2010 at 6:15 AM, Franz Schiller
>  wrote:
> > Hi Hamish
> >
> >> that's simply a function of what's present in your input data.
> >> for floating point values it will just be the next highest
> >> integer beyond the maximum data value and can be ignored.
> >>
> > Uhm but it has to do with the "number of categores"? It's used for
> Histogram
> > only?
> >
> >>
> >> see also the output of r.univar and the display histogram tool.
> >>
> > Ok r.univar is ok (I guess).
> >
> >>
> >> > - and in the r.info v2 I get a command slightly different from
> >> > the one I typed:
> >> > r.in.xyz input="C:\Test_areas\graphbased\saidav2" \
> >> >   output="v...@permanent" method="mean" type="FCELL" fs=" " \
> >> >   x=1 y=2 z=3 zscale=1.0 percent=100
> >> > Why?
> >>
> > But it didn't change my dataset right?
> > Franz
> >
> > ___
> > 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.dissolve for lines?

2010-10-20 Thread Maris Nartiss
If You have lines with wrong direction or segment order, You can try
to run my "v.reorder_line_segments" tool.[1] It will try to reorder
same CAT line segments to be in increasing order. It also reverses
line segments to be in order from start to end. It will work only for
simple, stright lines and will go nuts on circular featrues etc, still
sometimes it's faster than doing manual work.

Current version will stop if line contains crossection, still that
check can be removed. I introduced it only because module entered an
endless loop if multiline looped back to itself. Code is unfinished,
as I was not able to figure out how to solve non-trivial cases and
thus cleaned my data by hand.

It's tested on GRASS 7. It requires ctypes.

If You need aditional help, drop a note.
Maris.

1. 
http://www.gisnet.lv/trac/gisnet/browser/gisnettools/v.reorder_line_segments.py


2010/10/20, Micha Silver :
>   On 20/10/2010 08:36, Markus Metz wrote:
>> Micha Silver wrote:
>>> Bryan Keith wrote:
 Hello,

 I have a vector line file that has lots of two-vertex lines.  Many of
 these two-vertex lines share endpoints and really just make parts of one
 longer line.  I'd like to dissolve these lines into one line when they
 have the same end point.  It looks like v.dissolve only works for areas.
 Is there somewhere else I should be looking?  Thank you.


>>> Did you have a look at v.build.polylines ?
>>> Additional note: line vectors have a direction. Two line segments with an
>>> equivalent node (end point) will *not* connect if they are in opposite
>>> directions.
>> Each line has two nodes, one at the start and one at the end. If at
>> the end of one line any other line is starting or ending, this other
>> line is added to the first line, reversing the direction if necessary.
>> IOW, two lines with a common node will indeed connect, and the
>> direction of one line may need to be reversed (done automatically).
>> Very simple to test by digitizing a simple test vector.
>>
> Heh, thanks for the correction!
> Was this always the case? I seem to remember not be able to
> merge lines unless they were connected in the same direction.
> How does the line reversal work? That is, Which of the two
> line segments is chosen be get reversed?
> Regards,
> Micha
>
>> In this case you can try the v.edit tool=flip option (on those
>>> segments only)
>> Should not be needed as pre-processing step for v.build.polylines.
>>
>>
>> Markus M
>>
>> This mail was received via Mail-SeCure System.
>>
>>
>
>
> --
> Micha Silver
> http://www.surfaces.co.il/
> Arava Development Co.  +972-52-3665918
>
> ___
> 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.dissolve for lines?

2010-10-20 Thread Micha Silver

 On 20/10/2010 08:36, Markus Metz wrote:

Micha Silver wrote:

Bryan Keith wrote:

Hello,

I have a vector line file that has lots of two-vertex lines.  Many of
these two-vertex lines share endpoints and really just make parts of one
longer line.  I'd like to dissolve these lines into one line when they
have the same end point.  It looks like v.dissolve only works for areas.
Is there somewhere else I should be looking?  Thank you.



Did you have a look at v.build.polylines ?
Additional note: line vectors have a direction. Two line segments with an
equivalent node (end point) will *not* connect if they are in opposite
directions.

Each line has two nodes, one at the start and one at the end. If at
the end of one line any other line is starting or ending, this other
line is added to the first line, reversing the direction if necessary.
IOW, two lines with a common node will indeed connect, and the
direction of one line may need to be reversed (done automatically).
Very simple to test by digitizing a simple test vector.


Heh, thanks for the correction!
Was this always the case? I seem to remember not be able to 
merge lines unless they were connected in the same direction.
How does the line reversal work? That is, Which of the two 
line segments is chosen be get reversed?

Regards,
Micha


In this case you can try the v.edit tool=flip option (on those

segments only)

Should not be needed as pre-processing step for v.build.polylines.


Markus M

This mail was received via Mail-SeCure System.





--
Micha Silver
http://www.surfaces.co.il/
Arava Development Co.  +972-52-3665918

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


[GRASS-user] Using r.reclass

2010-10-20 Thread katrin eggert
Hi

I have a raster image that ranges from 1-300 and I want to apply reclass in
order to reclass this image. But I only want to change 10 values
(1,10,12,15, 100, 130, 200, 230, 250,290) and the rest I want them to be
Null. in the rules file, shall I include the rest of the values and
attribute them the null() value or what shall I do?

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