[GRASSLIST:2029] How to enter coordinates on the DEFINE REGION screen

I have searched far and wide and not found any information providing help as to how to enter coordinates in the define region screen. One would think someone somewhere would need help with this basic operation.

By trial and error I managed to figure out how to enter degrees. DD:MM:SS.
Sounds simple, but there are a multitude of ways to describe degrees so luckily I didn't waste too much time on that.

However I am currently struggling with UTM coordinates. How do you enter them on the DEFINE REGION (i.e. start up with a new location) screen.

One problem regardless of the actual syntax: half the time I enter UTM coordinates and the GRASS 5.3 program tells me that the north edge value must be larger than the south edge. Well in my world the UTM values for the south edge are smaller absolute value-wise than for the north edge. And it won't allow me to enter things like "10S544490mE". Help?

So why should I care that GRASS has it's own inverted number system for a region? I just want to define a raster image as being in UTM space.

thank you

    rad

__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge. Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455

radiumfield@netscape.net wrote:

I have searched far and wide and not found any information providing
help as to how to enter coordinates in the define region screen. One
would think someone somewhere would need help with this basic
operation.

By trial and error I managed to figure out how to enter degrees.
DD:MM:SS. Sounds simple, but there are a multitude of ways to describe
degrees so luckily I didn't waste too much time on that.

However I am currently struggling with UTM coordinates. How do you
enter them on the DEFINE REGION (i.e. start up with a new location)
screen.

For everything except lat-lon, coordinates are just decimals (integers
or decimal fractions). For lat-lon, you can use either DD:MM:SS[NSEW]
or decimals.

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

For everything except lat-lon, coordinates are just decimals (integers
or decimal fractions). For lat-lon, you can use either DD:MM:SS[NSEW]
or decimals.

Hello list,
I want to create a new Location, as there is in GRASS manual, I had started by xy location, and define my region by decimals. but when I use g.region -pm it says:
PROJ_INFO file not found for location mtest3.

…I have too much problem for creating new location and import maps to it,
is it possible that I send you all my attempts step by step? and you correct it? maybe it is useful for others.

Best Regards

Maliheh


Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

For everything except lat-lon, coordinates are just decimals (integers
or decimal fractions). For lat-lon, you can use either DD:MM:SS[NSEW]
or decimals.

Hello list,
I want to create a new Location, as there is in GRASS manual, I had started by xy location, and define my region by decimals. but when I use g.region -pm it says:
PROJ_INFO file not found for location mtest3.

…I have too much problem for creating new location and import maps to it,
is it possible that I send you all my attempts step by step? and you correct it? maybe it is useful for others.

Best Regards

Maliheh


Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

Maliheh wrote:

> For everything except lat-lon, coordinates are just decimals (integers
> or decimal fractions). For lat-lon, you can use either DD:MM:SS[NSEW]
> or decimals.

I want to create a new Location, as there is in GRASS manual, I had
started by xy location, and define my region by decimals. but when I
use g.region -pm it says: PROJ_INFO file not found for location
mtest3.

That appears to be a bug in 5.3. It doesn't happen (for me) with
5.0.3, or with locations which have a defined projection. However, in
spite of that message, g.region appears to work OK.

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

Hello list,

Sorry but I have a primary problem yet!

As I wrote it before, I know that at first we should create a xy location, and import a raster map, then transform it to a UTM location, so before use of i.target we should create another location, with UTM coordinate system. Am I right?

If yes, in this step I should create a new location:

DEFINE THE DEFAULT REGION

====== DEFAULT REGION ====

| NORTH EDGE: 35.73581 |

| |

WEST EDGE| | EAST EDGE

51.40387 | | 51.43422

| SOUTH EDGE: 35.71539 |

======================

PROJECTION: 1 (UTM) ZONE: 0

GRID RESOLUTION

East-West: 0.0002042

North-South: 0.0003035

Then it asks me:

à Do you wish to specify a geodetic datum for this location?(y/n) [y]

but my map is a jpg file that I don’t know more detail about it, so I don’t know what should I write for this and next question:

à Please specify ellipsoid name

Enter ‘list’ for the list of available ellipsoids

Hit RETURN to cancel request

As a result at the end of creating new location, GRASS says:

à LOCATION <mtest3_1> created

But the PROJECTION information files were not created!

You must run g.setproj successfully before projection software will work

Would you please help me, I want to create my own location, and work on my maps?

Your response will be so appreciated.

Best Regards

Maliheh


Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

At 11:18 PM 12/21/2003, you wrote:

Hello list,

Sorry but I have a primary problem yet!

