[PYTHON] I tried to display the altitude value of DTM in a graph

What is DTM

Abbreviation for Digital Terrain Map. This time, we will use the DEM data acquired by a camera called HiRISE mounted on the Mars probe MRO.

What is HiRISE

One of the cameras equipped with MRO. Insanely high resolution. gahag-0040798691.jpg The image above seems to be one of them. (This is a pseudo color image)

procedure

Download: HiRISE Archive Site ESP and PSP are the modes when the camera acquires the image. (Any)

This time I will read it in Python. Please use gdal or something to read it. (I will skip it.)

dtm.py


xx=int(len(data_array))+1
yy=int(len(data_array[0]))+1
data_array = np.where(data_array<=-8000, data_array*(-0.0), data_array)
x = np.arange(0, xx-1, 1)
y = np.arange(0, yy-1, 1)
Z = data_array
Y, X = np.meshgrid(y, x)
fig = plt.figure()
ax = Axes3D(fig)
ax.plot_wireframe(X, Y, Z)
plt.show()

Rough direct pasting. Get the length of the array. -Elevation below 8000 is impossible ... use it. The invalid value is 0 for the time being. Specify max and min. Plot with a mesh. By the way, there were 270 lines including comment out to see the value. Even though the contents are so thin ...

For the time being, if you do it like this

Figure_1_3D.png You can do this.

Hard to see!

Summary

Now that the display is complete, let's clean it up ... I don't know what this is used for w I wonder if it can be used for something ... if it's clean!

that's all! It was a miscellaneous summary!

After that, I will summarize some interesting things and what I did in the extra time of my research. I have to do research and job hunting ... I want to play games ...

Recommended Posts

I tried to display the altitude value of DTM in a graph
I tried to create a Python script to get the value of a cell in Microsoft Excel
I tried to graph the packages installed in Python
[Python & SQLite] I tried to analyze the expected value of a race with horses in the 1x win range ①
I made a command to display a colorful calendar in the terminal
I wrote a doctest in "I tried to simulate the probability of a bingo game with Python"
I tried to touch the API of ebay
I want to sort a list in the order of other lists
I made a program to check the size of a file in Python
I tried to verify the result of A / B test by chi-square test
I tried to implement a card game of playing cards in Python
I want to display the progress in Python!
I tried to predict the price of ETF
I tried to vectorize the lyrics of Hinatazaka46!
I tried to display the analysis result of the natural language processing library GiNZA in an easy-to-understand manner
To output a value even in the middle of a cell with Jupyter Notebook
I want to set a life cycle in the task definition of ECS
[Azure] I tried to create a Linux virtual machine in Azure of Microsoft Learn
I want to see a list of WebDAV files in the Requests module
I tried to display the infection condition of coronavirus on the heat map of seaborn
I tried to create a model with the sample of Amazon SageMaker Autopilot
Draw a graph in Julia ... I tried a little analysis
I tried to summarize the basic form of GPLVM
I tried to implement a pseudo pachislot in Python
[Python] I tried to graph the top 10 eyeshadow rankings
I tried to visualize the spacha information of VTuber
I tried to erase the negative part of Meros
I tried to complement the knowledge graph using OpenKE
Python OpenCV tried to display the image in text.
I tried to classify the voices of voice actors
I tried to summarize the string operations of Python
In IPython, when I tried to see the value, it was a generator, so I came up with it when I was frustrated.
I wanted to know the number of lines in multiple files, so I tried to get it with a command
I tried to make something like a chatbot with the Seq2Seq model of TensorFlow
[Linux] I learned LPIC lv1 in 10 days and tried to understand the mechanism of Linux.
How to display the modification date of a file in C language up to nanoseconds
I tried to notify the update of "Become a novelist" using "IFTTT" and "Become a novelist API"
I tried to extract the text in the image file using Tesseract of the OCR engine
I tried to put HULFT IoT (Agent) in the gateway Rooster of Sun Electronics
[First data science ⑥] I tried to visualize the market price of restaurants in Tokyo
I tried to find the entropy of the image with python
[Horse Racing] I tried to quantify the strength of racehorses
I tried to get the location information of Odakyu Bus
I tried the accuracy of three Stirling's approximations in python
I tried the super-resolution algorithm "PULSE" in a Windows environment
I tried to find the average of the sequence with TensorFlow
I tried to implement a one-dimensional cellular automaton in Python
I made a function to check the model of DCGAN
I tried to summarize the code often used in Pandas
I tried "How to get a method decorated in Python"
I tried to display the time and today's weather w
How to get the last (last) value in a list in Python
I tried to summarize the commands often used in business
I tried to implement the mail sending function in Python
[Machine learning] I tried to summarize the theory of Adaboost
I tried to make a stopwatch using tkinter in python
I tried to fight the Local Minimum of Goldstein-Price Function
I tried to implement blackjack of card game in Python
(Python: OpenCV) I tried to output a value indicating the distance between regions while binarizing the video in real time.
I tried to display the point cloud data DB of Shizuoka prefecture with Vue + Leaflet
How to display the regional mesh of the official statistics window (eStat) in a web browser