[GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-24 Thread Paolo Cavallini
 Date: Thu, 23 Sep 2010 11:06:21 +0300
 From: Maris Nartiss maris@gmail.com
 Subject: Re: [GRASS-user] Re: QGIS GRASS plugin shadedrelief issue
 To: nunosousa84 nuno_sousa_1...@hotmail.com
 
 Sorry for You.
 You do made backup of important data before messing around with QGIS, right?
 
 You can try to launch GRASS and rebuild vector topology with v.build.
 If it doesn't help - You'r SOL. And don't forget to infrorm QGIS
 developers how well their GRASS support works.
 
 Good luck,
 Maris.

Hi all.
Sorry I was unclear: it is a known bug for QGIS to crash in case of an unclean
vector. There is no indication that QGIS is more inclined to spoil your vector 
than
any other GRASS GUI.
If you stop GRASS while it is writing a vector, problems are likely to occur, 
with
any UI (even from the shell).
You can clean your vector also from within QGIS, by simply running v.build.all.
And yes, backupping data is always a good idea, regardless of what sw you are 
using.

BTW: Maris, why are you trolling around? We do our best, like everybody, to 
improve
the tools we are using, for the benefit of everybody, and it's no fun to read 
your
polemic notes.

All the best.
-- 
Paolo Cavallini: http://www.faunalia.it/pc
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-24 Thread Hamish
Micha wrote:
 We're used to perceiving shadows below and highlights above
 what is being lit. The same holds for a hill-shaded terrain.
 When we see shadows on a slope, it seems to be south facing,
 and highlights appear north facing. So if you place the
 sun at 130° (SE) then you are lighting the south facing
 slope, and making it appear north facing, thus causing the
 valleys to appear to be hills, and the peaks appear as
 valleys. We have a set of ortho-photos that were shot early
 in the morning (sun in the east) and a colleague always
 turns the maps upside down (N pointing down) so that the
 hills and valleys look right.
 The most natural looking hillshading is with azimuth
 between 270 - 315° (W to NW).

note that in most places GRASS uses the cartesian convention of
theta as degrees counter-clockwise from the positive x-axis, not
navigational convention of degrees being measured clockwise from
north.  (convert between the two with '90-angle')


  By the way GRASS as any map composer like QGIS to be able to
  finish the work (put scale bar, north, legend, title,...)?
    
 Yes, QGIS is a good choice. GRASS does have a full set of
 map composer tools, but some graphic elements require a bit
 more fiddling to get them right. Mind you, the results can
 be quite rewarding.

(see the help pages for the d.* modules and ps.map, and the
cartography section of the grass web site)


Hamish




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


Re: [GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-23 Thread Maris Nartiss
Sorry for You.
You do made backup of important data before messing around with QGIS, right?

You can try to launch GRASS and rebuild vector topology with v.build.
If it doesn't help - You'r SOL. And don't forget to infrorm QGIS
developers how well their GRASS support works.

Good luck,
Maris.


2010/9/22, nunosousa84 nuno_sousa_1...@hotmail.com:

 I can't believe this a nightmare just happened! This is ubelivable. Suddenly
 when i was working with the vector layer digitizing the values QGIS just
 crashed puff completely. Run out of the program. I tried to open QGIS it
 started again but opening the vector layers from the GRASS Plugin crashes it
 again, closing QGIS again, suddenly. And the biggest nightmare, this is
 really a nervous breakdown, since i have to deliver this work till suturday,
 the grass vector layers dessapeared from the mapset files!!! I have no
 words, im really afraid i've lost all the work. I still have the grass
 raster layers, well i think. So i think i can do the reverse process (from
 raster to vector) right? The problem is that i lost almost a day just doing
 vector adjustments and suddenly lost all that. Please if can anyone help me.
 Im afraid i wont be able to recover the layers. But how can they desapear!?

 Thank you
 --
 View this message in context:
 http://osgeo-org.1803224.n2.nabble.com/QGIS-GRASS-plugin-shadedrelief-issue-tp5547443p5559644.html
 Sent from the Grass - Users mailing list archive at Nabble.com.
 ___
 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


[GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-23 Thread nunosousa84

Thank you Maris. Well i was able to recover it yesterday. I will put here the
error it gave me than the v.build solution. I have posted this in QGIS
forum:

This is what it gives back:

terminate called after throwing an instance of 'QgsGrass::Exception'
what(): Unable to open vector map cntouca_grassvec...@relevo on level 2.
Try to rebuild vector topology by v.build.
Aborted 

Then i runed v.rebuild:

So i tried v.build:

Coor files of vector map cntouca_grassvec...@relevo is larger than it
should be (551 bytes excess)

Building topology for vector map cntouca_grassvector...

Registering primitives...

540 primitives registered
Number of boundaries: 1

Number of centroids: 0
Building topology for vector map cntouca_grassvectorrebuild2...


Number of centroids: 0

Number of areas: 0

Number of isles: 0

Number of incorrect boundaries: 1

Number of primitives: 1

Number of points: 0

Number of lines: 0

Number of boundaries: 1

0 areas built

0 isles built

Attaching islands...

Attaching centroids...


Number of nodes: 2

Registering primitives...

1 primitives registered

2 vertices registered

Building areas...


Number of areas: 0

Number of isles: 0

Number of incorrect boundaries: 1


23243 vertices registered

Building areas...


0 areas built

0 isles built

Attaching islands...

Attaching centroids...


Number of nodes: 692

Number of primitives: 540

Number of points: 19

Number of lines: 520

So apparently the layer is back again and working, for now :-). It seems the
file (coor) has a storing limit capacity that was surpassed (makes some
sense cause it happened just when i was adding a vector point)? By the way i
notice one think. When trying to open the recovered grass vector layer it
seems he automatically devided it in two (one for the lines and one for the
points). Well the problem is how am i gona edit a line/point layer (to solve
those flat top surfaces)? I could use lines too but the effects would be
similar (flat surfaces but smaller). Im afraid i will have to try your
suggestion Sab (v.digit). I will see it tomorrow morning. For now thank you.

Regards
Nuno

So aparently im stuck to how iam i gona be able to make a point/line layer. 
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/QGIS-GRASS-plugin-shadedrelief-issue-tp5547443p5562140.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-23 Thread Micha Silver

On 09/23/2010 10:18 AM, nunosousa84 wrote:

Thank you Maris. Well i was able to recover it yesterday. I will put here the
error it gave me than the v.build solution. I have posted this in QGIS
forum:

This is what it gives back:

terminate called after throwing an instance of 'QgsGrass::Exception'
what(): Unable to open vector mapcntouca_grassvec...@relevo  on level 2.
Try to rebuild vector topology by v.build.
Aborted 

Then i runed v.rebuild:

So i tried v.build:

Coor files of vector mapcntouca_grassvec...@relevo  is larger than it
should be (551 bytes excess)

Building topology for vector mapcntouca_grassvector...

Registering primitives...

540 primitives registered
Number of boundaries: 1

Number of centroids: 0
Building topology for vector mapcntouca_grassvectorrebuild2...


Number of centroids: 0

Number of areas: 0

Number of isles: 0

Number of incorrect boundaries: 1

Number of primitives: 1

Number of points: 0

Number of lines: 0

Number of boundaries: 1

0 areas built

0 isles built

Attaching islands...

Attaching centroids...


Number of nodes: 2

Registering primitives...

1 primitives registered

2 vertices registered

Building areas...


Number of areas: 0

Number of isles: 0

Number of incorrect boundaries: 1


23243 vertices registered

Building areas...


0 areas built

0 isles built

Attaching islands...

Attaching centroids...


Number of nodes: 692

Number of primitives: 540

Number of points: 19

Number of lines: 520

So apparently the layer is back again and working, for now :-). It seems the
file (coor) has a storing limit capacity that was surpassed (makes some
sense cause it happened just when i was adding a vector point)? By the way i
notice one think. When trying to open the recovered grass vector layer it
seems he automatically devided it in two (one for the lines and one for the
points). Well the problem is how am i gona edit a line/point layer (to solve
those flat top surfaces)? I could use lines too but the effects would be
similar (flat surfaces but smaller). Im afraid i will have to try your
suggestion Sab (v.digit). I will see it tomorrow morning. For now thank you.

   

I think Hamish mentioned this procedure:
First digitize a new point vector map of the peaks, with elevation in an 
attrib. column. Then convert the points to raster, using the elevation 
attribute as raster value. Now merge this new point raster (it should 
have values of zero everywhere except the cells at mountain peaks) with 
your rasterized contours map. And finally recreate the DEM from this 
combined contour+peaks raster.

Regards
Nuno

So aparently im stuck to how iam i gona be able to make a point/line layer.
   



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


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


[GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-23 Thread nunosousa84

yes you're right, my distraction. Well i was able to work it out much more
relaxed now :-) I still think the results from the shaded relief are a bit
odd. For example if use 130º azimuth the river valleys appears above the
near mountains, but if i use degrees between 270 and 0º or between 0 and 90º
the river valleys appear below the rest like it should be. Is it normal? I
will try to post a picture here. Im a bit concerned about this cause i will
create the hidrographic system also (basins, ...). By the way GRASS as any
map composer like QGIS to be able to finish the work (put scale bar, north,
legend, title,...)?
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/QGIS-GRASS-plugin-shadedrelief-issue-tp5547443p5563815.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-23 Thread Markus Neteler
On Thu, Sep 23, 2010 at 3:35 PM, Micha Silver mi...@arava.co.il wrote:
 On 09/23/2010 10:18 AM, nunosousa84 wrote:
...
 By the way i
 notice one think. When trying to open the recovered grass vector layer it
 seems he automatically devided it in two (one for the lines and one for
 the points). Well the problem is how am i gona edit a line/point layer (to
 solve those flat top surfaces)? I could use lines too but the effects would 
 be
 similar (flat surfaces but smaller). Im afraid i will have to try your
 suggestion Sab (v.digit). I will see it tomorrow morning. For now thank
 you.



 I think Hamish mentioned this procedure:
 First digitize a new point vector map of the peaks, with elevation in an
 attrib. column. Then convert the points to raster, using the elevation
 attribute as raster value. Now merge this new point raster (it should have
 values of zero everywhere except the cells at mountain peaks) with your
 rasterized contours map. And finally recreate the DEM from this combined
 contour+peaks raster.
...
 So aparently im stuck to how iam i gona be able to make a point/line
 layer.

Please consider to add suggestions to a Wiki page. We have
 http://grass.osgeo.org/wiki/Digitizing_Area_Features

maybe we need
 http://grass.osgeo.org/wiki/Digitizing_Line_Features
? Would be good to create a best practice collection.

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


Re: [GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-23 Thread Micha Silver

On 09/23/2010 06:46 PM, nunosousa84 wrote:

yes you're right, my distraction. Well i was able to work it out much more
relaxed now :-) I still think the results from the shaded relief are a bit
odd. For example if use 130º azimuth the river valleys appears above the
near mountains, but if i use degrees between 270 and 0º or between 0 and 90º
the river valleys appear below the rest like it should be. Is it normal? I
   
We're used to perceiving shadows below and highlights above what is 
being lit. The same holds for a hill-shaded terrain. When we see shadows 
on a slope, it seems to be south facing, and highlights appear north 
facing. So if you place the sun at 130° (SE) then you are lighting the 
south facing slope, and making it appear north facing, thus causing the 
valleys to appear to be hills, and the peaks appear as valleys. We have 
a set of ortho-photos that were shot early in the morning (sun in the 
east) and a colleague always turns the maps upside down (N pointing 
down) so that the hills and valleys look right.
The most natural looking hillshading is with azimuth between 270 - 
315° (W to NW).

will try to post a picture here. Im a bit concerned about this cause i will
create the hidrographic system also (basins, ...). By the way GRASS as any
map composer like QGIS to be able to finish the work (put scale bar, north,
legend, title,...)?
   
Yes, QGIS is a good choice. GRASS does have a full set of map composer 
tools, but some graphic elements require a bit more fiddling to get them 
right. Mind you, the results can be quite rewarding.



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


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


[GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-22 Thread nunosousa84

I can't believe this a nightmare just happened! This is ubelivable. Suddenly
when i was working with the vector layer digitizing the values QGIS just
crashed puff completely. Run out of the program. I tried to open QGIS it
started again but opening the vector layers from the GRASS Plugin crashes it
again, closing QGIS again, suddenly. And the biggest nightmare, this is
really a nervous breakdown, since i have to deliver this work till suturday,
the grass vector layers dessapeared from the mapset files!!! I have no
words, im really afraid i've lost all the work. I still have the grass
raster layers, well i think. So i think i can do the reverse process (from
raster to vector) right? The problem is that i lost almost a day just doing
vector adjustments and suddenly lost all that. Please if can anyone help me.
Im afraid i wont be able to recover the layers. But how can they desapear!?

Thank you
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/QGIS-GRASS-plugin-shadedrelief-issue-tp5547443p5559644.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-21 Thread Micha Silver

On 20/09/2010 23:39, nunosousa84 wrote:

Thank you Micha. Just to confirm that the output of slope module is:

total null and non-null cells: 2256660
total null cells: 6164
   
These null cells should be *only* around the edges, where there is not a 
3X3 window to calculate the slope. By default they'll show in an orange 
color in the display.

Of the non-null cells:
--
n: 2250496
minimum: 0
maximum: 78.8343
range: 78.8343
   
That's a pretty steep maximum slope. 78% slope is almost vertical.  I 
wonder if the black spots are just very dark- that is points with a very 
steep slope, i.e. a cliff, that correctly show in a dark shade?

Again these might be some misses in the digitizing process.

mean: 29.4765
mean of absolute values: 29.4765
standard deviation: 17.1799
variance: 295.148
variation coefficient: 58.2834 %
sum: 66336658.9338117689

I dont know maybe there is something wrong with my digitizing. Besides this
problem do you think the result of the shaded relief command is acceptable?
   
Well, that you'll have to say. You can improve the mesa tops effect by 
adding point altitudes to the contour vector at the peaks. See the 
manual page, and Hamish's explanation earlier.

I dont know but it seems some parts of the map reveals some geometric
artifacts, sometimes cutting through.
   



--
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] Re: QGIS GRASS plugin shadedrelief issue

2010-09-21 Thread Hamish
Nuno wrote:
 For all this steps i worked directly through
 GRASS 6.4 0RC6 and not QGIS. I have opened the grass raster
 layer with the contours (lines) and applyed the commands
 suggested:
 http://grass.osgeo.org/wiki/Contour_lines_to_DEM

 The result was this:
 http://osgeo-org.1803224.n2.nabble.com/file/n5549840/shadedtest1.jpg

that looks much better!

 Well it seems the terrace effect desappeared but there are
 some glintches, do you think its normal?

which glitches? the slight thatched-roof look? perhaps a quick
3x3 r.neighbors smoothing filer could fix that? maybe there is
an off-by-one bug somewhere that's causing that effect at the
contour lines; something for us to look at after floating point
and NULL support I guess.

 Concerning the flat mesa tops they look really ugly, any
 suggestion how to remake/remodel them?
 I suppose i have to go to the original geotiff topography chart
 and remake some vector lines to overcome that problem? What
 should i do?

As for the mesa effect, that is because there is no input data
above it, and unlike a spine interpolation it has no memory about
the slope, so above the highest elevation contour given it does
not know to go any higher. As suggested by the r.surf.contour help
page, it really helps to digitize some trig station / mountain
peak elevation data and if possible spot elevations along ridge
lines to help with that. hopefully your scanned topo map has
some of that information.

individual raster cells are ok, they don't have to be lines.
('v.to.rast type=points' + r.patch to join the points and vector
lines rasters)


 About the blackspots and the color table im not sure but
 changing it doesnt overcome the problem, the spots remain the
 same.

I'm not seeing them in the new version.. ?


 About the Region Settings they were set in QGIS. Since the
 region im working is fairly small i used this parameters:
 N-S Res = 1.00014 and E-W Res = 1.00024 (I think this is the
 minimum resolution supported).

grass doesn't really have a minimum or maximum resolution, just
that a huge number of cells (  40,000 x 40,000 ) can be very
slow and take lots of RAM and disk space; and at the other end
the minimum you can have is 1x1 cell.

In grass you can try 'g.region -a res=1' to round outward to
whole numbers.

 One problem i noticed and it might be a QGIS bug is that
 everytime i open QGIS or add a layer it resets the
 projection/coordination values (For example im using
 Datum ED50 UTM zone 29 international ellipsoid but when i
 open a layer or QGIS it always resets this values to others).

no idea, you'd have to ask a qgis expert about that.

grass Locations are locked to all maps using a single map
projection and you need to use r.proj, v.proj to move them
between different ones.


Hamish



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


[GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-21 Thread nunosousa84

One more thank you for your patient :-). I just noticed (believe me i was
sleeping, hehehe) that all the vector lines don't snap to the region
boundaries. Well let me explain with an image:
http://osgeo-org.1803224.n2.nabble.com/file/n299/Vectorlinesnotouching.jpeg 

You can see the vectorized lines not touching the region margins/boundaries.
Could this be part of the problem? can i readapt the region settings to fit
the lines or have to extend the lines?

Regards

  Nuno
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/QGIS-GRASS-plugin-shadedrelief-issue-tp5547443p299.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-21 Thread nunosousa84

Ok solved the problem of the null-cells. Did g.region.zoom to the
shadedrelief layer and shrink the region boundaries, so now r.univar gives 0
null-cells :-). But i think i still have to solve the vector/raster lines
problem that might be causing some artifacts on the boundaries of the map.
Maybe extend them till they reach the region line?. Otherwise it seems to
drag the values till they reach the region boundary.
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/QGIS-GRASS-plugin-shadedrelief-issue-tp5547443p565.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-21 Thread Hamish
nuno wrote:
 One more thank you for your patient :-). I just noticed
 (believe me i was
 sleeping, hehehe) that all the vector lines don't snap to
 the region
 boundaries. Well let me explain with an image:
 http://osgeo-org.1803224.n2.nabble.com/file/n299/Vectorlinesnotouching.jpeg