As I wrote it before, I know that at first we should create a xy location, and import a raster map, then transform it to a UTM location, so before use of i.target we should create another location, with UTM coordinate system. Am I right?

That depends on what projection your raster map is in. If your raster map is UTM then all you need to do is import it into your location. Is your raster map geo-referenced (does it have a projection)? Do you know what that projection is? What type of raster map are you trying to import - is it an image?

How many map layers do you have? Are they all in the same projection? If you only have one layer, or if all of your map layers are in the same projection, you can ignore datum and ellipsoid.

R

Richard W. Greenwood, PLS
Greenwood Mapping, Inc.
Rich <at> GreenwoodMap <dot> com
(307) 733-0203
http://www.GreenwoodMap.com

Richard Greenwood Rich@GreenwoodMap.com wrote:

At 11:18 PM 12/21/2003, you wrote:

Hello list,

Sorry but I have a primary problem yet!

As I wrote it before, I know that at first we should create a xy location,
and import a raster map, then transform it to a UTM location, so before
use of i.target we should create another location, with UTM coordinate
system. Am I right?

That depends on what projection your raster map is in. If your raster map
is UTM then all you need to do is import it into your location. Is your
raster map geo-referenced (does it have a projection)? Do you know what
that projection is? What type of raster map are you trying to import - is
it an image?

yes it is an image that I’v scanned it, and just I know it’s coordinates, and I want to geo-reference and use it with GRASS, now would you please help me again?

Thanks a lot


Do you Yahoo!?
Yahoo! Photos - Get your photo on the big screen in Times Square

Hello dear GRASS list,

I want to describe my problem from the beginning for you, I wish you can and you want to help me and also it can be helpful for others.

I want to create a new location for my region; I don’t have any digital map that match my need, I have just a paper map and a GPS receiver, with use of gpsdrive I noted coordinates of four points on my map. Gpsdrive shows the coordinates like this:

Latitude: 35.73581 Longitude: 51.40387

And also I know that my region is between 34:52N , 34:21N and 50:10E , 53:10E; and my map scale is 1/12000 and the resolution of scanned map is 100dpi.

Now start the grass5.7 for creation new location:

a. LOCATION: test________ (enter list for a list of locations)

MAPSET: root__________ (or mapsets within a location)

DATABASE: /usr/local/src/GIS/grassdata

b. LOCATION - doesn’t exist

Would you like to create location ? (y/n) y

c. To create a new LOCATION, you will need the following information:

  1. The coordinate system for the database

x, y (for imagery and other unreferenced data)

Latitude-Longitude

UTM

Other Projection

  1. The zone for the UTM database

and all the necessary parameters for projections other than

Latitude-Longitude, x, y, and UTM

  1. The coordinates of the area to become the default region

And the grid resolution of this region

  1. A short, one-line description or title for the location

Do you have all this information for location ? (y/n) y

d. Please specify the coordinate system for location

A x, y

B Latitude - Longitude

C UTM

D Other Projection

RETURN to cancel

A

x, y coordinate system? (y/n) [y] y

e. Please enter a one line description for location

Create a new Location

Create a new Location

Ok? (y/n) [y] y

f. DEFINE THE DEFAULT REGION

====== DEFAULT REGION ====

| NORTH EDGE: 36 |

| |

WEST EDGE | | EAST EDGE

50 | | 53

| SOUTH EDGE: 34 |

======================

PROJECTION: 0 (x, y) ZONE: 0

GRID RESOLUTION

East-West: 0.03

North-South: 0.02

g. projection: 0 (x,y)

zone: 0

north: 36

south: 34

east: 53

west: 50

e-w res: 0.02 (Changed to conform to grid)

n-s res: 0.03 (Changed to conform to grid)

total rows: 100

total cols: 100

total cells: 10000

Do you accept this region? (y/n) [n] > y

LOCATION has been created!

I know that in some steps specially those with red highlight, I’ve done something wrong, but I don’t know how I should correct it. Because when I use g.region –pm, it says: PROJ_INFO file not found for location “test”.
Therefore in other steps like use of r.in.gdal I have problems too.
Would you please help me, it’s so important for me. Your response will be sooooooooo appreciated, and I wish for you the best.
Regards
Maliheh

Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003

Maliheh,

I'm not an expert here but, if you know the lat/long
of your region, why are you creating a XY region and
not a lat/long?

Maybee that's it, but once again, I'm not an expert...

Cheers
Daniel
--- Maliheh <malihehs@yahoo.com> wrote:

Hello dear GRASS list,

I want to describe my problem from the beginning for
you, I wish you can and you want to help me and also
it can be helpful for others.

