Details Ticket 1232


Comment | Reply | Take | Resolve


Serial Number 1232
Subject r.in.* raw image + LL loc'n = illegal latitudes
Area wish6
Queue grass
Requestors kevin.slover@noaa.gov
Owner none
Status open
Last User Contact Tue Jul 4 14:39:23 2006 (2 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Fri Dec 1 07:58:34 2006 (2 yr ago)
Created Wed Aug 14 14:52:13 2002 (6 yr ago)

Transaction History Ticket 1232


Wed, Aug 14 2002 14:52:13    Request created by guest  
Subject: r.out.ppm3 improperly registers 

Platform: GNU/Linux/i386
grass obtained from: Mirror of Trento site
grass binary for platform: Compiled from Sources
GRASS Version: 5.0pre5

Using the r.out.ppm3 option impropery registers.  I attempted to reimport the
ppm image, without changing region parameters, and get:

WARNING: G_set_window(): Illegal latitude for North
ERROR: region for current mapset is invalid
       line 3: <north: 1866N>
       run "g.region"

Of course, a latitude 1866N is not proper.  The original rgb rasters display
properly, and running r.info, find that they have lat/lon's that are reasonable.
Wed, Aug 14 2002 16:16:04    Mail sent by Kevin.Slover@noaa.gov  
Return-Path <kevin.slover@noaa.gov>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <3D5A6619.28C5E167@noaa.gov>
Date Wed, 14 Aug 2002 10:15:54 -0400
From "Kevin Slover" <Kevin.Slover@noaa.gov>
Organization TPC/TSB
X-Mailer Mozilla 4.79 [en] (Windows NT 5.0; U)
X-Accept-Language en
MIME-Version 1.0
To Request Tracker <grass-bugs@intevation.de>
Subject Re: [bug #1232] (grass) r.out.ppm3 improperly registers
References <20020814125213.591F2139C8@lists.intevation.de>
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Spam-Status No, hits=0.0 required=5.0 tests= version=2.20
X-Spam-Level
in further looking at the file created, have noticed several other "interesting"
problems.

The code has fprintf (fp, '# N=%f, S=%f, E=%f, W=%f\n", w.north, w.south, w.east,
w.west);

However, in looking at the ppm, I was able to read the header info.  There were
no references to S,E, nor W.  Also, it looks as if the code is not placing
decimal places, as 1866N is supposed to be 18.66N.  My C programming skill are
little to none.  I have played with the output formatting, but to no avail.


Request Tracker wrote:

> this bug's URL: http://intevation.de/rt/webrt?serial_num=1232
>
>         Greetings,
>
>         This message has been automatically generated in response to your
> message regarding "r.out.ppm3 improperly registers ", the content of which
appears below.  There is
> no need to reply to it now. Request Tracker has received your message and
> it has been assigned a ticket ID of [bug #1232]. Please
> include the string
>
>           [bug #1232]
>
>         in the subject line of all future correspondence about this
> problem. To do so, you may reply to this message.
>
>
>                         Thank you,
>
>                         Request Tracker
>
>
> -------------------------------------------------------------------------
> Subject: r.out.ppm3 improperly registers
>
> Platform: GNU/Linux/i386
> grass obtained from: Mirror of Trento site
> grass binary for platform: Compiled from Sources
> GRASS Version: 5.0pre5
>
> Using the r.out.ppm3 option impropery registers.  I attempted to reimport the
ppm image, without changing region parameters, and get:
>
> WARNING: G_set_window(): Illegal latitude for North
> ERROR: region for current mapset is invalid
>        line 3: <north: 1866N>
>        run "g.region"
>
> Of course, a latitude 1866N is not proper.  The original rgb rasters display
properly, and running r.info, find that they have lat/lon's that are reasonable.
>
> -------------------------------------------- Managed by Request Tracker

--
LTJG Kevin Slover, NOAA
GIS Specialist/Oceanographer
NOAA/TPC/TSB/Storm Surge Unit
11691 SW 17th Street
Miami FL  33165

W (305) 229-4456


Wed, Aug 14 2002 16:58:01    Mail sent by Kevin.Slover@noaa.gov  
Return-Path <kevin.slover@noaa.gov>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <3D5A6FF5.3114EBD3@noaa.gov>
Date Wed, 14 Aug 2002 10:57:57 -0400
From "Kevin Slover" <Kevin.Slover@noaa.gov>
Organization TPC/TSB
X-Mailer Mozilla 4.79 [en] (Windows NT 5.0; U)
X-Accept-Language en
MIME-Version 1.0
To Request Tracker <grass-bugs@intevation.de>
Subject Re: [bug #1232] (grass) r.out.ppm3 improperly registers
References <20020814125213.591F2139C8@lists.intevation.de>
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Spam-Status No, hits=0.0 required=5.0 tests= version=2.20
X-Spam-Level
Sorry to continue to email regarding this issue, just going through the thought
processes, seeing if it rings a bell in anyone's mind.

I realize now where the r.in.ppm command is going wrong.  It appears to be setting
the N latitude using the rows.  So, my dumb question is, are ppm files
georegistered?  I would assume yes, since it is looking for a north latitude...
Again, I apologize for these emails.  If there is a better way to do this, then
please, tell.


Request Tracker wrote:

> this bug's URL: http://intevation.de/rt/webrt?serial_num=1232
>
>         Greetings,
>
>         This message has been automatically generated in response to your
> message regarding "r.out.ppm3 improperly registers ", the content of which
appears below.  There is
> no need to reply to it now. Request Tracker has received your message and
> it has been assigned a ticket ID of [bug #1232]. Please
> include the string
>
>           [bug #1232]
>
>         in the subject line of all future correspondence about this
> problem. To do so, you may reply to this message.
>
>
>                         Thank you,
>
>                         Request Tracker
>
>
> -------------------------------------------------------------------------
> Subject: r.out.ppm3 improperly registers
>
> Platform: GNU/Linux/i386
> grass obtained from: Mirror of Trento site
> grass binary for platform: Compiled from Sources
> GRASS Version: 5.0pre5
>
> Using the r.out.ppm3 option impropery registers.  I attempted to reimport the
ppm image, without changing region parameters, and get:
>
> WARNING: G_set_window(): Illegal latitude for North
> ERROR: region for current mapset is invalid
>        line 3: <north: 1866N>
>        run "g.region"
>
> Of course, a latitude 1866N is not proper.  The original rgb rasters display
properly, and running r.info, find that they have lat/lon's that are reasonable.
>
> -------------------------------------------- Managed by Request Tracker

--
LTJG Kevin Slover, NOAA
GIS Specialist/Oceanographer
NOAA/TPC/TSB/Storm Surge Unit
11691 SW 17th Street
Miami FL  33165

W (305) 229-4456


Thu, Aug 15 2002 00:10:58    Mail sent by glynn.clements@virgin.net  
Return-Path <glynn.clements@virgin.net>
Delivered-To grass-bugs@lists.intevation.de
From Glynn Clements <glynn.clements@virgin.net>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Message-ID <15706.52173.941368.413081@cerise.nosuchdomain.co.uk>
Date Wed, 14 Aug 2002 22:29:49 +0100
To Request Tracker <grass-bugs@intevation.de>
Cc grass5@grass.itc.it
Subject Re: [GRASS5] [bug #1232] (grass) r.out.ppm3 improperly registers
In-Reply-To <20020814125213.6AE3713A21@lists.intevation.de>
References <20020814125213.6AE3713A21@lists.intevation.de>
X-Mailer VM 6.94 under 21.4 (patch 4) "Artificial Intelligence (candidate #1)" XEmacs Lucid
X-Spam-Status No, hits=-4.4 required=5.0 tests=IN_REP_TO version=2.20
X-Spam-Level
Request Tracker wrote:

> Subject: r.out.ppm3 improperly registers 
> 
> Platform: GNU/Linux/i386
> grass obtained from: Mirror of Trento site
> grass binary for platform: Compiled from Sources
> GRASS Version: 5.0pre5
> 
> Using the r.out.ppm3 option impropery registers. I attempted to
> reimport the ppm image, without changing region parameters, and get:
> 
> WARNING: G_set_window(): Illegal latitude for North
> ERROR: region for current mapset is invalid
>        line 3: <north: 1866N>
>        run "g.region"
> 
> Of course, a latitude 1866N is not proper. The original rgb rasters
> display properly, and running r.info, find that they have lat/lon's
> that are reasonable.

Note that the problem is with r.in.ppm, not r.out.ppm3. The PPM file
is unregistered. r.in.ppm (in fact, most r.in.* commands) set the
region to [0,0,width,height] prior to importing; clearly, this doesn't
work for lat-lon regions (unless the image is smaller than 180x90
pixels).

I started looking into this after Eric (IIRC) fixed r.in.tiff. I
didn't entirely understand the consequences of Eric's chosen fix (set
the projection to X-Y while importing), so I started looking deeper.
Then I got sidetracked, and forgot all about it :( .

It may be possible (although messy) to work around the problem
by switching projections manually.

-- 
Glynn Clements <glynn.clements@virgin.net>


Tue, Jul 4 2006 14:39:23    Mail sent by guest  
Hi,

does this bug still apply in GRASS 6.1?

Markus
Fri, Dec 1 2006 07:49:45    Comments added by hbowman  
The general issue still applies in GRASS 6.2.0+.


Hamish
Fri, Dec 1 2006 07:57:24    Comments added by hbowman  
i.e. you can't import an unregistered image in a lat/lon location when the
image is bigger than +90 pixels tall.

this makes some sense, as coords are XY data not lat/lon values.

If the image is registered (GeoTIFF) or has a "world file" r.in.gdal will do
its magic and it will import ok.

r.in.* should fail nicely though, with an error message that gives the user a
hint that they are trying to fit a square peg into a round hole, and to import
it into an XY location instead.


Hamish
Fri, Dec 1 2006 07:57:37    Area changed to wish6 by hbowman  
Fri, Dec 1 2006 07:58:34    Subject changed to r.in.* raw image + LL loc'n = illegal latitudes by hbowman  
Comment | Reply | Take | Resolve

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request