logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: [ gpsdrive ] Map size limitation and map scale calculation: msg#00104

Subject: Re: [ gpsdrive ] Map size limitation and map scale calculation
> Pawe³ Bednarski wrote:
> > > Let me say first that I'm totally green in terms of geodesy and
> > > cartography

some light reading can be found here:
  http://grass.gdf-hannover.de/wiki/Gis_Concepts

> > > but I would like to use gpsdrive with self-made (in terms
> > > of gluing and calculating parameters) maps. So some questions arise.
..
> > > 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...

The GPS outputs WGS84 lat/lon so at least the center cood in map_koord.txt must
be in WGS84 lat/lon too.

# ETRS89 / Poland CS92
<2180> +proj=tmerc +lat_0=0 +lon_0=19 +k=0.999300 +x_0=500000
       +y_0=-5300000 +ellps=GRS80 +units=m +no_defs  <>

transverse mercator, ok. (it's "UTM like": use map_* or in map/ dir)
GRS80 based and WGS84 datums are very close together (cm or mm, 1980 and 1984),
shouldn't be much problem there. Datums defined before the advent of satellites
(ie a good idea where the center of the world really is) tend to be 100-150m
different.

Ryan
> 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>
..
> 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.


there are some more comments in the GRASS d.out.gpsdrive shell script,
  http://freegis.org/cgi-bin/viewcvs.cgi/grass6/scripts/d.out.gpsdrive/

e.g.
#  You can figure out the "scale" factor by meters/pixel * 2817.947378
#    2817 is maybe someones screen dpi converted to pixels/meter??
#
#  At scales wider than say 1:250,000 the curvatute of the Earth really starts
#   to play havoc with gpsDrive's simple projection system if you are using
#   a UTM or other non-lat/lon projection. Best to use output from a lat/lon
#   location in that case.
#
# A series of 1:50,000 maps may not be so bad.
#   This translates to approx a 22.7km x 18.2km image window in the GIS.
#     x_ext=scale*(1280/2817.9)
#  1:75,000 uses a region 34.1km x 27.3km.
#  1:100,000 uses a region  45.4km x 36.3km.
#  1:175,000 uses a region  80km across.


good luck,
Hamish


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>