[GRASS-user] m.nviz.image: Inconsistant number of attributes

Anna Petrášová kratochanna at gmail.com
Mon Jul 15 00:53:49 PDT 2013


On Fri, Jul 12, 2013 at 3:47 PM, Micha Silver <micha at arava.co.il> wrote:

>  Hi Anna:
>
>
>
> On 7/12/2013 10:00 AM, Anna Petrášová wrote:
>
> Hi,
>
>
> On Wed, Jul 10, 2013 at 2:31 PM, Micha Silver <micha at arava.co.il> wrote:
>
>> Hello all:
>> I'm working on a flood inundation presentation. I need to show a 3D
>> representation of an ortho-photo image with the predicted flood area draped
>> over the ortho-photo.
>> When I first run:
>>
>> m.nviz.image --o elevation_map=dtm color_map=ortho_eilat
>> resolution_fine=2 height=1000 perspective=20 position=0.6,0.95 output=dtmp
>> zexag=4
>> I get:
>> ERROR: Inconsistent number of attributes (<vpoint> 0: <vpoint_position> 3)
>>
>
>  Sorry, this is a bug. It should be fixed in r57072.
>
>
> Good, thanks.
>
>
>
>>
>> so I specified both:
>>      vpoint_position="" vpoint_layer=""
>>
>> Now I get a nice looking 3D of the ortho-photo. But when I try to add
>> another raster, i.e.:
>>      color_map=ortho_eilat,dtmp_nn
>>
>> no matter what combination of additional parameters I try, I always get:
>>
>> ERROR: Inconsistent number of attributes (<elevation_map/elevation_value>
>>        1: <color_map> 2, <color> 0)
>>
>> Any tips on how this should be specified??
>>
>
>  If you want to add more raster maps (surfaces) you have to specify it in
> elevation_map parameter. If you want different color map, specify it in
> color_map but keep in mind that the number of maps in elevation_map and
> color_map should be the same (if you don't use elevation_value for creating
> plane and color for RGB color). In your case I am not sure what you are
> trying to achieve but try:
>
>   ...elevation_map=dtm,dtmp_nn color_map=ortho_eilat,dtmp_nn
>
>
> Yes, that did it.
> I could not find in the docs any reference to multiple maps as
> "elevation_map" and it was not at all intuitive for me. From the parameter
> names, "color_map" and "elevation_map" I understood that the elevation_map
> should be the one (and only) dem. And overlayed color maps would be in the
> "color_map" parameter. But I see I misunderstood.
>
>
there is no better documentation I am afraid, but you can try to use nviz
through wxGUI (3d mode) and load the maps and set the color and there is a
tool in the toolbar to generate the correspondent command for m.nviz.image.
It does not cover all the possibilities but it can be helpful.

For every surface (dem) you can assign only one color map (the default is
the color of the dem). So therefore the command requires to have the same
number of elevation maps and color maps. Apart from this you can also
specify elevation_value which creates a horizontal plane (value is the
height)  and color parameter assigns the surface one color. Number of maps
in 'elevation_map' + number of values in 'elevation_value' = number of
'color_map' + 'color' values. Similar system is for vector maps: when you
specify 2 vector maps (e.g. points), you have to specify also other vector
parameters for 2 maps (e.g.: vpoints_position=0,0,0,0,0,0  (= 3 coordinates
x 2)) and so on. I am aware that this is not ideal solution.

Regards,

Anna

I'll gladly improve the wiki (or man page) if I could get more information
> about this module. Is there any better documentation anywhere? For example,
> why is it necessary that the number of "elevation_maps" be the same as
> "color_maps"??
>
>


> Thanks,
> Micha
>
>   Hope this helps,
>
>  Anna
>
>
>> --
>> Micha Silver
>> GIS Consulting
>> 052-3665918
>> http://www.surfaces.co.il
>>
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>
>
>
> This mail was received via Mail-SeCure System.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20130715/58691211/attachment.html>


More information about the grass-user mailing list