geospatial - Calculating scale of an image -
i'm working on processing geo-spatial raster data, jog-a raster exact , know imagery supposed to scale of 1:250000, calculate in code not coming correct values thought ask help.
here bounds of single image , other values needed calculations. (coordinates in degrees, epsg:4326)
- meters per degree: 111319.49079327358
- image size: x: 1536 y: 1536
dpi: 90
upper left: longitude: -89.54314720812182 latitude: 33.6529242569511
- upper right: longitude: -88.8578680230458 latitude: 33.6529242569511
- bottom right: longitude: -88.8578680230458 latitude: 33.13518696069031
- bottom left: longitude: -89.54314720812182 latitude: 33.13518696069031
i thought say: (deglata - deglatb) * meterperdeg / imagesizey * dpi / 0.0254
- 33.6529242569511deg - 33.13518696069031deg = 0.51773729626079deg
- $1 deg * 111319.49079327358m/deg = 57634.2521844373683014174969282m
- $2 m / 1536px = 37.52m/px
- $3 m/px * (90px/in * 1in/0.0254m) = 132953.03
which gives scale of 1:132953... not close!
units cancel great, can see calculation value not close 250k.
can explain i'm wrong?
edit in case else stumbles upon answer hidden in spec documents cadrg. dpi use cadrg 169. plug in above equation , works great cadrg. need know correct dpi use imagery trying find scale of , above work.
you need longitude because otherwise map distorted. imo try same formula longitude.
Comments
Post a Comment