no, I don't think the vector line snapping is a problem.

it seems that the black areas are slope independent and all north-
facing aspect. I'm strongly betting on the just-out-of-range
color map as the cause of the holes. 

e.g. range is floating point but max used in the color table
is truncated to the integer just below the max. and anything
out of range looks like a whole. I'd have expect those to be
white though oh well. perhaps try tweaking the $MAPSET/colr/
file by hand and see if it helps.


Hamish



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


Re: [GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-21 Thread Hamish
nuno:
 Ok solved the problem of the null-cells. Did g.region.zoom
 to the shadedrelief layer and shrink the region boundaries, so
 now r.univar gives 0 null-cells :-).

great

 But i think i still have to solve the vector/raster lines
 problem that might be causing some artifacts on the boundaries
 of the map.
 Maybe extend them till they reach the region line?.
 Otherwise it seems to drag the values till they reach the
 region boundary.

perhaps just crop off a few edge cells and forget about them..?


Hamish



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


Re: [GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-20 Thread Micha Silver

On 19/09/2010 22:26, Hamish wrote:


I wonder if the black-spots are a color table problem? what does
r.univar say about the shaded relief map?
   
That's what just occurred to me. If the spots just magically disappear 
in GRASS, then try setting a different colormap in QGIS.

Micha



Hamish




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

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] Re: QGIS GRASS plugin shadedrelief issue

