Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a quite simple problem but somehow I just fail to solve it.

There is a polygon and a range xsize and ysize. The x and y size determines the mapnik generated image.

The polygon should now be made to fit best, by deciding if:

  • it is good already or
  • a x and y swap and later rotation by 90 degress would make it fit best.

Boundary box and Envelope is given, so no problems there.

The problem is realy just the rotation criterion which I'm lost in.

I hope you understand the simple problem and can show me an idea how to solve it.


share|improve this question

closed as not a real question by R.K., iant, whuber Dec 22 '12 at 17:56

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

just so I understand are you looking for some code that lets you rotate polygons? – dango Nov 27 '12 at 14:26