Hello Utkarsh,
The above flow can be completed in two steps. 1st we will register the asc file and generate associated TAB file which will contain projection information. Then we will use calculator operation to compute new values from input asc file and generate output file based on particular expression.
For registering the tab you will need to add something like below in your python code:
do("Register Table \"{0}\" type RASTER CoordSys Earth Projection 1, 104 into \"{1}\"".format("D:\RasterData\ASCII\sample.asc","D:\\RasterData\\ASCII\\sample.tab"))
You will need to pass correct projection for asc file in the Register table command.
Once done you can call calculator API to compute new values for input asc file. Example for running calculator operation through Python can be found in below thread. Refer reply#5:
Calculator ExampleFor information on how to use calculator tool and API you can refer MapInfo Pro Advanced documentation and API documentation under {MapInfo Installation Path}\Professional\Raster\Documentation\API\
Hope this help.
Let us know if you need any other help on the same.Thanks
Anshul
------------------------------
Anshul Goel
Pitney Bowes Software Inc.
Shelton CT
------------------------------
Original Message:
Sent: 04-05-2022 08:19
From: Utkarsh Upadhyaya
Subject: Support Required for basic actions in MapInfo Python
Hi Team,
I am new in MapInfo python programming, where i have a requirement to open one asc raster file, select the positioning and add some calculation and run the programme.
But unfortunately, can't see any function to perform these task in available PQS. Can any one support on this?
1- open .asc raster image
2- choose the projection.
3- Load Raster Image File for calculation
4- Compute and get the output.
Hope i am clear with the requirements. Any help on this please?
Thanks,
Utkarsh
------------------------------
Utkarsh Upadhyaya
Knowledge Community Shared Account
------------------------------