Template talk:BC Basemap: Difference between revisions

From VOC Wiki
Jump to navigation Jump to search
imported>Matthew
No edit summary
imported>ScottN
No edit summary
Line 24: Line 24:
If we make this work, it would be cool to have a way to generate maps for myself without having to make a wiki page... ie. an alternate interface.  Basically something for friendly than bivouac or trail.brijn.nu.  The gov't web interfaces are ok, but it is hard to make a big map with them. [[User:Swebster|Scott Webster]] 22:05, 19 February 2008 (PST)
If we make this work, it would be cool to have a way to generate maps for myself without having to make a wiki page... ie. an alternate interface.  Basically something for friendly than bivouac or trail.brijn.nu.  The gov't web interfaces are ok, but it is hard to make a big map with them. [[User:Swebster|Scott Webster]] 22:05, 19 February 2008 (PST)
: I should be able to whip up a form to do that fairly quickly - probably more easily than the wiki template. Actually, I'd like that for myself, so it has a high likelihood of getting done. --[[User:Matthew|Matthew]] 22:19, 19 February 2008 (PST)
: I should be able to whip up a form to do that fairly quickly - probably more easily than the wiki template. Actually, I'd like that for myself, so it has a high likelihood of getting done. --[[User:Matthew|Matthew]] 22:19, 19 February 2008 (PST)
::I whipped together something that takes the center lat/long, a lat width, a long width and a scale as parameters.  I think that's easier for the user than specifying a bounding box, height and width.  It also keeps the vertical and horizontal scales the same.  Right now it assumes you are at 50 degrees lattitude to do the lat/long distance ratio.  Ideally we could use the cosine of the lattitude to calculate this but I haven't figured out how to do that yet.  [[User:ScottN|Scott Nelson]] 10:02, 20 February 2008 (PST)

Revision as of 18:02, 20 February 2008

Re: this forum thread

Making that map was mostly trial and error. There are 6 important things:

  1. min latitude
  2. min longitude
  3. max latitude
  4. max latitude
  5. width
  6. height

lat/lng coordinates (aka the bounding box) are decimal degrees, width and height are pixels. It is possible to create maps where the x-scale <> y-scale. I did it by mistake one time, and it looks quite weird, so you have to make sure the aspect ratio for the bounding box matches the image dimensions you are asking it to create. It shouldn't be too hard to automatically create maps with a wiki template - one of the dimensions (e.g. width) could be taken from a template variable, and the other calculated to match the bounding box.

How I actually created that map was:

  1. use bivouac basemap tool to generate 3km radius map of Mt Garibaldi
  2. adjust bounding box keeping aspect ratio the same (by adding/subtracting the same amount from both the co-ordinates of both sides), until map showed south end of the neve traverse
  3. subtract southern latitude from northern latitude, to get total latitude range of map.
  4. multiply that by 3, add to southern latitude to get new northern latitude
  5. increase height of map in px to 3000

I guess that's a starting point - I'll give some thought to how this template could work on the wiki. Suggestions welcome. --Matthew 21:55, 19 February 2008 (PST)

If we make this work, it would be cool to have a way to generate maps for myself without having to make a wiki page... ie. an alternate interface. Basically something for friendly than bivouac or trail.brijn.nu. The gov't web interfaces are ok, but it is hard to make a big map with them. Scott Webster 22:05, 19 February 2008 (PST)

I should be able to whip up a form to do that fairly quickly - probably more easily than the wiki template. Actually, I'd like that for myself, so it has a high likelihood of getting done. --Matthew 22:19, 19 February 2008 (PST)
I whipped together something that takes the center lat/long, a lat width, a long width and a scale as parameters. I think that's easier for the user than specifying a bounding box, height and width. It also keeps the vertical and horizontal scales the same. Right now it assumes you are at 50 degrees lattitude to do the lat/long distance ratio. Ideally we could use the cosine of the lattitude to calculate this but I haven't figured out how to do that yet. Scott Nelson 10:02, 20 February 2008 (PST)