[GRASS-dev] GRASS GIS Map Display

First, keep in mind that GRASS is a GIS, not a graphics program. So you can't just "display" any graphics file. That is not the purpose of GRASS software.

You can visualize a graphics file in the GRASS GIS environment by importing it into an XY location--i.e., where pixel coordinates are not tied to an earth coordinate system.

If you want to orient a map that comes in a graphic file format (e.g., a scanned map) so that it can be used in a GIS, you will need to georeference it so that each pixel is mapped to a corresponding earth coordinate system. You can use the georeferencing wizard in GRASS to do this.

If you want to display a photo of a place on top of a map, GRASS does not do that. You can save a map to a graphics file and then create your photo/map collage in a program like GIMP or Inkscape.

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

On Aug 12, 2011, at 9:00 AM, <grass-dev-request@lists.osgeo.org> <grass-dev-request@lists.osgeo.org> wrote:

Date: Thu, 11 Aug 2011 18:55:45 +0530
From: Sudeep Singh <sudeep495@gmail.com>
Subject: [GRASS-dev] GRASS GIS Map Display
To: GRASS-dev <grass-dev@lists.osgeo.org>
Message-ID:
  <CA+an3RkNANW9ANd8BHk1=DHhqg+ES2Q9ckU9eLUSwR53NyPr0A@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

I want to display an image in GRASS GIS Map Display. I have a PNG file which
I want to display. How should I go about that , if some one has suggestion
for this .

thanks
sudeep

Thank you Michael. The PNG file which I want to display is actually a WMS getmap requests response. Now once I have this reponse from WMS, I want this image returned to be displyed as a layer in GRASS GIS Map Display.

Sudeep

On Thu, Aug 11, 2011 at 11:35 PM, Michael Barton <michael.barton@asu.edu> wrote:

First, keep in mind that GRASS is a GIS, not a graphics program. So you can’t just “display” any graphics file. That is not the purpose of GRASS software.

You can visualize a graphics file in the GRASS GIS environment by importing it into an XY location–i.e., where pixel coordinates are not tied to an earth coordinate system.

If you want to orient a map that comes in a graphic file format (e.g., a scanned map) so that it can be used in a GIS, you will need to georeference it so that each pixel is mapped to a corresponding earth coordinate system. You can use the georeferencing wizard in GRASS to do this.

If you want to display a photo of a place on top of a map, GRASS does not do that. You can save a map to a graphics file and then create your photo/map collage in a program like GIMP or Inkscape.

Michael


C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu

On Aug 12, 2011, at 9:00 AM, <grass-dev-request@lists.osgeo.org> <grass-dev-request@lists.osgeo.org> wrote:

Date: Thu, 11 Aug 2011 18:55:45 +0530
From: Sudeep Singh <sudeep495@gmail.com>
Subject: [GRASS-dev] GRASS GIS Map Display
To: GRASS-dev <grass-dev@lists.osgeo.org>
Message-ID:
<CA+an3RkNANW9ANd8BHk1=DHhqg+ES2Q9ckU9eLUSwR53NyPr0A@mail.gmail.com>
Content-Type: text/plain; charset=“iso-8859-1”

Hi,

I want to display an image in GRASS GIS Map Display. I have a PNG file which
I want to display. How should I go about that , if some one has suggestion
for this .

thanks
sudeep

2011/8/12 Sudeep Singh <sudeep495@gmail.com>:

Thank you Michael. The PNG file which I want to display is actually a WMS
getmap requests response. Now once I have this reponse from WMS, I want this
image returned to be displyed as a layer in GRASS GIS Map Display.

Could you return a geotiff instead a png?

Sudeep

--
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org

Not always, depends on WMS service. Without geotiff any other way to display it ? like i think d.rast does ?

On Fri, Aug 12, 2011 at 12:39 PM, Luca Delucchi <lucadeluge@gmail.com> wrote:

2011/8/12 Sudeep Singh <sudeep495@gmail.com>:

Thank you Michael. The PNG file which I want to display is actually a WMS
getmap requests response. Now once I have this reponse from WMS, I want this
image returned to be displyed as a layer in GRASS GIS Map Display.

Could you return a geotiff instead a png?

Sudeep


ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org

You can view a PNG in most graphic viewers. Probably it will come up in something if you double click it on almost any desktop platform.