I want to create a new location for my region; I
don’t have any digital map that match my need, I
have just a paper map and a GPS receiver, with use
of gpsdrive I noted coordinates of four points on my
map. Gpsdrive shows the coordinates like this:

Latitude: 35.73581 Longitude: 51.40387

And also I know that my region is between 34:52N ,
34:21N and 50:10E , 53:10E; and my map scale is
1/12000 and the resolution of scanned map is 100dpi.

Now start the grass5.7 for creation new location:

a. LOCATION: test________
(enter list for a list of locations)

MAPSET: root__________ (or
mapsets within a location)

DATABASE: /usr/local/src/GIS/grassdata

b. LOCATION <test> - doesn't exist

Would you like to create location <test>? (y/n) y

c. To create a new LOCATION, you will need the
following information:

1. The coordinate system for the database

        x, y (for imagery and other unreferenced
data)

        Latitude-Longitude

        UTM

        Other Projection

2. The zone for the UTM database

   and all the necessary parameters for projections
other than

   Latitude-Longitude, x, y, and UTM

3. The coordinates of the area to become the default
region

   And the grid resolution of this region

4. A short, one-line description or title for the
location

Do you have all this information for location
<test>? (y/n) y

d. Please specify the coordinate system for
location <test>

A x, y

B Latitude - Longitude

C UTM

D Other Projection

RETURN to cancel

> A

x, y coordinate system? (y/n) [y] y

e. Please enter a one line description for
location <test>

> Create a new Location

Create a new Location

Ok? (y/n) [y] y

f. DEFINE THE DEFAULT REGION

                       ====== DEFAULT REGION ====

                       | NORTH EDGE: 36
     |

                       |
              |

WEST EDGE |
       | EAST EDGE

50 |
             | 53

                       | SOUTH EDGE: 34
      |

                       ======================

           PROJECTION: 0 (x, y)
  ZONE: 0

                             GRID RESOLUTION

East-West: 0.03

North-South: 0.02

g. projection: 0 (x,y)

zone: 0

north: 36

south: 34

east: 53

west: 50

e-w res: 0.02 (Changed to conform to grid)

n-s res: 0.03 (Changed to conform to grid)

total rows: 100

total cols: 100

total cells: 10000

Do you accept this region? (y/n) [n] > y

LOCATION <test> has been created!

I know that in some steps specially those with red
highlight, I’ve done something wrong, but I don’t
know

=== message truncated ===

__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

Thank you Daniel,
I checked it, but my problem didn’t solved :frowning:

My another problem is When I use r.in.gdal to import a jpg file, it says:

r.in.gdal input=teh10.jpg output=test

PROJ_INFO file not found for location mtest7

PROJ_UNITS file not found for location mtest7

100%

CREATING SUPPORT FILES FOR test.red

SETTING GREY COLOR TABLE FOR test.red (8bit, full range)

100%

CREATING SUPPORT FILES FOR test.green

SETTING GREY COLOR TABLE FOR test.green (8bit, full range)

100%

CREATING SUPPORT FILES FOR test.blue

SETTING GREY COLOR TABLE FOR test.blue (8bit, full range)

so I have 3 raster map in my location, but I can’t see any of them by use of d.rast or d.rgb,

Would you please tell me my wrong?

Daniel Victoria daniel_victoria@yahoo.com wrote:

Maliheh,

I’m not an expert here but, if you know the lat/long
of your region, why are you creating a XY region and
not a lat/long?

Maybee that’s it, but once again, I’m not an expert…

Cheers
Daniel
— Maliheh


Do you Yahoo!?
Yahoo! Photos - Get your photo on the big screen in Times Square

Maliheh,

Since your jpeg is not georefereced, it does not fall
in the region you defined. To see the images, first
you'll have to set the region to that image. The
comand is
g.region rast=test

then you can see you images with d.rast or if you'd
like to see the color composite you can use d.rgb

