[GRASS-dev] export question

I am trying to export an image to an excel file having lat, long, rgb values
for all the points on the image. Does anyone know where I should look, have
some idea...any help would be greatly appreciated

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/export-question-tp6777072p6777072.html
Sent from the Grass - Dev mailing list archive at Nabble.com.

You could try r.out.xyz for each layer , then join the columns .

http://grass.fbk.eu/grass64/manuals/html64_user/r.out.xyz.html
Doug Newcomb
USFWS
Raleigh, NC
919-856-4520 ext. 14 doug_newcomb@fws.gov

The opinions I express are my own and are not representative of the official policy of the U.S.Fish and Wildlife Service or Dept. of the Interior. Life is too short for undocumented, proprietary data formats.

sarthakahuja <sarthakahuja@gmail.com>
Sent by: grass-dev-bounces@lists.osgeo.org

09/09/2011 03:37 PM

To

grass-dev@lists.osgeo.org

cc

Subject

[GRASS-dev] export question

I am trying to export an image to an excel file having lat, long, rgb values
for all the points on the image. Does anyone know where I should look, have
some idea...any help would be greatly appreciated

--
View this message in context: ``http://osgeo-org.1803224.n2.nabble.com/export-question-tp6777072p6777072.html
Sent from the Grass - Dev mailing list archive at Nabble.com.
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

thanks a lot, do you know how to get their red, green, blue values (0-255)

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/export-question-tp6777072p6777617.html
Sent from the Grass - Dev mailing list archive at Nabble.com.

sarthakahuja wrote:

thanks a lot, do you know how to get
their red, green, blue values (0-255)

for the basic palette, try the r.colors.out in newer versions of
GRASS.

or create 3 new maps with r.mapcalc's # operator, then r.out.xyz
for those:

r.mapcalc map.red = r#map
r.mapcalc map.green = g#map
r.mapcalc map.blue = b#map

Hamish

sarthakahuja wrote:

I am trying to export an image to an
excel file having lat, long, rgb values
for all the points on the image.

by the way, you'll want to use a very small region or very new
64bit version of Excel or else it won't accept the many rows
which a dump of a raster image creates.

big matrix datasets is why Matlab/Octave/Scilab (& raster GIS) was
invented :wink:

Hamish

Hamish wrote:

r.mapcalc map.red = r#map
r.mapcalc map.green = g#map
r.mapcalc map.blue = b#map

This:

  r.mapcalc "map.red = r#map ; map.green = g#map ; map.blue = b#map"

is more efficient, as it only reads the input map once.

--
Glynn Clements <glynn@gclements.plus.com>

Is this possible using grass jni. I looked into its library but could not
find functions for these commands

http://sorokine.info/grass-jni/htmls/index.html

If not, is there another way I could do this using java

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/export-question-tp6777072p6824719.html
Sent from the Grass - Dev mailing list archive at Nabble.com.

On Fri, Sep 23, 2011 at 5:49 PM, sarthakahuja <sarthakahuja@gmail.com> wrote:

Is this possible using grass jni. I looked into its library but could not
find functions for these commands

http://sorokine.info/grass-jni/htmls/index.html

See http://sorokine.info/grass-jni/ - it is there only for historical reasons.

If not, is there another way I could do this using java

Perhaps through jython in order to use the nice new Python bindings?
Of course also via the new vtk-grass-bridge with JAVA bindings.

See also
http://grass.osgeo.org/wiki/GRASS_and_Java

Markus