d.rast is for displaying GRASS raster files within the GRASS GIS environment. You would need to import the PNG and convert it to a GRASS raster format to display in GRASS. Unless there is some kind of geocoded version of PNG’s (I don’t know of any), the PNG would not be georeferenced and hence not useable in any way for the GIS without some kind of transformation. Nothing would overlay it correctly. This is one of the very important differences between GIS and a graphics program.

Michael


C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax: 480-965-7671(SHESC), 480-727-0709 (CSDC)
www: http://csdc.asu.edu, http://shesc.asu.edu
http://www.public.asu.edu/~cmbarton

On Aug 12, 2011, at 5:49 AM, Sudeep Singh wrote:

Not always, depends on WMS service. Without geotiff any other way to display it ? like i think d.rast does ?

On Fri, Aug 12, 2011 at 12:39 PM, Luca Delucchi <lucadeluge@gmail.com> wrote:

2011/8/12 Sudeep Singh <sudeep495@gmail.com>:

Thank you Michael. The PNG file which I want to display is actually a WMS
getmap requests response. Now once I have this reponse from WMS, I want this
image returned to be displyed as a layer in GRASS GIS Map Display.

Could you return a geotiff instead a png?

Sudeep


ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org

2011/8/12 Sudeep Singh <sudeep495@gmail.com>:

Not always, depends on WMS service. Without geotiff any other way to display
it ? like i think d.rast does ?

I suggest you to see wms_request.py [0] (specially GetTiles() and
__set_options() functions)

[0] http://trac.osgeo.org/grass/browser/grass/trunk/scripts/r.in.wms/wms_request.py

--
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org

Thanks Rashad, Michael and Luca for the suggestions. I am trying with it, if something works out I will post it back. Also Maris suggested to use GRASS_PNG and GRASS_PNGFILE , I am looking into that also. If someone has worked before with GRASS_PNG , please let me know.

thanks
sudeep

On Sat, Aug 13, 2011 at 12:21 PM, Luca Delucchi <lucadeluge@gmail.com> wrote:

2011/8/12 Sudeep Singh <sudeep495@gmail.com>:

Not always, depends on WMS service. Without geotiff any other way to display
it ? like i think d.rast does ?

I suggest you to see wms_request.py [0] (specially GetTiles() and
__set_options() functions)

[0] http://trac.osgeo.org/grass/browser/grass/trunk/scripts/r.in.wms/wms_request.py

ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org

The GRASS PNG driver (e.g., GRASS_PNGFILE) controls GRASS display **output**, not input. There is no problem importing a png into GRASS. But you cannot display a png usefully in a GIS unless it is georeferenced.

Maybe I don't understand your request, but it sounds like you don't understand the difference between a georeferenced, geospatial data file and a graphics image file. This is a fundamental concept for raster GIS.

Michael Barton
School of Human Evolution &Social Change
Center for Social Dynamics & Complexity
Arizona State University

...Sent from my iPad

On Aug 13, 2011, at 4:00 AM, "Sudeep Singh" <sudeep495@gmail.com<mailto:sudeep495@gmail.com>> wrote:

Thanks Rashad, Michael and Luca for the suggestions. I am trying with it, if something works out I will post it back. Also Maris suggested to use GRASS_PNG and GRASS_PNGFILE , I am looking into that also. If someone has worked before with GRASS_PNG , please let me know.

thanks
sudeep

On Sat, Aug 13, 2011 at 12:21 PM, Luca Delucchi <<mailto:lucadeluge@gmail.com>lucadeluge@gmail.com<mailto:lucadeluge@gmail.com>> wrote:
2011/8/12 Sudeep Singh <<mailto:sudeep495@gmail.com>sudeep495@gmail.com<mailto:sudeep495@gmail.com>>:

Not always, depends on WMS service. Without geotiff any other way to display
it ? like i think d.rast does ?

I suggest you to see wms_request.py [0] (specially GetTiles() and
__set_options() functions)

[0] <http://trac.osgeo.org/grass/browser/grass/trunk/scripts/r.in.wms/wms_request.py&gt; http://trac.osgeo.org/grass/browser/grass/trunk/scripts/r.in.wms/wms_request.py

--
ciao
Luca

<http://gis.cri.fmach.it/delucchi/&gt;http://gis.cri.fmach.it/delucchi/
<http://www.lucadelu.org>www.lucadelu.org<http://www.lucadelu.org>