2010-09-20 Thread nunosousa84

Thank you all. Well i have some news. Hamish i have followed your suggestion
of using the mapcalc commands. For all this steps i worked directly through
GRASS 6.4 0RC6 and not QGIS. I have opened the grass raster layer with the
contours (lines) and applyed the commands suggested:
http://grass.osgeo.org/wiki/Contour_lines_to_DEM
The result was this:
http://osgeo-org.1803224.n2.nabble.com/file/n5549840/shadedtest1.jpg 
Well it seems the terrace effect desappeared but there are some glintches,
do you think its normal?
Concerning the flat mesa tops they look really ugly, any suggestion how to
remake/remodel them? I suppose i have to go to the original geotiff
topography chart and remake some vector lines to overcome that problem? What
should i do?

About the blackspots and the color table im not sure but changing it doesnt
overcome the problem, the spots remain the same. Here it is the r.univar
report of the shadedrelief layer:

total null and non-null cells: 2256660

total null cells: 6164



Of the non-null cells:

--

n: 2250496

minimum: -75.1119

maximum: 100

range: 175.112

mean: 42.1701

mean of absolute values: 48.816

standard deviation: 35.304

variance: 1246.37

variation coefficient: 83.718 %

sum: 94903752.6220222563

Now to the strange issue (QGIS Shaded Relief Plugin). Remember the error i
posted earlier? Well it seems i was able to work with that plugin but only
after i run the surf contour layer in GRASS. Let me explain i redone the
steps decribed before as suggested by Hamish (mapcalc, surfcontour,etc...),
all in GRASS 6.4 0RC6. Then changed to QGIS, opened the layer just made in
GRASS and run the QGIS Shaded Relief Plugin. Now it worked.
About the Region Settings they were set in QGIS. Since the region im working
is fairly small i used this parameters: N-S Res = 1.00014 and E-W Res =
1.00024 (I think this is the minimum resolution supported). One problem i
noticed and it might be a QGIS bug is that everytime i open QGIS or add a
layer it resets the projection/coordination values (For example im using
Datum ED50 UTM zone 29 international ellipsoid but when i open a layer or
QGIS it always resets this values to others). Maybe i should save this
parameters directly in GRASS? My dificulty is how, there are so many
commands for a begginer :-)

