I've created a tool based on the Google overlay tiler. This allows our users to upload a floor plan, adjust the position etc. using Google maps. Nothing fancy.
We have a server-side job which creates the geo-referenced image using gdal_translate. The job then slices it up using gdal2tiles.py and then saves to s3.
This all works nicely. The idea is that they can use this to correctly position their wireless access points etc. The user can zoom in and out. Again, all is well. Something like this:
The problem I have is that they actually need to see the floor plan in it's original format - in full screen. Not rotated as the image shows.
I don't really need the map at this point - I just the image with the markers in an overlay as so:
I obviously need to rotate the map so the floor-plan is aligned correctly horizontally.
How I can use the data in the geo-referenced image etc. to calculate the scale for the map and the rotation I need?