[ gpsdrive ] Map size limitation and map scale calculation
Ryan J. Earley
ryan.j.earley at gmail.com
Wed Oct 24 13:44:50 AKDT 2007
On 10/24/07, Joerg Ostertag (gpsdrive Munich/Germany)
<gpsdrive at ostertag.name> wrote:
> On Mittwoch 24 Oktober 2007, Paweł Bednarski wrote:
> > Let me say first that I'm totally green in terms of geodesy and
> > cartography but I would like to use gpsdrive with self-made (in terms
> > of gluing and calculating parameters) maps. So some questions arise.
> >
> > 1) Why there is a hardcoded 1280x1024 limitation for map size?
> > Or there isn't? Could I for example put map in 2000x2000 size? (my
> > tiles are 200x200 in size so easiest way to create map from them
> > is glueing them together and there comes gpsdrive limitation I've
> > read in man pages about)
>
> The 1280x1024 size limit is historically. The problem is; it's hardcoded
> scattered all over the gpsdrive Code. Maybe we will solve this sometime in
> the future. But until the you'll have to create 1280x1024 images
>
> > 2) What is definition of map scale in gpsdrive? How to calculate one?
> > Digital raster maps have scale in for example meters/inches/foots per
> > pixel. How is this scale interconnected with scale written in
> > map_koord.txt? I obtained (for my personal use) raster map of Poland
> > in scales 2, 4, 8, 16, 32 meters per pixel. Map is georefereced in
> > '1992' coordinate system (EPSG2180 number for reference). I can
> > recalculate it into WGS84 so there is no problem if transformation is
> > linear... But even that I'm able to calculate lat/lon parameters of
> > the center of the map I've created I can't calculate scale...
>
> I can't exactly remember the formulas. But there was a post some time ago
> about how to convert the coordinates and zoom levels.
> Alternatively you might want to either:
> have a look in the source code of gpsfetchmap.pl or map-projection.c
> or try to rectify and get the scale of your maps by using the
> Menue: Option-Maps-Import
>
> I hope these hints helped at least a little bit.
In short:
<Cut-and-paste from gdal_slice.sh
http://hamish.bowman.googlepages.com/gdal_slice.sh >
# Important! The maps must be named "map_*" for UTM-like projections
# (lat:lon = 1:cos(lat)) and "top_*" for lat/lon Plate carree projection
# (lat:lon = 1:1). The prefix is given so that gpsdrive knows how to
# scale the maps correctly. Alternatively the maps can be stored without
# prefix in subdirectories of $HOME/.gpsdrive/ which end in "_map" or
# "_top".
</Cut-and-paste>
An explanation of the map types is discussed in this post:
http://lists.gpsdrivers.org/pipermail/gpsdrive/2007-August/000306.html
If you have maps in a format that GDAL understands, you can convert
those files to gpsdrive tiles (1280x1024) using Hamish's gdal_slice.sh
shell script.
You can find that here:
http://hamish.bowman.googlepages.com/gpsdrivefiles
For manual scale conversion, the following is in the gpsdrive code:
/* Mapscale / pixelfact is meter / pixel */
#define PIXELFACT 2817.947378
So, if you know your meter/pixel of your image, you can calculate the
gpsdrive scale.
Hope that helps,
-Ryan
>
> --
>
> Jörg (Germany, Munich)
>
> http://www.ostertag.name/
> Tel.: +49 89 420950304
> Skype: JoergOstertag
> _______________________________________________
> GPSdrive mailing list
> GPSdrive at lists.gpsdrivers.org
> http://lists.gpsdrivers.org/mailman/listinfo/gpsdrive
>
--
Ryan J. Earley
Rutgers University Geophysics
<rearley at rci.rutgers.edu>
732-445-2125
http://turbidity.rutgers.edu
More information about the GPSdrive
mailing list