Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

What I'm trying to do is create a grid where the y axis is north aligned. I have a origin Lat/Lon point which is the bottom left corner of the grid and each cell should be 100 by 100 meters. So I projected my points to SRID 2163 (US Equal Area) and figured id use each the grid x,y values with the cell size relative to my origin point.

like this:

cell_bottom_left = { lon: origin.lon + (100 * x), lat: origin.lat + (100 * y)}
cell_top_left    = { lon: origin.lon + (100 * x), lat: origin.lat + (100 * y) + 100}
cell_bottom_right= { lon: origin.lon + (100 * x) + 100, lat: origin.lat + (100 * y)}
cell_top_right   = { lon: origin.lon + (100 * x) + 100, lat: origin.lat + (100 * y) + 100}

it worked fine, except the grid was tilted. I then found out that 2163 is not north aligned which explains what is happening here.

How would I go about creating a north aligned grid?

share|improve this question
It would seem that your grid is north-aligned. It just isn't orthogonal on the screen. Are you asking for a projection that will make your grid both north-aligned and orthogonal? –  Patrick Aug 11 '11 at 3:18
Wouldn't that only be achievable by rotating the map? Either way, I guess I just need it to be orthogonal then if I understand correctly. –  ilia choly Aug 11 '11 at 3:51
No, not necessarily. If you rotate the grid and leave the coordinate system the same, your top will not be due north of your bottom. –  Patrick Aug 11 '11 at 3:55
add comment

1 Answer

up vote 1 down vote accepted

You'll need to change the projection of the map (but not necessarily the grid) to one in which north is orthogonal, such as Mercator. Note that changing the map projection will only change the way the image appears - it won't change the underlying data in the grid, so I assume you need an orthogonal grid for graphics reasons.

I'm not as familiar with PostGIS's method for displaying spatial data, so if there is no "map" with a projection, just reproject your grid to some form of Mercator, and I assume PostGIS will display it orthoganally.

share|improve this answer
Yes, my dilemma is purely aesthetic based. Basically i'm generating a grid table. Then I'll be doing a join query on some points and the grid table and group them by the cell they fall into to create histograms. –  ilia choly Aug 11 '11 at 4:21
Okay! Write back if you have questions about the details of changing projections in PostGIS. Hopefully someone with more experience with it will chime in. –  Patrick Aug 11 '11 at 4:24
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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