Regards and thank you

  Nuno
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/QGIS-GRASS-plugin-shadedrelief-issue-tp5547443p5549840.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-20 Thread Micha Silver

On 20/09/2010 12:32, nunosousa84 wrote:

Thank you all. Well i have some news. Hamish i have followed your suggestion
of using the mapcalc commands. For all this steps i worked directly through
GRASS 6.4 0RC6 and not QGIS. I have opened the grass raster layer with the
contours (lines) and applyed the commands suggested:
http://grass.osgeo.org/wiki/Contour_lines_to_DEM
The result was this:
http://osgeo-org.1803224.n2.nabble.com/file/n5549840/shadedtest1.jpg
Well it seems the terrace effect desappeared but there are some glintches,
do you think its normal?
Concerning the flat mesa tops they look really ugly, any suggestion how to
remake/remodel them? I suppose i have to go to the original geotiff
topography chart and remake some vector lines to overcome that problem? What
should i do?

About the blackspots and the color table im not sure but changing it doesnt
overcome the problem, the spots remain the same. Here it is the r.univar
report of the shadedrelief layer:

total null and non-null cells: 2256660

total null cells: 6164
   
There must be your black spots. But why you are getting null values, I 
can't say. Is it possible that you have accidentally made some contour 
lines that cross or touch?



