5

Let's say I have a set of rasters, all generated by the same process, that all have a geographic coordinate system of WGS84, but no projected coordinate system. Therefore, all the cells are in decimal degrees, not meters, etc. Cells have continuous floating-point values (in meters) that I want to avoid resampling if at all possible. The data covers the whole continental United States. I'll call this my "base data".

Here are generally the types of analysis I want to do with my data:

  1. Take rasters x and y in my base data (both in WGS84, with no projected coordinate system) and add them together. Also, identify the cells in x that have non-zero values which have zero values in y. That sort of thing ... simple map algebra.
  2. Take another raster from a different data source, which may have a projected coordinate system and/or a different geographic coordinate system, and use my base data to extract the cells in this other raster where my base data cells have non-zero values.
  3. Take some polygon vector data (again with who knows what kind of geographic and/or projected coordinate system) and compute zonal stats on my base data.

So, my question is, if essentially all I'm looking to do is simple map algebra, where I need to align pixels one-to-one across rasters (or the pixels already naturally align), or simple zonal stats -- basically, analyses where calculation/preservation of shape, area, or distance are not actually relevant -- do I need to worry about supplying projected coordinate systems to all my inputs? Shouldn't I just be able to get everything into WGS84, same as my base data, and carry this out, thereby avoiding having to reproject/resample my base data?

While I'm mainly interested in having the correct theoretical understanding (and keeping my base data in WGS84 as-is), it's also notable that some of ArcGIS's Spatial Analyst raster algebra tools (e.g. "Plus") error out when I'm trying to use them on rasters with only a geographic, and no projected, coordinate system. I can't tell if this is a software quirk of Arc, or if it's trying to tell me that what I'm doing is inadvisable conceptually.

1
  • 1
    Welcome to GIS SE. As a new user, please take the Tour, which explains the importance of asking one question per Question. We use a "Focused question / Best answer" model here. Please edit your Question to improve the focus of your multiple multipart questions.
    – Vince
    May 29, 2018 at 23:28

1 Answer 1

3

It sounds like you are trying to manually run a raster mask on data with different projections.

I'll focus on your main question:

"if essentially all I'm looking to do is simple map algebra, where I need to align pixels one-to-one across rasters (or the pixels already naturally align), or simple zonal stats -- basically, analyses where calculation/preservation of shape, area, or distance are not actually relevant -- do I need to worry about supplying projected coordinate systems to all my inputs?"

The short answer is no. If you really are preforming analyses where calculation/preservation of shape, area, or distance are not actually relevant. Then even though the geographic systems are 3D and intrinsically not flat-squares, you can still add them together using map algebra.

I just tested it out. I took an unprojected ratster (mine is unprojected in GCS North America 1983) added it to arcMap twice and then ran Spatial Analysts > Plus and added it to itself. It ran without error.

My guess is that you are experiencing an alignment error. To conduct map algebra, the cells have to line up. So all your layers need to have the same resolution (cell size) and alignment. If they don't, you are going to have to resample at least one layer to match the other. The error you are seeing might be due to misaligned data. Even if the data are in the same projection (be it geographic or projected) they might not be perfectly aligned, in which case you can't add the values using "plus". Look at this example, representing two rasters with the same resolution in the same projection. Which cell should be added to which? Even a small misalignment computationally doesn't line up. Misaligned rasters

You can tell if your rasters line up by checking the "extent" in each raster's layer properties. Or zoom way in and use the "effects" toolbar to set transparency or a flicker to see if the two layers actually line up at the edge.

To fix it, you may want to resample first. Another option is to set an environment setting when you run the map algebra, and let arc map do it all at once. It's a little more of a black box this way, but it should work. With your map algebra tool open, hit the 'Environments" button then set a specific layer as your Processing Extent > Snap Raster. Read more "here".

A good book to read if you want a thorough overview of data alignment issues is Lining up Data in ArcGIS

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.