Generate a grid of latitude values

9271
19
04-30-2010 07:18 AM
ToddMcDonnell
New Contributor II
I need to convert a 30m elevation grid to a grid that gives values for the cell latitude rather than elevation.

I tried converting the GRID to point, adding x,y data to the points, then converting back to GRID using the y-coordinate as the value, however, the large region I am working with is preventing the processes from completing successfully.

Any advice will certainly be appreciated.

Todd
0 Kudos
19 Replies
SeanMcLaughlin
New Contributor
What is the area, or how large of an area is it?
0 Kudos
LukePinner
New Contributor
Is the grid in a geographic coordinate system?

If so, just set your output extent and cell size (ArcToolbox environment settings or Spatial Analyst toolbar options) to match your DEM then use $$YMAP built in scalar variable in a SOMA/MOMA tool or Raster Calculator expression:

E.g.
C:\workspace\latgrid = $$YMAP


Luke

PS: For info...

Built-in GRID scalar variables:
$$NROWS: the number of rows in the analysis window
$$NCOLS: the number of columns in the analysis window
$$CELLSIZE: the current cell size specified in the analysis environment
$$WX0: minimum x-map coordinate of the current analysis window
$$WY0: minimum y-map coordinate of the current analysis window
$$WX1: maximum x-map coordinate of the current analysis window
$$WY1: maximum y-map coordinate of the current analysis window
$$XMAP: x-map coordinate for the center of the processing cell
$$YMAP: y-map coordinate for the center of the processing cell

Built-in GRID constants.
PI: 3.142
E: 2.718 (e)
DEG: 57.296 (Degree to radian conversion)
GAMMA: 0.577
PHI: 1.618

Built-in grids.
$$ROWMAP
$$COLMAP
0 Kudos
DanielLusher
New Contributor
Luke (or anyone else who can help),

I've read your post on this thread, and your thread on the old forums (http://forums.esri.com/Thread.asp?c=93&f=1740&t=182407&mc=6#msgid538607), but I'm struggling to get the $$xmap scalar variable to work with the SOMA tool.  It works in the Raster Calculator, but since I am trying to create a model, I need to use the SOMA tool.  At the moment, I am trying

$$xmap = (D:\...\Base Data\dem3_4m)

in the "Map Algebra expression" box, and have tried variations including switching the order of variables, spaces and no spaces, no equal sign, etc.  I still get an error saying that "$$xmap = is not a valid function or operator."  I also cannot find where it would be in the "Usage" listing.

I am currently running ArcView 9.3.1 SP 2 with the Spatial Analyst extension, on Windows 7.

Thank you for any ideas you might have!
0 Kudos
DanielLusher
New Contributor
Figured it out - needed to set the extent, snap raster, and cell size in the "Model Properties" to make it run.  Put "$$xmap" in the "Map Algebra expression" text box and it ran fine.
0 Kudos
JenifaLatha
New Contributor
Dear Sir
I need to create a lattitude grid from the DEM. I have gone through the threads and followed the steps. When I type the statement $$YMAP in SOMA window after setting the extent, working directory and cell size by the spatial analyst > options, i get an error message that "Syntax error at locations 0 of expressions $$YMAP". I even changed the expression as E:\Ph.D\Data_dump\DEM = $$YMAP. How to access these built in functions? Kindly help me sir.
With Thanks
0 Kudos
EmmanuelJjunju
New Contributor
I have tried this is arcGIS10 raster calculator  and it doesn't work!! Any new detailed instructions on how to generate the grid of latitudes?

See screen capture attached please.
0 Kudos
toddsams
New Contributor III
I have not tried the raster calculator method.

However, I have had luck using the function "genvecgrid" in the Geospatial Modeling Environment (GME). After generating the vector point grid I added x-y coordinates to the attribute table. Then, created a raster from these points using the y-coordinate field as values. I think I chose a bilinear interpolation technique when doing this.
0 Kudos
GJtB
by
New Contributor
Hi,
I have the same Problem as ejjunju ($$XMAP or $$xmap doesn't work in ArcGIS 10)

I want to create rasters with x-Values and do not have a clue how to Do it with the raster calculatur. I could create point-features, use "Add XY" and then convert it to rasters, but as I have to automatize it it seems to be too complicated.

I also have problems finding documentation/ tutorials on Map Algebra syntax. Does anyone know some sources for this

Greetings
Gerald
0 Kudos
MannyGimond
New Contributor III
Hi,
I have the same Problem as ejjunju ($$XMAP or $$xmap doesn't work in ArcGIS 10)


Unfortunately, ESRI removed those grid functions from 10.0. However, there is a Python alternative, see this link .
0 Kudos