Of the non-null cells:

--

n: 2250496

minimum: -75.1119

maximum: 100

range: 175.112

mean: 42.1701

mean of absolute values: 48.816

standard deviation: 35.304

variance: 1246.37

variation coefficient: 83.718 %

sum: 94903752.6220222563

Now to the strange issue (QGIS Shaded Relief Plugin). Remember the error i
posted earlier? Well it seems i was able to work with that plugin but only
after i run the surf contour layer in GRASS. Let me explain i redone the
steps decribed before as suggested by Hamish (mapcalc, surfcontour,etc...),
all in GRASS 6.4 0RC6. Then changed to QGIS, opened the layer just made in
GRASS and run the QGIS Shaded Relief Plugin. Now it worked.
About the Region Settings they were set in QGIS. Since the region im working
is fairly small i used this parameters: N-S Res = 1.00014 and E-W Res =
1.00024 (I think this is the minimum resolution supported). One problem i
noticed and it might be a QGIS bug is that everytime i open QGIS or add a
layer it resets the projection/coordination values (For example im using
Datum ED50 UTM zone 29 international ellipsoid but when i open a layer or
QGIS it always resets this values to others). Maybe i should save this
parameters directly in GRASS? My dificulty is how, there are so many
commands for a begginer :-)

Regards and thank you

   Nuno
   