After that you will have to georeference the images so
it will fall in you current region. To do that you use
the command i.points (or something similar, cant
remember now and I'm away from my computer with grass)

Daniel
--- Maliheh <malihehs@yahoo.com> wrote:

Thank you Daniel,
I checked it, but my problem didn't solved :frowning:

My another problem is When I use r.in.gdal to import
a jpg file, it says:

r.in.gdal input=teh10.jpg output=test

PROJ_INFO file not found for location mtest7

PROJ_UNITS file not found for location mtest7

100%

CREATING SUPPORT FILES FOR test.red

SETTING GREY COLOR TABLE FOR test.red (8bit, full
range)

100%

CREATING SUPPORT FILES FOR test.green

SETTING GREY COLOR TABLE FOR test.green (8bit, full
range)

100%

CREATING SUPPORT FILES FOR test.blue

SETTING GREY COLOR TABLE FOR test.blue (8bit, full
range)

so I have 3 raster map in my location, but I can't
see any of them by use of d.rast or d.rgb,

Would you please tell me my wrong?

Daniel Victoria <daniel_victoria@yahoo.com> wrote:
Maliheh,

I'm not an expert here but, if you know the lat/long
of your region, why are you creating a XY region and
not a lat/long?

Maybee that's it, but once again, I'm not an
expert...

Cheers
Daniel
--- Maliheh wrote:
>
> Hello dear GRASS list,
>
> I want to describe my problem from the beginning
for
> you, I wish you can and you want to help me and
also
> it can be helpful for others.
>
> I want to create a new location for my region; I
> don’t have any digital map that match my need, I
> have just a paper map and a GPS receiver, with use
> of gpsdrive I noted coordinates of four points on
my
> map. Gpsdrive shows the coordinates like this:
>
> Latitude: 35.73581 Longitude: 51.40387
>
> And also I know that my region is between 34:52N ,
> 34:21N and 50:10E , 53:10E; and my map scale is
> 1/12000 and the resolution of scanned map is
100dpi.
>
> Now start the grass5.7 for creation new location:
>
>
>
> a. LOCATION: test________
> (enter list for a list of locations)
>
> MAPSET: root__________ (or
> mapsets within a location)
>
>
>
> DATABASE: /usr/local/src/GIS/grassdata
>
>
>
>
>
> b. LOCATION - doesn't exist
>
> Would you like to create location ? (y/n) y
>
>
>
>
>
>
>
> c. To create a new LOCATION, you will need the
> following information:
>
>
>
> 1. The coordinate system for the database
>
> x, y (for imagery and other unreferenced
> data)
>
> Latitude-Longitude
>
> UTM
>
> Other Projection
>
> 2. The zone for the UTM database
>
> and all the necessary parameters for projections
> other than
>
> Latitude-Longitude, x, y, and UTM
>
> 3. The coordinates of the area to become the
default
> region
>
> And the grid resolution of this region
>
> 4. A short, one-line description or title for the
> location
>
> Do you have all this information for location
> ? (y/n) y
>
>
>
> d. Please specify the coordinate system for
> location
>
>
>
> A x, y
>
> B Latitude - Longitude
>
> C UTM
>
> D Other Projection
>
> RETURN to cancel
>
> > A
>
> x, y coordinate system? (y/n) [y] y
>
>
>
>
>
> e. Please enter a one line description for
> location
>
>
>
> > Create a new Location
>
>
>
> Create a new Location
>
> Ok? (y/n) [y] y
>
>
>
>
>
> f. DEFINE THE DEFAULT REGION
>
>
>
> ====== DEFAULT REGION ====
>
> | NORTH EDGE: 36
> |
>
> |
> |
>
> WEST EDGE |
> | EAST EDGE
>
> 50 |
> | 53
>
> | SOUTH EDGE: 34

=== message truncated ===

__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

Hey there Maliheh, I am not sure if you have finished this project yet, but this
might help. You have imported the jpg correctly into the xy, so that is good.
You now need to use the imagery commands. First you need to use i.group to
make an imagery group of your test.r test.b and test.g.

Then you need to set a target location using i.target. This will be the
georeferenced location that you will project your rasters into. In your case
probably a lat-long location. You will need to create this. Exit your
location, create a new lat-long location, exit that, and then come back to your
xy location, and set the target location using i.target.

Then you have to use i.points to set the control points. This should be self
explanatory once you use it. After i.points, use i.rectify. First order
transformation should be fine for what you need. After that finishes, exit the
xy location, go into the lat-long location, and the images should be there.

Good luck

ian

On Wed, Dec 31, 2003 at 04:15:00AM -0800, Daniel Victoria wrote:

Maliheh,

Since your jpeg is not georefereced, it does not fall
in the region you defined. To see the images, first
you'll have to set the region to that image. The
comand is
g.region rast=test

then you can see you images with d.rast or if you'd
like to see the color composite you can use d.rgb

Most unreferenced maps are imported with *negative* XY coordinates
when using r.in.gdal. This behaviour should be discussed
and probably changed. IMHO positive XY coordinates should be
written except for AVHRR (as far as I remember, maybe also SAR).

Markus Neteler

On Fri, 2 Jan 2004, Markus Neteler wrote:

Most unreferenced maps are imported with *negative* XY coordinates
when using r.in.gdal. This behaviour should be discussed
and probably changed. IMHO positive XY coordinates should be
written except for AVHRR (as far as I remember, maybe also SAR).

Are both the X and Y co-ordinates negative? If so it doesn't seem to make
sense. It would make sense to me if only the Y co-ordinates were negative,
as then the absolute y co-ordinate of the centre of each pixel would be
the same as its row number (in the conventional way of numbering pixels in
image processing). This is maybe more familiar to people like me who
currently do most image processing in MATLAB.

But I don't really know how this works in practice and if it's hard to get
your head around while actually doing image processing in GRASS. If you
were just temporarily importing into the XY location before rectifying
then I don't see that the XY co-ordinate system would make much difference
at all.

Probably there is another disadvantage that I have missed?

Paul

On Fri, Jan 02, 2004 at 10:10:40AM +0000, Paul Kelly wrote:

On Fri, 2 Jan 2004, Markus Neteler wrote:

> Most unreferenced maps are imported with *negative* XY coordinates
> when using r.in.gdal. This behaviour should be discussed
> and probably changed. IMHO positive XY coordinates should be
> written except for AVHRR (as far as I remember, maybe also SAR).

Are both the X and Y co-ordinates negative?

Yes, but for some formats I have already fixed it and changed to
positive XY coordinates. The r.in.gdal code needs a cleanup IMHO,
at least it is fairly complex now to read.

If so it doesn't seem to make
sense. It would make sense to me if only the Y co-ordinates were negative,
as then the absolute y co-ordinate of the centre of each pixel would be
the same as its row number (in the conventional way of numbering pixels in
image processing). This is maybe more familiar to people like me who
currently do most image processing in MATLAB.

For me simply positive coordinates were fine (no MATLAB user).

But I don't really know how this works in practice and if it's hard to get
your head around while actually doing image processing in GRASS. If you
were just temporarily importing into the XY location before rectifying
then I don't see that the XY co-ordinate system would make much difference
at all.

Probably there is another disadvantage that I have missed?

As far as I understand the problem it's a matter of convention.
So changing the behaviour should be ok (and avoid the many user mails
here where they import and don't find the image later).
Maybe Frank has a comment for us?

Markus

Hello Dear list,

At first I should say thank you for your responses. Now I have a better idea about my work.

Till now I know that we have to import our scanned map in a xy location, then by use of i.group, i.target and i.points, transform it to a second location (lat/long in my case).

But I don’t understand how we should specify our map scale. I read the manual about grid resolution:

Resolution: 100*100 dots per inch

100 dpi = 100 rows / 2.54 cm = 39.37 rows/cm

scale of the map: 1:12000

Distance in nature / scanned rows per cm = 12,000 cm / 39.37 rows

= 304.8 cm/row = 3.048 m/row GRID RESOLUTION

but when I enter this value GRASS shows me:

projection: 0 (x,y)

zone: 0

north: 36

south: 35

east: 52

west: 51

e-w res: 1 (Changed to conform to grid)

n-s res: 1 (Changed to conform to grid)

total rows: 1

total cols: 1

total cells: 1

Now would you please tell me my wrong, again ?


Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003

Maliheh wrote:

At first I should say thank you for your responses. Now I have a
better idea about my work.

Till now I know that we have to import our scanned map in a xy
location, then by use of i.group, i.target and i.points, transform it
to a second location (lat/long in my case).

But I don't understand how we should specify our map scale. I read the
manual about grid resolution:

          Resolution: 100*100 dots per inch

100 dpi = 100 rows / 2.54 cm = 39.37 rows/cm

scale of the map: 1:12000

Distance in nature / scanned rows per cm = 12,000 cm / 39.37 rows

= 304.8 cm/row = 3.048 m/row GRID RESOLUTION

but when I enter this value GRASS shows me:

  projection: 0 (x,y)
  zone: 0
  north: 36
  south: 35
  east: 52
  west: 51
  e-w res: 1 (Changed to conform to grid)
  n-s res: 1 (Changed to conform to grid)
  total rows: 1
  total cols: 1
  total cells: 1

Now would you please tell me my wrong, again ?

The boundary (North/South/East/West) coordinates need to have the same
units as the resolution. E.g. if you are specifying the resolution in
metres, then the boundary coordinates must also be in metres (and not
in e.g. degrees).

For an X/Y location, it doesn't matter exactly which units you use, so
long as they are consistent. But you appear to be specifying a
resolution of approximately 3 units for a map which is one unit high
(36 - 35) by one unit wide (52 - 51).

BTW, for a Lat/Lon location, you need to use degrees, while projected
(e.g. UTM) locations typically need to use either metres or feet.

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