473,390 Members | 1,300 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,390 software developers and data experts.

Python - Map decode routine problem?

Python programmers may find the application to decoding an encrypted
image format known as Memory Map to produce a standard PNG image file

Someone obviously very well versed in Python and in the intricacies
of image
files has written a routine to decode originally the UK Landranger
maps, so
that they can be used with other mapping and GPS programs apart from
restricted Memory Map viewer.

You can get the details in this RAR archive.

The application was obviously written with a specific job in mind,
and has
no GUI and is not very user friendly for people to use who are not

One of the problems is that the original application was intended for
Landranger map squares which are 20000 pixels square, and when
decoded from
Memory Map qct format to PNG format the files produced are around 50-
megabytes which is quite manageable as a PNG image. PNG has to be
loaded into RAM to manipulate, can't be paged from disk. But with a
larger qct image file, to decode it into a single PNG file would
produce too
big a file for most computers to handle when a say 200Mb PNG file on
disk is
decompressed into RAM.

So it is necessary to be able to decode large qct (Memory Map Image)
into map squares of a manageable size.

Easy enough when you know how! Problem is the existing Python routine
decoding at the top left of the qct image file, and the only control
in the
routine that I have been able to decipher is the number of pixels
along an
edge of the square that are decoded which are controlled in the code


near the end of the file qct2png.py

The last term 20000 sets the edge length of the decoded square.

The question is how can this routine be modified to start the
decoding at
pixel x,y, instead of at pixel 1,1 in the qct file, and to then
decode a map
square of say 20000 pixels edge length from that point, so that a qct
perhaps 60000 x 60000 pixels could be decoded into 9 squares of 20000

The original programmer has solved all of the complex problems of
the encrypted file format and the routine works as intended, but with
a much
larger qct file than the originally intended target you are limited
decoding a square of about 30000 pixels edge depending on how much
RAM your
computer has to later handle the resultant PNG image file. Usually
the PNG
file needs to be further converted to a format which can be paged
from disk
such as MrSID or ozf2 which is a format used by a very popular GPS
application called OziExplorer.

Does anyone know any "Python Pirates" who could solve this?

Could you post a suggested code alteration to do this to this
Dec 15 '07 #1
0 3327

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Edward K. Ream | last post by:
Previous to Python 2.3 my app has destroyed the root Tk window using root.destroy rather than the more usual root.quit. In Python 2.3 this does not work so well. In some situations (i.e., for some...
by: Paul Prescod | last post by:
I skimmed the tutorial and something alarmed me. "Strings are a powerful data type in Prothon. Unlike many languages, they can be of unlimited size (constrained only by memory size) and can hold...
by: Michael Sperlle | last post by:
Is it possible? Bestcrypt can supposedly be set up on linux, but it seems to need changes to the kernel before it can be installed, and I have no intention of going through whatever hell that would...
by: Independent | last post by:
Python programmers may find the application to decoding an encrypted map image format known as Memory Map to produce a standard PNG image file interesting. Someone obviously very well versed in...
by: james.duckworthy | last post by:
Python programmers may find the application to decoding an encrypted map image format known as Memory Map to produce a standard PNG image file interesting. Someone obviously very well versed in...
by: anonymous | last post by:
1 Objective to write little programs to help me learn German. See code after numbered comments. //Thanks in advance for any direction or suggestions. tk 2 Want keyboard answer input, for...
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.