--
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] Re: QGIS GRASS plugin shadedrelief issue

2010-09-20 Thread nunosousa84

Good question Micha. Well i remember i checked the vector lines after
completing them (things like not crossing, not touching and confirming that
all of the lines has attributes to them, in this case altitude values). Then
i checked overlapping raster contours in relation to the vector lines to see
if there was any deviance from the original vector lines. I cant find any
problem with this. mmm... what could it be? Somekind of overlapping cells? 
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/QGIS-GRASS-plugin-shadedrelief-issue-tp5547443p5550439.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-20 Thread Micha Silver

nunosousa84 wrote:


Good question Micha. Well i remember i checked the vector lines after
completing them (things like not crossing, not touching and confirming that
all of the lines has attributes to them, in this case altitude values). Then
i checked overlapping raster contours in relation to the vector lines to see
if there was any deviance from the original vector lines. I cant find any
problem with this. mmm... what could it be? Somekind of overlapping cells? 
  
The way you can check is with v.clean. It has an option to break line 
vector at all line crossings and create a point vector of the crossings:
v.clean your contour line vector out=contour_clean tool=break 
err=crossings


If the resulting crossings vector has any points, compare them with the 
black spots.

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


[GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-20 Thread nunosousa84

Here are the results:

http://osgeo-org.1803224.n2.nabble.com/file/n5551158/cleanresult.jpeg 

Well im not sure but at first glance doesnt seem to have much relation. This
vector points layer that appear after runing the v.clean command shows also
possible duplication of lines or just crossing lines? I have made a zoom to
the vector lines where those 11 vector points are located and dont seem to
recognize the problem.

Here goes the comparation results for both r.surf.contour layer and shaded
relief layer, using the r.univar query:

(surfcontour layer)

total null and non-null cells: 2256660
total null cells: 0
Of the non-null cells:
--
n: 2256660
minimum: 430
maximum: 760
range: 330
mean: 541.46
mean of absolute values: 541.46
standard deviation: 66.726
variance: 4452.36
variation coefficient: 12.3234 %
sum: 1221890343.312690258

---//
(shadedrelief layer)

total null and non-null cells: 2256660
total null cells: 6164
Of the non-null cells:
--
n: 2250496
minimum: -75.1119
maximum: 100
range: 175.112
mean: 42.1701
mean of absolute values: 48.816
standard deviation: 35.304
variance: 1246.37
variation coefficient: 83.718 %
sum: 94903752.6220222563

It seems only when i run the command shaded relief that null cells appears.
Is it normal?

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/QGIS-GRASS-plugin-shadedrelief-issue-tp5547443p5551158.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-20 Thread nunosousa84

Thank you Micha. Just to confirm that the output of slope module is:

total null and non-null cells: 2256660
total null cells: 6164
Of the non-null cells:
--
n: 2250496
minimum: 0
maximum: 78.8343
range: 78.8343
mean: 29.4765
mean of absolute values: 29.4765
standard deviation: 17.1799
variance: 295.148
variation coefficient: 58.2834 %
sum: 66336658.9338117689

I dont know maybe there is something wrong with my digitizing. Besides this
problem do you think the result of the shaded relief command is acceptable?
I dont know but it seems some parts of the map reveals some geometric
artifacts, sometimes cutting through. 
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/QGIS-GRASS-plugin-shadedrelief-issue-tp5547443p5552430.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-19 Thread nunosousa84

Sorry didnt understand. You mean the GRASS plugin? available in QGIS. Plugins
- Manage Plugins - Grass. Thats what im using. Working inside QGIS but
through GRASS plugin. Sorry for any misunderstanding.

Nuno
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/QGIS-GRASS-plugin-shadedrelief-issue-tp5547443p5547491.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-19 Thread Saber Razmjooei
There is a native QGIS plugins:
http://spatialserver.net/pyqgis_1.0/contributed/shadedrelief.zip

To activate it in QGIS:
Fetch Plugins, a new window will pop up:
Click on Repositories tab
Add 3rd Party repository
Click on Plugins
Install DEM relief Shader

You should be able to create relief shade as TIFF format from your dem.

Cheers
Sab

On Sun, 2010-09-19 at 04:37 -0700, nunosousa84 wrote:
 Sorry didnt understand. You mean the GRASS plugin? available in QGIS. Plugins
 - Manage Plugins - Grass. Thats what im using. Working inside QGIS but
 through GRASS plugin. Sorry for any misunderstanding.
 
 Nuno


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


[GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-19 Thread nunosousa84

Thank you Sab. I have tried to use the shaded relief plugin but it gives the
following error:

An error has occured while executing Python code:

Traceback (most recent call last):
  File /home/nmc/.qgis//python/plugins/shadedrelief/ShadedReliefDialog.py,
line 82, in accept
myEngine.run()
  File /home/nmc/.qgis//python/plugins/shadedrelief/ShadedReliefEngine.py,
line 118, in run
self.outFileParam=os.path.normpath(str(self.outFileParam))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xc1' in position
10: ordinal not in range(128)

Python version:
2.6.5 (r265:79063, Apr 16 2010, 13:28:26) 
[GCC 4.4.3]

Python path: ['/usr/share/qgis/python', '/home/nmc/.qgis//python',
'/home/nmc/.qgis//python/plugins', '/usr/share/qgis/python/plugins',
'/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2',
'/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old',
'/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages',
'/usr/lib/python2.6/dist-packages/PIL',
'/usr/lib/python2.6/dist-packages/gst-0.10', '/usr/lib/pymodules/python2.6',
'/usr/lib/python2.6/dist-packages/gtk-2.0',
'/usr/lib/pymodules/python2.6/gtk-2.0',
'/usr/local/lib/python2.6/dist-packages',
'/usr/share/qgis/python/plugins/fTools/tools']

Any help interpret this?

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/QGIS-GRASS-plugin-shadedrelief-issue-tp5547443p5547792.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-19 Thread nunosousa84

i created a surface from rasterized contours (r.surf.contour). Yes i have
acess to them i made them myself. First i created vector lines on top of a
topography chart (digital geotiff) in QGIS. From then on i worked with GRASS
plugin. Imported vector layer to GRASS, converted to Raster, used
r.surf.contour and then r.shaded.relief. Following your suggestion I have
tried v.surf.rst using my vector lines layer and the result seems more
smooth, but those black spots still appear, more or less, depending on the
value (degrees) of the altitude in relation to the horizon. By the way Sab
im still having dificulties running shaded relief plugin even after
installing python-numpy.
Thank you

  Nuno
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/QGIS-GRASS-plugin-shadedrelief-issue-tp5547443p5547899.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-19 Thread nunosousa84

Well i dont know what to say but this is what i got working directly through
GRASS 6.4.0RC6:

http://osgeo-org.1803224.n2.nabble.com/file/n5548006/Grasstest.jpg 

Opening the same layer through QGIS gives those black holes/spots but
through GRASS not. 
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/QGIS-GRASS-plugin-shadedrelief-issue-tp5547443p5548006.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-19 Thread Micha Silver

On 09/19/2010 06:47 PM, nunosousa84 wrote:

Well i dont know what to say but this is what i got working directly through
GRASS 6.4.0RC6:

http://osgeo-org.1803224.n2.nabble.com/file/n5548006/Grasstest.jpg

Opening the same layer through QGIS gives those black holes/spots but
through GRASS not.
   

Interesting...
So you're saying that running r.shaded.relief with the QGIS GRASS plugin 
gives different results than running the module directly in GRASS?


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


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


[GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-19 Thread nunosousa84

Thats totally correct in what concerns those black holes/spots disapearing,
besides that the results seem similar using r.shaded.relief or v.surf.rst as
you suggested, in both GRASS plugin and GRASS. I normally dont work directly
with grass, i find for now, since im a begginer, more easy to work with the
grass plugin in QGIS. But i said to me well lets try and run these layers in
GRASS. What i've found is that not only runing modules in GRASS makes those
spots disappear instantanly but also just opening a layer that was
previously manipulated in QGIS GRASS plugin, gives the same result. By the
way this last image was using v.surf.rst through GRASS 6.4.0RC6

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/QGIS-GRASS-plugin-shadedrelief-issue-tp5547443p5548253.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Re: QGIS GRASS plugin shadedrelief issue

2010-09-19 Thread Hamish
Sab wrote:
 There is a native QGIS plugins:
 http://spatialserver.net/pyqgis_1.0/contributed/shadedrelief.zip
 
 To activate it in QGIS:
 Fetch Plugins, a new window will pop up:
 Click on Repositories tab
 Add 3rd Party repository
 Click on Plugins
 Install DEM relief Shader
 
 You should be able to create relief shade as TIFF format
 from your dem.

note that (gdaldem/hillshade) is just based on repackaged GRASS
algorithms, so a problem in one might also be seen in the other.


- see  http://grass.osgeo.org/wiki/Contour_lines_to_DEM

r.surf.contour is the right tool to use here, but the user should
pull off peak heights from the original topo map scan so that
above the top contour is not a flat mesa. also the trick shown
on that page should be used to multiply by a large number before
running it, and then divide afterwards, to avoid the terracing
effect which is caused by r.surf.contour only working with
integer heights so far.

I wonder if the black-spots are a color table problem? what does
r.univar say about the shaded relief map?

before running v.surf.rst (or any raster op.) be sure to run
g.region to set up the computational region as desired. maybe
your original topo map scan gives good values to match, although
you'll probably want the resolution to be a nice round number
(use the g.region res=.. -a flag).


Hamish



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